api/bookfreightforwardpickupv3
About 1 min
api/bookfreightforwardpickupv3
Description
Query to book drivers to pick up from the senders of freight forward labels. They will make a best effort attempt to pick up on the same day - however, if you book after 2PM it is recommended that you book again in the morning if they don't pick up on the same day. Each call to this endpoint will ping the drivers, so do not call this endpoint excessively.
This query is supported for the following companies:
- Castle Parcels
- Post Haste Couriers
- New Zealand Couriers
- Fedex
- New Zealand Post
Request
- Method:
POST - Content Type:
application/json - URL:
https://api.gosweetspot.com/api/bookfreightforwardpickupv3
Headers
- access_key : your unique API key provided by GSS.
- site_id : the numeric identifier of your GoSweetSpot site
Parameters
The body of the message should be sent as an Json object.
| Parameter | Type | Description |
|---|---|---|
| Consignments | array of string | The consignment numbers of the consignments to be picked up. This field is mandatory. |
| Instructions | string | Optional instructions for the drivers. |
| CloseTime | integer | Time the pickup location closes expressed as an integer hour, 0-23, e.g. 17 for 5pm. |
| IgnoreIneligibleConsignments | boolean | If true, ignores consignments that are ineligible for booking, such as those already picked up. If false, the endpoint returns an error and no consignments are booked for pickup. |
Return format
A JSON array of Pickup Booking Result results.
Request example
curl --location 'https://api.gosweetspot.com/api/bookfreightforwardpickupv3' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data '{
"consignments": [
"FF100122430",
"00794210392937789725",
"FF100122429"
],
"ignoreIneligibleConsignments": true,
"closeTime": 17,
"instructions": "Pickup from reception"
}'
Response example
[
{
"ConsignmentNos": [
"00794210392937789725"
],
"BookingNo": "123456789",
"Message": "Your booking has been accepted. Please allow 48 hours(2 working days) for collection. Booking ID 123456789."
},
{
"ConsignmentNos": [
"FF100122429",
"FF100122430"
],
"BookingNo": null,
"Message": "Your booking has been accepted. Please allow 48 hours(2 working days) for collection."
}
]