New Package Object

The new package object describes the package information needed when creating a new shipment.

Properties

This table lists the properties of a new package object and identifies those properties that are required. This object is passed as an argument to the createShipment method and is never returned from a method. Therefore, only the nullable column is listed below.

NameTypeNullable?Description
packagingobject

The packaging used for this package.

packaging.id

UUID

A UUID that uniquely identifies this packaging. This is the UUID you used in the Packaging Definition file for this packaging..

packaging.identifiers

identifiers object

Your own identifiers for this packaging.

packaging.codestring

Optional code used to map to what the carrier uses to identify the packaging.

The value custom indicates user-defined packaging. Some of our products allow users to enter custom packaging instead of one of your app's pre-defined packaging types.

packaging.namestring

The user-friendly name for this packaging (e.g. "Flat-Rate Box", "Large Padded Envelope"). This string will not contain newline characters.

packaging.descriptionstring

A short, user-friendly description of the packaging. This string will not contain newline characters.

packaging.requiresWeightboolean

Indicates whether the weight must be specified when using this packaging.

packaging   .requiresDimensionsboolean

Indicates whether the dimensions must be specified when using this packaging.

insuredValueobject

The insured value of this shipment.

insuredValue.valuenumber

The value of the insured amount.

insuredValue.currencystring

The currency that the value represents.

containsAlcoholboolean

Indicates whether the package contains alcohol.

isNonMachineableboolean

Indicates whether the package cannot be processed automatically due to size, shape, weight, etc. and requires manual handling.

labelobject

An object representing the information required to create a new label.

label.formatstring

The preferred file format of the label. The carrier should return the label in this format, if possible. Valid values include the following:

  • pdf - Portable Document Format (PDF)
  • zpl - Zebra Printer Label (ZPL)
  • png - Portable Graphics Format (PNG)
label.sizestring

The preferred label size. The carrier should return the label in this size, if possible. Valid values include the following:

  • A4- A4 sized paper ( 8.27 inches x 11.69 inches)
  • A6 - A6 sized paper (4 1/8 inches x 5 7/8 inches)
  • letter - Letter sized paper (8.5 inches by 11 inches)
  • 4x6 - Paper sized 4 inches by 6 inches
  • 4x8 - Paper sized 4 inches by 8 inches
label.referenceFieldsstring[]

Some carriers provide general-purpose fields on their labels for custom text. This is sometimes used for messages, like "Thank you for shopping with us!", or may be used to store reference data, such as account numbers, warehouse codes, etc.

The exact location on the label depends on the carrier, as does the allowed number of fields and the maximum length of each field. If more fields are specified than are supported by the carrier, then the extra fields should be ignored. Likewise, if a field length exceeds the carrier's maximum length, then it should be truncated. The actual values that are used should be returned, so the caller can detect any differences.

Note that these fields should NOT be used to set named fields on the label, such as "RMA Number" or "Order ID". Those should be set using the correspond properties of the shipment.

Each string in this array will not contain newline characters.

customs

customs object

The customs associated with this package.

contentsobject

Describes the items inside the package.

contents.skustring

The Stock Keeping Unit. This string will not contain newline characters.

contents.identifiers

identifiers object

Your own identifiers for this item.

contents.salesOrderobject

The sales order associated with this item.

This property may be null. If it is provided, all its required properties, listed below, will be included.

contents.salesOrder.idstring

The marketplace's unique ID for the sales order. This string will not contain newline characters.

contents   .salesOrder   .identifiers

identifiers object

Your own identifiers for this sales order.

contents.salesOrderItemobject

The sales order item associated with this item.

This property may be null. If it is provided, all its required properties, listed below, will be included.

contents   .salesOrderItem   .idstring

The marketplace's unique ID for the sales order item. This string will not contain newline characters.

contents   .salesOrderItem   .skustring

The Stock Keeping Unit. This string will not contain newline characters.

contents   .salesOrderItem   .identifiers

identifiers object

Your own identifiers for this sales order item.

contents.productobject

The product associated with this item.

This property may be null. If it is provided, all its required properties, listed below, will be included.

contents.product.idstring

The product catalog's unique ID for the order. This string must not contain newline characters.

contents.product.skustring

The Stock Keeping Unit. This must not contain newline characters.

contents.product.upcstring

The Universal Product Code for this item. This must not contain newline characters.

contents.product.isbnstring

The International Standard Book Number for this item. This must not contain newline characters.

contents.product.asinstring

The Amazon Standard Identification Number for this item. This must not contain newline characters.

contents   .product   .fulfillmentSkustring

The Stock Keeping Unit related to the fulfillment of this item. This must not contain newline characters.

contents   .product   .inventoryIDstring

The inventory ID for this item. This must not contain newline characters.

contents   .product   .identifiers

identifiers object

Your own identifiers for this product.

contents.product.details

identifiers object

A list of details associated with this product

contents.quantityobject

The quantity of this item in the package.

contents.quantity.valuenumber

The quantity of items. The minimum value is 1. This value will not contain decimals.

contents.unitPriceobject

The sale price of each item.

contents.unitPrice.valuenumber

The value of the amount.

contents   .unitPrice   .currencystring

The currency that the value represents.

contents.totalPriceobject

The total price of this item. This is unitPrice multiplied by quantity.

contents.totalPrice.valuenumber

The value of the amount.

contents   .totalPrice   .currencystring

The currency that the value represents.

dimensionsobject

The dimensions for the package.

This property may be null. If it is provided, all its required properties, listed below, will be included.

dimensions.lengthnumber

The length of the package. This value may contain decimals.

dimensions.widthnumber

The width of the package. This value may contain decimals.

dimensions.heightnumber

The height of the package. This value may contain decimals.

dimensions.unitstring

The unit of measurement for the dimensions. Valid values include the following:

  • in - inches
  • cm - centimeters
weight

weight object

The weight of the package.

This property may be null. If it is provided, all its required properties, listed below, will be included.