GoSweetSpot: Rates

Included in this document:


Description

Query to get available courier services and rates for the destination.


Requests

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


Headers

access_key : your unique API key provided by GSS.
site_id : which site you are requesting action for.

Parameters

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

Parameter Type Destination
origin object

Sender address - contact model.

destination object

Receiver Address - contact model.

packages object list

An array of packages.

issignaturerequired boolean

Is a signature required?

issaturdaydelivery boolean

Is Saturday delivery?

deliveryreference string

Order reference, max length is 60.


Return format

A JSON object array of available rates. These are grouped into Available, Hidden, and Rejected. The Hidden rates, are available rates but have been filtered out due to user preference, based on cost centre or destination courier preference.

Response

Attribute Type Description
Available
object list

Available Rate.

Rejected

object list

Rejected rates with reason why it rejected (Rejected Rate Model).

ValidationErrors object list

All validation errors (Rate Validation Error Model).



Request example


curl --location 'https://api.gosweetspot.com/api/rates' \
--header 'Content-Type: application/json' \
--header 'access_key: nikhi-74-4EFF2E1BE49E807E89DF1790C4407921CD813B2C1' \
--header 'site_id: 108633' \
--data-raw '{
  "DeliveryReference": "ORDER123",
  "Destination": {
    "Id": 0,
    "Name": "DestinationName",
    "Address": {
      "BuildingName": "",
      "StreetAddress": "DestinationStreetAddress",
      "Suburb": "Avonside",
      "City": "Christchurch",
      "PostCode": "8061",
      "CountryCode": "NZ"
    },
    "ContactPerson": "DestinationContact",
    "PhoneNumber": "123456789",
    "Email": "destinationemail@email.com",
    "DeliveryInstructions": "Desinationdeliveryinstructions"
  },
  "IsSaturdayDelivery": false,
  "IsSignatureRequired": true,
  "IsResidentialDelivery": true,
  "Packages": [
    {
      "Height": 1,
      "Length": 1,
      "Id": 0,
      "Width": 10,
      "Kg": 0.1,
      "Name": "GSS-DLE SATCHEL",
      "PackageCode": "DLE",
      "Type": "Box"
    }
  ]
}'

--header 'Content-Type: application/json'


Response example


{
  "Available": [
    {
      "QuoteId": "3104eb7e-6354-4de4-a250-fa96297282d2",
      "CarrierId": 102,
      "CarrierName": "Post Haste",
      "DeliveryType": "Overnight",
      "Cost": 8.58,
      "ServiceStandard": "By 11am next business day",
      "Comments": "Satchel ",
      "Route": "AKL- LOCAL->AKL- SI",
      "IsRuralDelivery": false,
      "IsSaturdayDelivery": false,
      "IsFreightForward": false,
      "CarrierServiceType": "DomesticCourier"
    },
    {
      "QuoteId": "22401e18-e097-4ac8-9e6f-271734e92a50",
      "CarrierId": 147,
      "CarrierName": "PBT Couriers",
      "DeliveryType": "Overnight",
      "Cost": 8.89,
      "ServiceStandard": "By 12pm next business day",
      "Comments": "Satchel ",
      "Route": "AKL- LOCAL->AKL- SI",
      "IsRuralDelivery": false,
      "IsSaturdayDelivery": false,
      "IsFreightForward": false,
      "CarrierServiceType": "DomesticCourier"
    },
    {
      "QuoteId": "489898a3-85e8-47fe-8184-916dd75b2b79",
      "CarrierId": 205,
      "CarrierName": "Mainstream Freight",
      "DeliveryType": "Standard",
      "Cost": 65.42,
      "ServiceStandard": "Next day within island, 2 day inter island",
      "Comments": "VM ",
      "Route": "MS-AKL->CHRISTCHURCH",
      "IsRuralDelivery": false,
      "IsSaturdayDelivery": false,
      "IsFreightForward": false,
      "CarrierServiceType": "DomesticBulk"
    }
  ],
  "Rejected": [
    {
      "Reason": "MS-AKL -> CHRISTCHURCH: Consignment undersize/weight",
      "Carrier": "Mainstream AKL",
      "DeliveryType": "Standard 1000kg+"
    }
  ],
  "ValidationErrors": {}
}

Did this article answer your question?

Can't find the answer to your question?

Suggest an article