Download OpenAPI specification:Download
Automate your Packfleet deliveries using our public API
The Packfleet API uses access tokens to authenticate requests. Packfleet offers two methods for obtaining the access tokens:
Once you have obtained an access token it should be used by providing the following header in your API calls.
Header Parameter | Value |
---|---|
Authorization | Valid access token following the format: Bearer <Access Token> |
For more information on how to generate API keys please see this page.
bearer
JWT
OAuth can be useful if building an integration that is to be used by multiple Packfleet accounts as it provides a flow to generate access tokens. If this is something that you would like to consider using please reach out to our customer support team.
When using OAuth to generate your access tokens please be aware that these access tokens can be used for 24 hours before they need to be refreshed. This can be achieved by calling /oauth/authorize with grant_type
set to refresh_token
and the refresh token in the refresh_token
field. Refresh tokens last for 3 months, if they are not used within this time then the user will need to complete the authentication flow again. Refreshing the access token will assign a new access token and refresh token pair with an updated expiry time.
Prerequisites
The first step is to create a collection location so we know where to pick the shipment up from and to enable us to provide accurate rates. To do this using the Packfleet dashboard:
https://app.packfleet.com/locations/cloc_YOUR_ID_HERE/edit
.
Alternatively you can create a collection location using the API, for more information see here. You can also optionally set up a recurring collection or create a one-off collection now.Using the Bulk create endpoint create one or more shipments. Make sure that:
collectionId
field blankbrandId
if you want to override the sender details (for example if you are acting on behalf of other brands) and you have previously created a brandThis endpoint will include the shipment IDs that you will need when generating your labels, they will have the ship_
prefix. The response will not contain the label PDF, this must be done using the process described in the next step.
Now that you have created one or more shipments you can generate the labels. This is done using the generate labels endpoint. You can choose to generate the labels as PDF, PNG or raw HTML files. Packfleet currently supported the rect
(4” x 6”) and square
(4” x 4”) formats.
Changes the status of a shipment to help with testing.
When using this API and setting the shipment status to "OUT_FOR_DELIVERY", the tracking API returns "simulated" live tracking information for the shipment. If the status is set to "DELIVERED", a simulated proof of delivery is also available.
id required | string Example: ship_clb19k5yl00006aul274377nx The shipment that you wish to update |
status required | string Enum: "SCHEDULED" "OUT_FOR_COLLECTION" "COLLECTED" "IN_DEPOT" "EXTERNAL_CARRIER_COLLECTED" "EXTERNAL_CARRIER_IN_TRANSIT" "OUT_FOR_DELIVERY" "AVAILABLE_FOR_RECIPIENT_PICKUP" "DELIVERED" "FAILED_DELIVERY" "ON_HOLD" "TO_RETURN_TO_SENDER" "RETURNED_TO_SENDER" "UNDELIVERABLE" Changes the status this shipment to this value. This will also change the status of all packs within the shipment to this value. Only available in the sandbox environment! |
{- "status": "SCHEDULED"
}
{ }
id required | string |
organizationId required | string |
name required | string Name of the brand that is displayed in notifications and on the tracking page |
emoji required | string Emoji that is used on the tracking page, if not set then 📦 is used instead |
createdAt required | string <date-time> ISO8601 Datetime of creation |
updatedAt required | string <date-time> ISO8601 datetime of last update |
{- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
Create a new brand which can be used to override the details of a shipments sender. This can be used to ship packages on behalf of another merchant
name required | string Name of the brand that is displayed in notifications and on the tracking page |
emoji | string Emoji that is used on the tracking page, if not set then 📦 is used instead |
{- "name": "string",
- "emoji": "string"
}
{- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
{- "brands": [
- {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
]
}
{- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
Updates the details of an already created brand
id required | string |
name | string Name of the brand that is displayed in notifications and on the tracking page |
emoji | string Emoji that is used on the tracking page, if not set then 📦 is used instead |
{- "name": "string",
- "emoji": "string"
}
{- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
id required | string |
organizationId required | string |
date required | string <date> Local date of when the collection is booked for |
earliestTime | string <HH:MM> Earliest local time the driver should arrive |
latestTime | string <HH:MM> Latest local time the driver should arrive |
required | object (CollectionLocation) |
createdAt required | string <date-time> ISO8601 datetime of creation |
updatedAt required | string <date-time> ISO8601 datetime of last update |
{- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
Creates a collection
locationId required | string The location where the collection should take place |
date required | string Date of the collection |
earliestTime | string <HH:MM> Earliest time the collection should take place. If not provided, the default earliest time value from the collection location is used |
latestTime | string <HH:MM> Latest time the collection should take place. Must be at least 1 hour greater than earliestTime. If not provided, the default latest time value from the collection location is used. |
{- "locationId": "string",
- "date": "2022-05-01",
- "earliestTime": "12:00",
- "latestTime": "14:00"
}
{- "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
Lists collections
startDate required | string <date> Local date of collection. Must in the format yyyy-mm-dd |
{- "collections": [
- {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
]
}
{- "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
Updates a collection
id required | string |
locationId | string The location where the collection should take place |
date | string Date of the collection |
earliestTime | string <HH:MM> Earliest time the collection should take place. If not provided, the default earliest time value from the collection location is used |
latestTime | string <HH:MM> Latest time the collection should take place. Must be at least 1 hour greater than earliestTime. If not provided, the default latest time value from the collection location is used. |
{- "locationId": "string",
- "date": "2022-05-01",
- "earliestTime": "12:00",
- "latestTime": "14:00"
}
{- "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
Assign multiple shipments to the collection
id required | string |
shipmentIds required | Array of strings IDs of the shipments that should be assigned to this collection |
{- "shipmentIds": "ship_clb19k5yl00006aul274377nx,ship_clb19k9j800006aul617id4nf"
}
{- "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
id required | string |
organizationId required | string |
name | string Nickname of the collection location |
phone | string <E.164> Phone number of a point of contact at this location |
defaultCollectionEarliestTime | string <HH:MM> Default "earliest time" for a driver to collect from this location |
defaultCollectionLatestTime | string <HH:MM> Default "latest time" for a driver to collect from this location |
required | object (Address) |
createdAt required | string <date-time> ISO8601 Datetime of creation |
updatedAt required | string <date-time> ISO8601 datetime of last update |
{- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
Creates a collection location
required | object (AddressDto) |
name required | string Nickname of location, for your convenience |
phone required | string <E.164> Contact number for collections at this location |
defaultCollectionEarliestTime | string <HH:MM> Default "earliest time" for a driver to collect from this location |
defaultCollectionLatestTime | string <HH:MM> Default "latest time" for a driver to collect from this location. Must be at least 1 hour greater than the earliest time |
skipRecurringCollectionsOnBankHolidays | boolean If set to true, recurring collections at this location will not be scheduled on bank holidays. Default to true. |
{- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "postCode": "A12 3BC",
- "city": "London"
}, - "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "skipRecurringCollectionsOnBankHolidays": true
}
{- "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
{- "collectionLocations": [
- {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
]
}
{- "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}
Updates a collection location
id required | string |
name | string Nickname of location, for your convenience |
phone | string <E.164> Contact number for collections at this location |
defaultCollectionEarliestTime | string <HH:MM> Default "earliest time" for a driver to collect from this location |
defaultCollectionLatestTime | string <HH:MM> Default "latest time" for a driver to collect from this location. Must be at least 1 hour greater than the earliest time |
skipRecurringCollectionsOnBankHolidays | boolean If set to true, recurring collections at this location will not be scheduled on bank holidays. Default to true. |
object (UpdateAddressDto) |
{- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "skipRecurringCollectionsOnBankHolidays": true,
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "postCode": "A12 3BC",
- "city": "London"
}
}
{ }
Checks if Packfleet delivers to the given postcodes
postcodes required | Array of strings Example: postcodes=AB123CD,XX123YY Comma-separated list of postcodes. May or may not contain a space within the postcode |
{- "postcodes": [
- {
- "postcode": "SE16 2DB",
- "inCoverageArea": true
}
]
}
id required | string |
organizationId required | string |
brandId | string |
trackingNumber required | string Hyphen-separated unique words to identify this shipment |
trackingUrl required | string |
externalReference | string |
externalId | string |
createdAt required | string <date-time> ISO8601 datetime of creation |
updatedAt required | string <date-time> ISO8601 datetime of last update |
status required | string Enum: "SCHEDULED" "OUT_FOR_COLLECTION" "COLLECTED" "IN_DEPOT" "EXTERNAL_CARRIER_COLLECTED" "EXTERNAL_CARRIER_IN_TRANSIT" "OUT_FOR_DELIVERY" "AVAILABLE_FOR_RECIPIENT_PICKUP" "DELIVERED" "FAILED_DELIVERY" "ON_HOLD" "TO_RETURN_TO_SENDER" "RETURNED_TO_SENDER" "UNDELIVERABLE" Overall status of the shipment. This reflects the majority status of each Pack within the Shipment, or the more advanced status if there is a tie. For more detail about how a shipment was delivered or why it failed check proofsOfDelivery |
statusDescription required | string Overall status of the shipment as a human readable value |
serviceType required | string Enum: "nextDay" "sameDay" "twoDay" "nextDay12pm" "nextDay1030am" "nextDay9am" "saturday" "saturday12pm" "saturday1030am" "saturday9am" "sunday" "sunday12pm" "sunday1030am" "sunday9am" "threeDay" |
gift | boolean If true, we'll tell the recipient to expect a gift when sending notifications. |
object (Brand) | |
required | object (Collection) |
required | object (CollectionLocation) |
required | object (Delivery) |
required | Array of objects (Pack) |
Array of objects (ProofOfDelivery) Contains more detailed information about how a shipment was delivered or why it failed along. May also contain images taken by the driver of the delivery attempt. Only populated if shipment has been delivered or failed delivery in the past. One ProofOfDelivery per delivery attempt |
{- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
Creates multiple shipments
This endpoint has a default rate limit of 100 requests/minute. To increase this please contact Packfleet support.
collectionId | string The collection ID when the shipment should be collected. Either the collectionId or collectionLocationId MUST be present |
collectionLocationId | string The collection location ID where the shipment should be collected from. Either the collectionId or collectionLocationId MUST be present |
required | Array of objects (CreateShipmentDto) |
{- "collectionLocationId": "cloc_REPLACE_ME",
- "shipments": [
- {
- "externalReference": "ORDER123",
- "delivery": {
- "notes": "Delivery Notes",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "recipientDetails": {
- "name": "Test Name",
- "address": {
- "line1": "Buckingham Palace",
- "postCode": "SW1A 1AA",
- "city": "London"
}, - "phone": "+441234567890",
- "email": "hello@example.com"
}
}, - "numberOfPacks": 1,
- "serviceType": "nextDay"
}
]
}
{- "shipments": [
- {
- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
]
}
Lists shipments
limit | number Example: limit=50 Return at most limit shipments. Max limit is 200 |
cursor | string Fetch the next limit shipments after provided cursor |
{- "cursor": "string",
- "shipments": [
- {
- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
]
}
{- "shipment": {
- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
}
Updates a shipment
id required | string |
brandId | string An optional ID of a brand to be used for this shipment, if present the brand details will be used in notifications and on the tracking page in place of your organizations default details. This can be useful if shipping on behalf of another merchant or if you operate multiple stores |
externalReference | string External reference included in shipment label, for example an order ID |
externalId | string External system identifier, this is not shown on the shipment label |
externalStoreType | string Enum: "BIGCOMMERCE" "DEMO_SHOPIFY" "LINNWORKS" "MAGENTO" "MINTSOFT" "SHOPIFY" "SQUARESPACE" "VEEQO" "WOOCOMMERCE" The eCommerce platform used for this order if one is used |
externalStoreReference | string Identifier used to determine what store the shipment is being booked for, this can be used to determine what branding information should be used when delivering for multiple stores through a single Packfleet account.
|
numberOfPacks | number How many individual packages does this shipment contain? Each package must have a unique label. Either packs or numberOfPacks must be present, numberOfPacks can be used if you just need to specifiy the number of packs being shipped and don't need to validate the pack dimensions/weight |
Array of objects (PackDto) Information about the individual packs. Either packs or numberOfPacks must be present, packs should be used if you are able to provide the pack dimensions/weight otherwise use numberOfPacks | |
serviceType | string Enum: "nextDay" "sameDay" "twoDay" "nextDay12pm" "nextDay1030am" "nextDay9am" "saturday" "saturday12pm" "saturday1030am" "saturday9am" "sunday" "sunday12pm" "sunday1030am" "sunday9am" "threeDay" Influences the delivery date and time of the shipment, as well as the cost. Next day shipments are usually delivered 7am-10pm the day following the collections, except Sundays. |
gift | boolean If true, we'll tell the recipient to expect a gift when sending notifications. |
object (UpdateDeliveryDto) | |
collectionId | string The collection ID when the shipment should be collected |
collectionLocationId | string The collection location ID where the shipment should be collected from |
{- "brandId": "brand_REPLACE_ME",
- "externalReference": "ORDER123",
- "externalId": "string",
- "externalStoreType": "SHOPIFY",
- "externalStoreReference": "string",
- "numberOfPacks": 1,
- "packs": [
- {
- "weight": 1,
- "dimensions": {
- "length": 1,
- "width": 1,
- "height": 1
}
}
], - "serviceType": "nextDay",
- "gift": true,
- "delivery": {
- "notes": "string",
- "leaveInSafePlaceNotes": "string",
- "leaveWithNeighborNotes": "string",
- "dontLeaveShipmentInSafePlace": true,
- "dontDeliverShipmentToReception": true,
- "dontLeaveShipmentWithNeighbour": true,
- "preferences": [
- "deliverToResident",
- "deliverToReception",
- "leaveInSafePlace",
- "leaveWithNeighbor"
], - "earliestDate": "2022-05-01",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "confirmationCode": "stri",
- "recipientDetails": {
- "name": "string",
- "companyName": "string",
- "phone": "+441234567890",
- "email": "hello@example.com",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "postCode": "A12 3BC",
- "city": "London"
}
}
}, - "collectionId": "col_REPLACE_ME",
- "collectionLocationId": "cloc_REPLACE_ME"
}
{- "shipment": {
- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
}
Changes the delivery date of a shipment. This can be done at any point before the shipment is in a delivered state.
id required | string |
deliveryDate required | string <date> The new delivery date. Must be in the future, and within the next 30 days. Must in the format yyyy-mm-dd |
{- "deliveryDate": "2023-03-28"
}
{- "shipment": {
- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
}
Changes the delivery address of a shipment. This can be done at any point before the shipment is in a delivered state. Changing the address after weʼve collected your shipment may push the delivery date to the next available date.
id required | string |
required | object The new delivery address. Must be a valid address within Packfleet’s coverage area |
{- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "postCode": "A12 3BC",
- "city": "London"
}
}
{- "shipment": {
- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
}
Generates a PDF of shipping labels for provided shipments
Accept | string Enum: "application/pdf" "text/html" "image/png" Specify the format that the labels should be generated in. Defaults to 'application/pdf' |
shipmentIds required | Array of strings The shipments that you wish the labels to be generated for. If the label format is image/png then exactly one ID must be specified |
packIds | Array of strings The packs that you wish the labels to be generated for. If empty then the all labels will be generated for the requested shipments. If the label format is image/png then exactly one ID must be specified |
labelSize required | string Enum: "rect" "square" |
{- "shipmentIds": [
- "shipment_clhjjoidk000058ulamcw11l3"
], - "labelSize": "rect"
}
{- "error": {
- "code": "internal-server-error",
- "message": "string",
- "status": 500,
- "context": {
- "<object_id>": "<Specific error message>"
}
}
}
Fetch the available rates to deliver the requested packs
numberOfPacks | integer How many individual packages does this shipment contain? Each package must have a unique label. Either packs or numberOfPacks must be present |
Array of objects (PackDto) Information about the individual packs. Either packs or numberOfPacks must be present | |
collectionDate | string <date> Date that the shipment will be collected on. Must in the format yyyy-mm-dd |
earliestTime | string <HH:MM> Earliest time the delivery should take place. May incur an additional charge |
latestTime | string <HH:MM> Latest time the delivery should take place. Must be at least 3 hours after earliestDeliveryTime, if set. May incur an additional charge |
timeWindows | Array of strings <HH:MM> [ items <HH:MM > ] List of possible time windows that the delivery should take place. The response will contain a rate for each time window. This is equivalent to using earliestTime/latestTime however allows multiple windows to be calculated in a single request |
required | object Destination that the shipment is being collected from |
required | object Destination that the shipment is being delivered to |
{- "numberOfPacks": 1,
- "packs": [
- {
- "weight": 1,
- "dimensions": {
- "length": 1,
- "width": 1,
- "height": 1
}
}
], - "collectionDate": "2022-05-01",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "timeWindows": "15:00",
- "originAddress": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "postCode": "A12 3BC",
- "city": "London"
}, - "destinationAddress": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "postCode": "A12 3BC",
- "city": "London"
}
}
{- "rates": [
- {
- "serviceType": "nextDay",
- "amount": {
- "amount": 0,
- "currency": "GBP"
}, - "earliest_collection_time": "2022-01-02T12:34:56.123Z",
- "earliest_delivery_time": "2022-01-02T12:34:56.123Z",
- "earliestTime": "12:00",
- "latestTime": "15:00"
}
]
}
shipmentId required | string |
trackingNumber required | string A unique two or three word phrase representing this shipment |
trackingUrl required | string |
status required | string Enum: "SCHEDULED" "OUT_FOR_COLLECTION" "COLLECTED" "IN_DEPOT" "EXTERNAL_CARRIER_COLLECTED" "EXTERNAL_CARRIER_IN_TRANSIT" "OUT_FOR_DELIVERY" "AVAILABLE_FOR_RECIPIENT_PICKUP" "DELIVERED" "FAILED_DELIVERY" "ON_HOLD" "TO_RETURN_TO_SENDER" "RETURNED_TO_SENDER" "UNDELIVERABLE" Overall status of the shipment. If some packs within the shipment are in a different state, the shipment reflects the majority status, or the "later" status in case of a tie. For more detail about how a shipment was delivered or why it failed check proofOfDelivery. |
deliveryDate | string <date> Local date of delivery |
required | object Details for the sender of the shipment |
required | object Details for the recipient of the shipment |
object Information about the status of the shipment, present once the shipment has been assigned to a route | |
object Evidence of the most recent shipment attempt and contains more detailed information about how a shipment was delivered or why it failed along. May also contain images taken by the driver of the delivery attempt | |
required | Array of objects (PackTracking) Each individual pack within a shipment is tracked separately |
{- "shipmentId": "string",
- "trackingNumber": "beautiful-ship",
- "status": "SCHEDULED",
- "deliveryDate": "2022-05-05",
- "sender": {
- "name": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}
}, - "recipient": {
- "name": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}
}, - "delivery": {
- "driverName": "string",
- "driverLocation": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "stopNumber": 0,
- "driverAtStop": 0,
- "totalStops": 0,
- "timeWindowStart": "2022-05-01T12:34:56.789Z",
- "timeWindowEnd": "2022-05-01T12:34:56.789Z",
- "estimatedTime": "2022-05-01T12:34:56.789Z",
- "completedAt": "2022-05-01T12:34:56.789Z"
}, - "proofOfDelivery": {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED",
- "trackingHistory": [
- {
- "status": "SCHEDULED",
- "timestamp": "2022-05-01T12:34:56.789Z"
}
]
}
]
}
Gets tracking information about a shipment
trackingNumber required | string |
{- "shipmentId": "string",
- "trackingNumber": "beautiful-ship",
- "status": "SCHEDULED",
- "deliveryDate": "2022-05-05",
- "sender": {
- "name": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}
}, - "recipient": {
- "name": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}
}, - "delivery": {
- "driverName": "string",
- "driverLocation": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "stopNumber": 0,
- "driverAtStop": 0,
- "totalStops": 0,
- "timeWindowStart": "2022-05-01T12:34:56.789Z",
- "timeWindowEnd": "2022-05-01T12:34:56.789Z",
- "estimatedTime": "2022-05-01T12:34:56.789Z",
- "completedAt": "2022-05-01T12:34:56.789Z"
}, - "proofOfDelivery": {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED",
- "trackingHistory": [
- {
- "status": "SCHEDULED",
- "timestamp": "2022-05-01T12:34:56.789Z"
}
]
}
]
}
Gets tracking information about up to 50 shipments
trackingNumbers required | Array of strings Example: trackingNumbers=first-phrase,second-phrase Comma-separated list of tracking numbers |
{- "shipments": [
- {
- "shipmentId": "string",
- "trackingNumber": "beautiful-ship",
- "status": "SCHEDULED",
- "deliveryDate": "2022-05-05",
- "sender": {
- "name": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}
}, - "recipient": {
- "name": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}
}, - "delivery": {
- "driverName": "string",
- "driverLocation": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "stopNumber": 0,
- "driverAtStop": 0,
- "totalStops": 0,
- "timeWindowStart": "2022-05-01T12:34:56.789Z",
- "timeWindowEnd": "2022-05-01T12:34:56.789Z",
- "estimatedTime": "2022-05-01T12:34:56.789Z",
- "completedAt": "2022-05-01T12:34:56.789Z"
}, - "proofOfDelivery": {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED",
- "trackingHistory": [
- {
- "status": "SCHEDULED",
- "timestamp": "2022-05-01T12:34:56.789Z"
}
]
}
]
}
]
}
Gets tracking information about a collection
collectionId required | string |
{- "collectionId": "string",
- "status": "SCHEDULED",
- "date": "2022-01-02",
- "location": {
- "name": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}
}, - "collection": {
- "driverName": "string",
- "driverLocation": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "stopNumber": 0,
- "driverAtStop": 0,
- "totalStops": 0,
- "timeWindowStart": "2022-05-01T12:34:56.789Z",
- "timeWindowEnd": "2022-05-01T12:34:56.789Z",
- "estimatedTime": "2022-05-01T12:34:56.789Z",
- "completedAt": "2022-05-01T12:34:56.789Z"
}, - "proofOfCollection": {
- "notes": "string",
- "status": "COLLECTED",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
}
Webhooks can be used to receive notifications to objects such as Shipments and Collections whenever they change. Once you have registered a webhook you will start receiving POST requests to the configured endpoint which can be used to trigger business logic instead of relying on polling the API periodically.
id required | string |
organizationId required | string |
status required | string Enum: "ENABLED" "DISABLED" Current status of the webhook. If disabled no requests will be made to the webhook |
topic required | string Name of the topic the webhook is subscribed to |
url required | string Endpoint that the webhook is configured to send data to |
version required | string Value: "V1" The version of the API that should be used to construct webhook requests |
lastSuccessfulRequest required | string <date-time> ISO8601 datetime of last successful call to the webhook endpoint |
createdAt required | string <date-time> ISO8601 Datetime of creation |
updatedAt required | string <date-time> ISO8601 datetime of last update |
{- "id": "webhook_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "status": "ENABLED",
- "topic": "shipment.created",
- "version": "V1",
- "lastSuccessfulRequest": "2022-01-02T12:34:56.123Z",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
topic required | string Enum: "shipment.created" "shipment.updated" "shipment.deleted" "collection.created" "collection.updated" "collection.deleted" Name of the topic the webhook is subscribed to |
url required | string Endpoint that the webhook is configured to send data to |
version required | string Value: "V1" The version of the API that should be used to construct webhook requests |
{- "topic": "shipment.created",
- "version": "V1"
}
{- "webhook": {
- "id": "webhook_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "status": "ENABLED",
- "topic": "shipment.created",
- "version": "V1",
- "lastSuccessfulRequest": "2022-01-02T12:34:56.123Z",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "secret": "18A1E3894B3B9549EF5B18A4764ED7B888B15474411855BE424518C68FB4EC87"
}
{- "id": "string",
- "organizationId": "string",
- "brandId": "string",
- "trackingNumber": "beautiful-ship",
- "externalReference": "string",
- "externalId": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z",
- "status": "SCHEDULED",
- "statusDescription": "string",
- "serviceType": "nextDay",
- "gift": true,
- "brand": {
- "id": "brand_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "name": "string",
- "emoji": "string",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collection": {
- "id": "string",
- "organizationId": "string",
- "date": "2022-01-02",
- "earliestTime": "10:30",
- "latestTime": "14:30",
- "location": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "collectionLocation": {
- "id": "string",
- "organizationId": "string",
- "name": "Warehouse",
- "phone": "+447912345678",
- "defaultCollectionEarliestTime": "12:00",
- "defaultCollectionLatestTime": "15:00",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "delivery": {
- "date": "2022-01-02",
- "notes": "string",
- "location": {
- "name": "string",
- "companyName": "string",
- "phone": "string",
- "email": "string",
- "address": {
- "line1": "53 Kingsborough Road",
- "line2": "string",
- "line3": "string",
- "city": "London",
- "countryCode": "GB",
- "postCode": "A12 3BC",
- "latitude": "51.516243",
- "longitude": "-0.015327"
}, - "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "confirmationCode": "1234",
- "earliestTime": "12:00",
- "latestTime": "15:00",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}, - "packs": [
- {
- "id": "string",
- "trackingNumber": "beautiful-ship/2",
- "status": "SCHEDULED"
}
], - "proofsOfDelivery": [
- {
- "notes": "string",
- "status": "DELIVERED_TO_RECIPIENT",
- "coordinates": {
- "latitude": 51.512435,
- "longitude": -0.015243
}, - "imageUrls": [
- "string"
], - "createdAt": "2022-01-02T12:34:56.123Z"
}
]
}
{- "webhooks": [
- {
- "id": "webhook_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "status": "ENABLED",
- "topic": "shipment.created",
- "version": "V1",
- "lastSuccessfulRequest": "2022-01-02T12:34:56.123Z",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
]
}
{- "webhook": {
- "id": "webhook_cl8yhq9vm0000rful6wgz8jw5",
- "organizationId": "org_cl8yhq10a0000rful4xomfypk",
- "status": "ENABLED",
- "topic": "shipment.created",
- "version": "V1",
- "lastSuccessfulRequest": "2022-01-02T12:34:56.123Z",
- "createdAt": "2022-01-02T12:34:56.123Z",
- "updatedAt": "2022-01-02T12:34:56.123Z"
}
}