Package#

A Package model is used to represent the "thing" to ship, and is sent to the carrier API. It includes dimensions, weight and units associated with these values.

A package should represent a box, satchel or parcel with your carrier, and can likely handle multiple items within it. Shippy doesn't handle packing your items into a Package.

Properties#

Properties are protected and can be accessed with their getPropertyName() getter method or set via setPropertyName(value) setter method.

PropertyTypeDescription
weight?stringThe total weight of the package.
width?stringThe total width of the package.
length?stringThe total length of the package.
height?stringThe total height of the package.
price?stringThe price for the contents of the package, used for insurance and customs.
weightUnitstringThe weight unit. Default to g.
dimensionUnitstringThe dimension unit. Default to mm.
packageType?stringFor carriers that need a "type".
packagePreset?stringFor carriers that support a pre-defined package name or service.
reference?stringFor carriers that support storing a reference against a package.
description?stringFor carriers that support storing a description against a package.
isDocumentboolWhether the package should be classified as documents, for the carriers that support this definition.