Skip to main content

api/labels/download

About 1 min

api/labels/download

Description

Query to book a driver to pick up from your location. 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 driver, so do not call this endpoint excessively.

This query is supported for the following companies:

  • Castle Parcels
  • Post Haste Couriers
  • New Zealand Couriers
  • Mainstream Freight
  • Fedex
  • New Zealand Post
  • First Global Logistics

Mainstream Freight

When booking for Mainstream Freight you must manifest the consignments first using this endpoint..

TIL Freight

TIL Freight cannot be booked through this endpoint. However, when you manifest TIL Freight consignments it will be booked at the same time. Using this endpoint for manifesting.

Request

  • Method: POST
  • Content Type: application/json
  • URL: https://api.gosweetspot.com/api/bookpickup

Headers

  • access_key : your unqiue api key provided by GSS.
  • site_id : which site you are requesting action for.

Parameters

The body of the message should be sent as an Json object.

ParameterTypeDescription
CarrierstringSpecify the carrier to book a pickup for. Supported values: "CastleParcel", "PostHaste", "NZCouriers", "Mainstream", "FedEx", "NZPost", "FirstGlobal". This value can be obtained from the AvailableServices endpoint. Mandatory field.
Consignmentsarray of stringRepresenting the consignments to be picked up. This field is mandatory when booking for Mainstream, FedEx and NZPost. You can include it for other carriers but it will do nothing.
TotalKgdecimalAindicating the total weight of parcels. This field is mandatory when booking for FirstGlobal. You can include it for other carriers but it will do nothing.
PartsintegerIndicating the total number of parcels. This field is mandatory when booking for FirstGlobal. You can include it for other carriers but it will do nothing.

Return format

A string indicating whether or not the pickup request was lodged successfully.

Request example

Please note, some fields are mandatory for different carriers.

FedEx, NZ Post, Manistream

curl --location 'https://api.gosweetspot.com/api/bookpickup' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data '{
    "Carrier": "FedEx",
    "Consignments": [
        "789663088020"
    ]
}'

First Global

curl --location 'https://api.gosweetspot.com/api/bookpickup' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data '
{
  "Carrier": "FirstGlobal",
  "TotalKg": 1.5,
  "Parts": 1
}'

Others

curl --location 'https://api.gosweetspot.com/api/bookpickup' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data '{
  "Carrier": "PostHaste"
}'

Response example

Binary blocks below have been trimmed for presentation.

Success. Your booking has been accepted. #NC12345678
Last update: