createManifest()
This method creates an end-of-day manifest and should be implemented by carrier apps that support end-of-day manifesting.
Syntax
module.exports = async function createManifest(transaction, manifest) { // Your code here}
import { Transaction, NewManifest, ManifestConfirmation } from "@shipengine/connect";export default async function createManifest( transaction: Transaction, manifest: NewManifest): Promise<ManifestConfirmation> { // Your code here}
Parameters
transaction
A transaction object containing information about the transaction and session state.
manifest
An object containing information needed to create a new end-of-day manifest.
Name | Type | Nullable? | Description |
---|---|---|---|
openDateTime | The start-of-day time, or the | ||
closeDateTime | The end-of-day time, or the | ||
shipments | object[] | This shipments in the manifest.
The meaning of this field varies depending on the carrier's
| |
shipments[]
.trackingNumber | string | The master tracking number for the entire shipment. For single-piece shipments, this will be the same as the package tracking number. For multi-piece shipments, this may be a separate tracking number, or the same tracking number as one of the packages. This string will not contain newline characters. | |
shipments[].identifiers | Your own identifiers for this shipment. | ||
shipments[]
.deliveryService | The delivery service assigned to this shipment. | ||
shipments[].metadata | object | Custom data about this shipment that was previously persisted by the ShipEngine Platform. | |
shipments[].packages | object[] | The list of packages in this shipment. This array will contain at least one value. | |
shipments
.packages[]
.trackingNumber | string | The master tracking number for the entire shipment. For single-piece shipments, this will be the same as the package tracking number. For multi-piece shipments, this may be a separate tracking number, or the same tracking number as one of the packages. This string will not contain newline characers. | |
shipments[]
.packages[]
.identifiers | Your own identifiers for this package. | ||
shipments[]
.packages[]
.packaging | object | The packaging used for this package. | |
shipments[]
.packages[]
.packaging
.id | A UUID that uniquely identifies this packaging. This is the UUID you used in the Packaging Definition file for this packaging type. | ||
shipments[]
.packages[]
.packaging
.identifiers | Your own identifiers for this packaging. | ||
shipments[]
.packages[]
.packaging[]
.code | string | Optional code used to map to what the carrier uses to identify the packaging. The value | |
shipments[]
.packages[]
.dimensions | object | ✔ | The dimensions for the package. This property is not required. If it is provided, it must contain all of its required properties, listed below. |
shipments[]
.packages[]
.dimensions
.length | number | The length of the package. This value may contain decimals. | |
shipments[]
.packages[]
.dimensions
.width | number | The width of the package. This value may contain decimals. | |
shipments[]
.packages[]
.dimensions
.height | number | The height of this package. This value may contain decimals. | |
shipments[]
.packages[]
.dimensions
.unit | string | The unit of measurement for the dimensions. Valid values include the following:
| |
shipments[]
.packages[]
.weight | object | ✔ | The weight of the package. This property is not required. If it is provided, it must contain all of its required properties, listed below. |
shipments[]
.packages[]
.weight
.value | number | The weight value for this package. This value will not contain decimals. | |
shipments[]
.packages[]
.weight
.unit | string | The unit of measure for this weight. Valid values include the following:
| |
shipments[]
.packages[]
.metadata | object | ✔ | Custom data about this package that was persisted by ShipEngine Connect. Must be JSON serializable. |
shipments[].package | object | The first package in the | |
shipFrom | ✔ | The address of the location that is performing end-of-day manifesting. This field is required if the carrier's |
Return Value
manifestConfirmation
An object that contains confirmation that an end-of-day manifest has been created.
Name | Type | Required? | Description |
---|---|---|---|
manifests | object[] | ✔ | An object containing information about this manifest, including the shipments that are included. If not specified, the assumption is that the manifest includes all of the shipments. |
manifests[].shipments | object[] | ✔ | The shipments that are included in this manifest. |
manifests[]
.shipments[]
.trackingNumber | string | The master tracking number for the entire outbound shipment. For single-piece shipments, this will be the same as the package tracking number. For multi-piece shipments, this may be a separate tracking number, or the same tracking number as one of the packages. This string must not contain newline characters. | |
manifests[]
.shipments[]
.identifiers | Your own identifiers for this shipment. | ||
manifests[].id | string | The carrier's manifest ID, if any. This string must not contain newline characters. | |
manifests[].identifiers | Your own identifiers for this manifest. | ||
manifests[].document | object | The digital manifest document, such as a PDF SCAN form. This property is not required. If it is provided, it must contain all of its required properties, listed below. | |
manifests[].document.name | string | The user-friendly name of the document (e.g. "Label", "Customs Form"). This string must not contain newline characters. | |
manifests[].document.type | string | ✔ | The type of document (e.g. label, customs form, SCAN form). Valid values include the following:
|
manifests[].document.size | string | ✔ | The size of document (e.g. label, customs form, SCAN form). Valid values include the following:
|
manifests[]
.document
.format | string | ✔ | The file format of the document. Valid values include the following:
|
manifests[].document.data | ✔ | The document data, in the specified file format. | |
manifests[].notes | object[] | An array of objects containing additional information about this manifest. This property is not required. If it is provided, it must contain all of its required properties, listed below. | |
manifests[].notes[].type | ✔ | The type for this note. | |
manifests[].notes[].text | string | ✔ | The note text itself. |
manifests[].metadata | object | Your custom data about this manifest that will be persisted by the ShipEngine Connect. Must be JSON serializable. | |
manifests[].id | string | The carrier's manifest ID, if any. This string must not contain newline characters. | |
manifests[].identifiers | Your own identifiers for this manifest. | ||
notManifested | object[] | An array of the shipments that could not be manifested, and the reason each shipment was not manifested. This property is not required. If it is provided, it must contain all of its required properties, listed below. | |
notManifested[]
.trackingNumber | string | The master tracking number for the entire shipment. For single-piece shipments, this will be the same as the package tracking number. For multi-piece shipments, this may be a separate tracking number, or the same tracking number as one of the packages. This string will not contain newline characters. | |
notManifested[]
.identifiers | Your own identifiers for this manifest. | ||
notManifested[].code | string | The carrier's error code. This string must not contain newline characters. | |
notManifested[]
.description | string | The carrier's description of the error code. This description should not be specific to this particular shipment. This string must not contain newline characters. | |
notManifested[].notes | object[] | An array of objects containing additional information about those shipments not manifested. | |
notManifested[]
.notes[]
.type | ✔ | The type for this note. | |
notManifested[]
.notes[]
.text | string | ✔ | The note text itself. |
Example
module.exports = async function createManifest(transaction, manifest) { // Your Carrier's code logic goes here}
import { Transaction, NewManifest, ManifestConfirmation} from "@shipengine/connect";export default async function createManifest( transaction: Transaction, manifest: NewManifest): Promise<ManifestConfirmation[]> { // Your Carrier's code logic goes here}