Shift API (1.0.0)
Download OpenAPI specification:Download
Shift for Business - Booking Api
Supports Token based authentication and OAuth2.0
Retrieves the collection of Booking resources.
Retrieves the collection of Booking resources.
Authorizations:
query Parameters
| createdAt[before] | string |
| createdAt[strictly_before] | string |
| createdAt[after] | string |
| createdAt[strictly_after] | string |
| updatedAt[before] | string |
| updatedAt[strictly_before] | string |
| updatedAt[after] | string |
| updatedAt[strictly_after] | string |
| bookingId | string |
| bookingId[] | Array of strings |
Responses
Response samples
- 200
[- {
- "id": "string",
- "bookingId": "string",
- "state": "new"
}
]Creates a Booking resource.
Creates a Booking resource.
Authorizations:
Request Body schema:
The new Booking resource
| serviceType required | string Enum: "P1" "P2" "P3" The Service Type of the Booking. |
Account-write (object) or null (optional) If not supplied, will use the default account of the authenticated API user | |
| reference required | string [ 4 .. 40 ] characters Customer’s reference |
required | Array of objects (InventoryItem-write) non-empty |
Transfer-write (object) or null Required if delivery details are not provided. (FastBacks,
Returns) | |
Transfer-write (object) or null Required if collection details are not provided. | |
| servicePlanId | string or null (optional) Request the booking be processed under a specific service plan enabled on your account. |
| isDraft | boolean false by default. |
Responses
Request samples
- Payload
{- "serviceType": "P1",
- "account": {
- "accountCode": 1234567
}, - "reference": "string",
- "items": [
- {
- "accountInventoryId": "string",
- "customerInventoryReference": "string",
- "customerSku": "string",
- "name": "string",
- "additionalDetail": "string",
- "packageType": "carton",
- "dimensions": {
- "length": 0,
- "height": 0,
- "width": 0,
- "unit": "cm"
}, - "weight": {
- "amount": 1000,
- "unit": "g"
}, - "quantity": 0,
- "hsTariffCode": "stringstri",
- "goodsValue": {
- "currency": "GBP",
- "amount": "25.45"
}
}
], - "collection": {
- "location": {
- "address": {
- "apartment": "86",
- "buildingName": "Shift Group Limited",
- "buildingNumber": "1A",
- "street": "Paul Street",
- "street2": "",
- "city": "London",
- "county": "Greater London",
- "postCode": "EC2A 4NE",
- "countryCode": "GB"
}, - "w3W": "///lifted.march.hunt",
- "coordinates": {
- "longitude": -0.083384,
- "latitude": 51.525563
}, - "accountAddressNumber": "1"
}, - "timeWindow": {
- "start": "2024-04-18T10:00:00Z",
- "end": "2024-04-18T19:00:00Z"
}, - "contact": {
- "name": "John Smith",
- "email": "john.smith@example.com",
- "telephone": "+447890123456",
- "companyName": "Shift Group Ltd"
}, - "requirements": {
- "requiresTailLift": false,
- "minLiftingCrew": 2
}, - "specialInstructions": "Please buzz reception for gate entry code."
}, - "delivery": {
- "location": {
- "address": {
- "apartment": "86",
- "buildingName": "Shift Group Limited",
- "buildingNumber": "1A",
- "street": "Paul Street",
- "street2": "",
- "city": "London",
- "county": "Greater London",
- "postCode": "EC2A 4NE",
- "countryCode": "GB"
}, - "w3W": "///lifted.march.hunt",
- "coordinates": {
- "longitude": -0.083384,
- "latitude": 51.525563
}, - "accountAddressNumber": "1"
}, - "timeWindow": {
- "start": "2024-04-18T10:00:00Z",
- "end": "2024-04-18T19:00:00Z"
}, - "contact": {
- "name": "John Smith",
- "email": "john.smith@example.com",
- "telephone": "+447890123456",
- "companyName": "Shift Group Ltd"
}, - "requirements": {
- "requiresTailLift": false,
- "minLiftingCrew": 2
}, - "specialInstructions": "Please buzz reception for gate entry code."
}, - "servicePlanId": "string",
- "isDraft": true
}Response samples
- 201
{- "bookingId": "string",
- "servicePlanId": "string",
}Cancel a Booking
Creates a Booking resource.
Authorizations:
path Parameters
| bookingId required | string Booking identifier |
Request Body schema:
The new Booking resource
| cancelReason | string or null Enum: "customer_cancelled" "business_cancelled" null The reason for cancellation, can only be omitted if |
| otherReason | string or null Alternative reason for cancellation, if none of the above.
Can only be omitted if |
Responses
Request samples
- Payload
{- "cancelReason": "customer_cancelled",
- "otherReason": "string"
}Response samples
- 200
{- "bookingId": "string",
- "success": true
}Retrieves a Labels from a Booking resource
This endpoint allows you to pass a booking ID through, as well as properties to control what is returned.
Authorizations:
path Parameters
| bookingId required | string Booking identifier |
query Parameters
| labelType required | string Enum: "zpl" "pdf" Example: labelType=zpl The type of label returned in the response |
Responses
Response samples
- 200
{- "bookingId": "string",
- "labelZpl": [
- [
- "^XA....",
- "^XA....",
- "^XA...."
]
], - "labelPdf": "https://s3... ..51241.pdf"
}Retrieves the detailed tracking history for a booking
Retrieves a Booking resource.
Authorizations:
path Parameters
| bookingId required | string Booking identifier |
query Parameters
| sortDescending | boolean Example: sortDescending=true Ordering of tracking events by the event date. Defaults to ascending. |
Responses
Response samples
- 200
{- "trackingRecords": [
- {
- "bookingId": "string",
- "bookingStatus": "new",
- "eventTime": "2019-08-24T14:15:22Z",
- "geo": {
- "longitude": -0.083384,
- "latitude": 51.525563
}, - "consignmentPhase": "main",
- "parentStatus": {
- "status": "string",
- "detail": "string",
- "code": "string"
}, - "legStatus": {
- "status": "string",
- "detail": "string",
- "code": "string"
}
}
]
}