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.
Name | Type | Nullable? | Description |
---|---|---|---|
packaging | object | The packaging used for this package. | |
packaging.id | A UUID that uniquely identifies this packaging. This is the UUID you used in the Packaging Definition file for this packaging.. | ||
packaging.identifiers | Your own identifiers for this packaging. | ||
packaging.code | string | Optional code used to map to what the carrier uses to identify the packaging. The value | |
packaging.name | string | The user-friendly name for this packaging (e.g. "Flat-Rate Box", "Large Padded Envelope"). This string will not contain newline characters. | |
packaging.description | string | A short, user-friendly description of the packaging. This string will not contain newline characters. | |
packaging.requiresWeight | boolean | Indicates whether the weight must be specified when using this packaging. | |
packaging
.requiresDimensions | boolean | Indicates whether the dimensions must be specified when using this packaging. | |
insuredValue | object | The insured value of this shipment. | |
insuredValue.value | number | The value of the insured amount. | |
insuredValue.currency | string | The currency that the value represents. | |
containsAlcohol | boolean | Indicates whether the package contains alcohol. | |
isNonMachineable | boolean | Indicates whether the package cannot be processed automatically due to size, shape, weight, etc. and requires manual handling. | |
label | object | An object representing the information required to create a new label. | |
label.format | string | The preferred file format of the label. The carrier should return the label in this format, if possible. Valid values include the following:
| |
label.size | string | The preferred label size. The carrier should return the label in this size, if possible. Valid values include the following:
| |
label.referenceFields | string[] | 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 | The customs associated with this package. | ||
contents | object | Describes the items inside the package. | |
contents.sku | string | The Stock Keeping Unit. This string will not contain newline characters. | |
contents.identifiers | Your own identifiers for this item. | ||
contents.salesOrder | object | ✔ | 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.id | string | The marketplace's unique ID for the sales order. This string will not contain newline characters. | |
contents
.salesOrder
.identifiers | Your own identifiers for this sales order. | ||
contents.salesOrderItem | object | ✔ | 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
.id | string | The marketplace's unique ID for the sales order item. This string will not contain newline characters. | |
contents
.salesOrderItem
.sku | string | The Stock Keeping Unit. This string will not contain newline characters. | |
contents
.salesOrderItem
.identifiers | Your own identifiers for this sales order item. | ||
contents.product | object | 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.id | string | The product catalog's unique ID for the order. This string must not contain newline characters. | |
contents.product.sku | string | The Stock Keeping Unit. This must not contain newline characters. | |
contents.product.upc | string | The Universal Product Code for this item. This must not contain newline characters. | |
contents.product.isbn | string | The International Standard Book Number for this item. This must not contain newline characters. | |
contents.product.asin | string | The Amazon Standard Identification Number for this item. This must not contain newline characters. | |
contents
.product
.fulfillmentSku | string | The Stock Keeping Unit related to the fulfillment of this item. This must not contain newline characters. | |
contents
.product
.inventoryID | string | The inventory ID for this item. This must not contain newline characters. | |
contents
.product
.identifiers | Your own identifiers for this product. | ||
contents.product.details | A list of details associated with this product | ||
contents.quantity | object | ✔ | The quantity of this item in the package. |
contents.quantity.value | number | The quantity of items. The minimum value is | |
contents.unitPrice | object | ✔ | The sale price of each item. |
contents.unitPrice.value | number | The value of the amount. | |
contents
.unitPrice
.currency | string | The currency that the value represents. | |
contents.totalPrice | object | ✔ | The total price of this item. This is |
contents.totalPrice.value | number | The value of the amount. | |
contents
.totalPrice
.currency | string | The currency that the value represents. | |
dimensions | object | ✔ | The dimensions for the package. This property may be null. If it is provided, all its required properties, listed below, will be included. |
dimensions.length | number | ✔ | The length of the package. This value may contain decimals. |
dimensions.width | number | ✔ | The width of the package. This value may contain decimals. |
dimensions.height | number | ✔ | The height of the package. This value may contain decimals. |
dimensions.unit | string | The unit of measurement for the dimensions. Valid values include the following:
| |
weight | ✔ | The weight of the package. This property may be null. If it is provided, all its required properties, listed below, will be included. |