Packfleet logo

Packfleet API (1.0)

Download OpenAPI specification:Download

Automate your Packfleet deliveries using our public API

OAuthController_authorize

Responses
200
get/oauth/authorize

OAuthController_authorizeAfterConfirmation

Responses
200
get/oauth/authorize/confirm

OAuthController_exchangeToken

Responses
201
post/oauth/token

Collections

Create

Creates a collection

Securitybearer
Request
Request Body schema: application/json
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.

Responses
201

The collection has been successfully created.

400
default
post/v1/collections
Request samples
application/json
{
  • "locationId": "string",
  • "date": "2022-05-01",
  • "earliestTime": "12:00",
  • "latestTime": "14:00"
}
Response samples
application/json
{
  • "collection": {
    }
}

List

Lists collections

Securitybearer
Request
query Parameters
startDate
required
string <date>

Local date of collection in ISO8601 date format

Responses
200
default
get/v1/collections
Response samples
application/json
{
  • "collections": [
    ]
}

Read

Reads a collection

Securitybearer
Request
path Parameters
id
required
string
Responses
200
default
get/v1/collections/{id}
Response samples
application/json
{
  • "collection": {
    }
}

Update

Updates a collection

Securitybearer
Request
path Parameters
id
required
string
Request Body schema: application/json
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.

Responses
200
default
patch/v1/collections/{id}
Request samples
application/json
{
  • "locationId": "string",
  • "date": "2022-05-01",
  • "earliestTime": "12:00",
  • "latestTime": "14:00"
}
Response samples
application/json
{
  • "collection": {
    }
}

Delete

Deletes a collection

Securitybearer
Request
path Parameters
id
required
string
Responses
200

Empty response

default
delete/v1/collections/{id}
Response samples
application/json
{ }

Coverage

Coverage check

Returns available postcode areas

Securitybearer
Responses
200
default
get/v1/coverage
Response samples
application/json
{
  • "postcodes": [
    ]
}

Coverage check

Checks Packfleet coverage of given postcodes

Securitybearer
Request
query Parameters
postcodes
required
string

Comma-separated list of postcodes. May or may not contain a space within the postcode

Example: postcodes=AB123CD,XX123YY
Responses
200
default
get/v1/coverage/check
Response samples
application/json
{
  • "postcodes": [
    ]
}

Shipments

Bulk create

Creates multiple shipments

Securitybearer
Request
Request Body schema: application/json
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)
Responses
201

The records have been successfully created.

400
default
post/v1/shipments/bulk
Request samples
application/json
{
  • "collectionId": "string",
  • "collectionLocationId": "string",
  • "shipments": [
    ]
}
Response samples
application/json
{
  • "shipments": [
    ]
}

List

Lists shipments

Securitybearer
Request
query Parameters
limit
number

Return at most limit shipments. Max limit is 200

Example: limit=50
cursor
string

Fetch the next limit shipments after provided cursor

Responses
200
default
get/v1/shipments
Response samples
application/json
{
  • "cursor": "string",
  • "shipments": [
    ]
}

Read

Reads a shipment

Securitybearer
Request
path Parameters
id
required
string
Responses
200
default
get/v1/shipments/{id}
Response samples
application/json
{
  • "shipment": {
    }
}

Update

Updates a shipment

Securitybearer
Request
path Parameters
id
required
string
Request Body schema: application/json
externalReference
string

External reference, for example an order ID

numberOfPacks
number

How many individual packages does this shipment contain? Each package must have a unique label

serviceType
string

Influences the delivery date and time of the shipment, as well as the cost.

Next day shipments are usually delivered 8am-7pm the day following the collections, except Sundays.

Same-day shipments are usually delivered 4pm-10pm on the day of collection (unavailable on weekends)

Enum: "nextDay" "sameDay"
object (UpdateDeliveryDto)
Responses
200
default
patch/v1/shipments/{id}
Request samples
application/json
{
  • "externalReference": "ORDER123",
  • "numberOfPacks": 1,
  • "serviceType": "nextDay",
  • "delivery": {
    }
}
Response samples
application/json
{
  • "shipment": {
    }
}

Delete

Deletes a shipment

Securitybearer
Request
path Parameters
id
required
string
Responses
200
default
delete/v1/shipments/{id}
Response samples
application/json
{ }

Collection Locations

Create

Creates a collection location

Securitybearer
Request
Request Body schema: application/json
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
required
string <HH:MM>

Default "earliest time" for a driver to collect from this location

defaultCollectionLatestTime
required
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

Responses
201

The location has been successfully created.

400
default
post/v1/collection-locations
Request samples
application/json
{
  • "address": {
    },
  • "name": "Warehouse",
  • "phone": "+447912345678",
  • "defaultCollectionEarliestTime": "12:00",
  • "defaultCollectionLatestTime": "15:00"
}
Response samples
application/json
{
  • "collectionLocation": {
    }
}

List

Lists all collection locations for your organisation

Securitybearer
Responses
200
default
get/v1/collection-locations
Response samples
application/json
{
  • "collectionLocations": [
    ]
}

Read

Reads a collection location

Securitybearer
Request
path Parameters
id
required
string
Responses
200
default
get/v1/collection-locations/{id}
Response samples
application/json
{
  • "collectionLocation": {
    }
}

Update

Updates a collection location

Securitybearer
Request
path Parameters
id
required
string
Request Body schema: application/json
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

object (UpdateAddressDto)
Responses
200
default
patch/v1/collection-locations/{id}
Request samples
application/json
{
  • "name": "Warehouse",
  • "phone": "+447912345678",
  • "defaultCollectionEarliestTime": "12:00",
  • "defaultCollectionLatestTime": "15:00",
  • "address": {
    }
}
Response samples
application/json
{ }

Delete

Deletes a collection location

Securitybearer
Request
path Parameters
id
required
string
Responses
200
default
delete/v1/collection-locations/{id}
Response samples
application/json
{ }

Tracking

Tracking

Gets tracking information about a shipment

Securitybearer
Request
path Parameters
trackingNumber
required
string
Responses
200
default
get/v1/tracking/{trackingNumber}
Response samples
application/json
{
  • "shipmentId": "string",
  • "trackingNumber": "beautiful-ship",
  • "status": "SCHEDULED",
  • "deliveryDate": "2022-05-05",
  • "sender": {
    },
  • "recipient": {
    },
  • "packs": [
    ]
}

Shipping Labels

Generate labels

Generates a PDF of shipping labels for provided shipments

Securitybearer
Request
Request Body schema: application/json
shipmentIds
required
Array of strings
labelSize
required
string
Enum: "rect" "square"
Responses
200
default
post/v1/shipping-labels/generate
Request samples
application/json
{
  • "shipmentIds": [
    ],
  • "labelSize": "rect"
}
Response samples
application/json
{
  • "error": {
    }
}