ratesquery/availablerates [DEPRECATED]
September 25, 2023About 1 min
ratesquery/availablerates [DEPRECATED]
Description
This endpoint is deprecated, please use DELETE
api/rate instead.
Query to get available courier services and rates for the destination.
Request
- Method:
POST
- Content Type:
application/json
- URL:
https://api.gosweetspot.com/ratesquery/availablerates
Headers
- access_key : your unqiue api key provided by GSS.
- site_id : which site you are requesting action for.
Parameters
Parameter | Type | Description |
---|---|---|
origin | object | Leave blank when using site address, or provide one for freight forwards (Contact Model). |
destination | object | Recepient address details (Contact Model). |
packages | object list | Array of package sizes (Rate Package Model). |
issignaturerequired | boolean | Is signature required? |
issaturdaydelivery | boolean | Is Saturday delivery? |
deliveryreference | string | Order reference, max lengther is 60. |
.
Return format
A JSON object array of available rates. These are group into Available, Hidden, 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 --request POST 'https://api.gosweetspot.com/ratesquery/availablerates' \
--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"
}
]
}'
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": {}
}