GoSweetSpot: Shipments

Included in this document:


Get Shipment Updates

Description

Get status updates for shipments.

Requests

Method: GET
Content Type: application/json
URL: https://help.nzcouriers.co.nz/gosweetspot-api-integration/gosweetspot-shipments

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 Description
shipments string

Comma separated list of consignment numbers to apply filter on.

ordernumbers string

Comma separated list of order numbers to apply filter on.

lastupdateminutc string UTC formatted date and time to filter the shipments. This field is for the earliest date.
lastupdatemaxutc string UTC formatted date and time to filter the shipments. This field is for the latest date.
includeDangerousGoodsFlag boolean

Optional, true/false flag for the request to populate IsDangerousGoods in response. Return null if the flag is set to false or missing.

page integer

Optional: page number defaults to 1.

pagesize integer

Optional: number of shipments to return per page, max 250, defaults to 250.

when the shipments or ordernumbers values is provided, the lastupdateminutc & lastupdatemaxutc values are ignored.

Return format

A JSON object with the created shipment details.

Response

Attribute Type Description
page integer

Current page number.

page integer

Total number of pages.

pagesize integer

How many records are returned per result set.

results object list A list of up to 250 shipments.

Request example


curl --location 'https://api.gosweetspot.com/api/shipments?lastupdateminutc=2015-08-13%252008%3A15%3A13&page=1&shipments=ABC0001%2CABC0002%2CABC20303' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json'

Response example


{
  "Page": 1,
  "PageSize": 2,
  "Pages": 1,
  "Results": [
    {
      "OriginZone": "AKLW",
      "DestinationZone": "AKL",
      "Origin": {
        "Building": "**** TEST ********* TEST *****",
        "Address": "**** TEST ********* TEST *****",
        "Name": "TEST ACCOUNT",
        "Suburb": "MT ROSKILL",
        "Town": "AUCKLAND",
        "PostalCode": "0600",
        "Country": "NZ",
        "ContactName": "TEST",
        "ContactPhone": "123456",
        "Email": ""
      },
      "Destination": {
        "Building": "GOSWEETSPOT",
        "Address": "102 STATION ROAD EAST",
        "Name": "DON ZHANG",
        "Suburb": "PENROSE",
        "Town": "AUCKLAND",
        "PostalCode": "1061",
        "Country": "NZ",
        "ContactName": "RECEIVER NAME",
        "ContactPhone": "212563080",
        "Email": ""
      },
      "CostCentre": "TEST COST CENTRE ONE",
      "Carrier": "Post Haste - AKL - 2011",
      "DeliveryInstructions": "",
      "IsSaturdayDelivery": false,
      "IsRuralDelivery": false,
      "IsPOBox": false,
      "IsDangerousGoods": null,
      "CustomerRef": "#1029",
      "TotalCubic": 0.022,
      "TotalKg": 5.5,
      "Parts": 1,
      "IsSignatureRequired": true,
      "IsFreightForward": false,
      "ManifestedAt": null,
      "Items": [
        {
          "PartNo": 1,
          "LengthCm": 47,
          "WidthCm": 47,
          "HeightCm": 10,
          "WeightKg": 5.5,
          "PackageName": "SMALL BOX",
          "Charge_LineTotal": 9.98,
          "PickedAt": null,
          "DeliveredAt": null,
          "RatingCode": "MS"
        }
      ],
      "ConsignmentNo": "APD00020626",
      "Status": null,
      "Picked": null,
      "Delivered": null,
      "Tracking": "https://gosweetspot.com/track/108633-APD00020626",
      "Events": [
        {
          "EventDT": "2019-10-10T22:57:57.047",
          "Code": "CR",
          "Description": "Tracking number allocated & order ready",
          "Location": "AUCKLAND",
          "Part": "APD0002062601"
        },
        {
          "EventDT": "2019-10-10T22:57:57.047",
          "Code": "COUR",
          "Description": "Picked up",
          "Location": "PENROSE (AKL)",
          "Part": "APD0002062601"
        },
        {
          "EventDT": "2019-10-10T22:57:57.047",
          "Code": "COURU",
          "Description": "On courier vehicle for delivery",
          "Location": "Glenfield Industrial Wairau Valley (AKL)",
          "Part": "APD0002062601"
        },
        {
          "EventDT": "2019-10-10T22:57:57.047",
          "Code": "DEL",
          "Description": "Delivered to ANDREW",
          "Location": "Glenfield Industrial Wairau Valley (AKL)",
          "Part": "APD0002062601"
        }
      ],
      "ManifestNumber": "ABCD",
      "TotalCost": 9.98,
      "CreatedUtc": "2019-10-10T22:57:57.047",
      "PackingSlipNo": "#1029",
      "ManualTicket": false,
      "Consignee": "RECEIVER NAME"
    },
    {
      "OriginZone": "AKLW",
      "DestinationZone": "AKL",
      "Origin": {
        "Building": "**** TEST ********* TEST *****",
        "Address": "**** TEST ********* TEST *****",
        "Name": "TEST ACCOUNT",
        "Suburb": "MT ROSKILL",
        "Town": "AUCKLAND",
        "PostalCode": "0600",
        "Country": "NZ",
        "ContactName": "TEST",
        "ContactPhone": "123456",
        "Email": ""
      },
      "Destination": {
        "Building": "GOSWEETSPOT",
        "Address": "101 STATION ROAD EAST",
        "Name": "RECEIVER NAME",
        "Suburb": "PENROSE",
        "Town": "AUCKLAND",
        "PostalCode": "1061",
        "Country": "NZ",
        "ContactName": "RECEIVER NAME",
        "ContactPhone": "212563080",
        "Email": ""
      },
      "CostCentre": "TEST COST CENTRE ONE",
      "Carrier": "Post Haste - AKL - 2011",
      "DeliveryInstructions": "",
      "IsSaturdayDelivery": false,
      "IsRuralDelivery": false,
      "IsPOBox": false,
      "IsDangerousGoods": null,
      "CustomerRef": "#1031",
      "TotalCubic": 0.022,
      "TotalKg": 5.5,
      "Parts": 1,
      "IsSignatureRequired": true,
      "IsFreightForward": false,
      "ManifestedAt": null,
      "Items": [
        {
          "PartNo": 1,
          "LengthCm": 47,
          "WidthCm": 47,
          "HeightCm": 10,
          "WeightKg": 5.5,
          "PackageName": "SMALL BOX",
          "Charge_LineTotal": 9.98,
          "PickedAt": null,
          "DeliveredAt": null,
          "RatingCode": "MS"
        }
      ],
      "ConsignmentNo": "APD00020627",
      "Status": null,
      "Picked": null,
      "Delivered": null,
      "Tracking": "https://gosweetspot.com/track/108633-APD00020627",
      "Events": [],
      "ManifestNumber": "ABCD",
      "TotalCost": 9.98,
      "CreatedUtc": "2019-10-10T23:30:53.88",
      "PackingSlipNo": "#1031",
      "ManualTicket": false,
      "Consignee": "RECEIVER NAME"
    }
  ]
}

 


Create new Shipments

Description

This method is used to create new shipments.

There are 2 pre-conditions that need to be considered before calling this method.

  1. Does your workflow require you to display/calculate the freight costs and options prior to creating the shipment?
  2. Does your workflow already know which carrier is to be used for creating the shipment?

1. Display/Calculate rates first

In this scenario, you need to call the POST API/rates endpoint first to resolve the different price options you may have. Every option is accompanied by a QuoteId, which needs to be retained to be used with the create shipment method.

2. Create by Carrier Name and service

In this scenario, you won't know the cost of the freight for the shipment till after the shipment is created. You will request the shipment to be used by specifying the carrier name and service.

Printing - if the accesskey has an associated printer setup, the print job is activated by default. This can be turned off by specifying PrintToPrinter="false"_.

Requests

Method: POST
Content Type: application/json
URL: https://help.nzcouriers.co.nz/gosweetspot-api-integration/gosweetspot-shipments

Headers

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

Parameters

You need to extend the POST API/rates post body to include other fields specified below.

When QuoteId is supplied, the carrier and service fields are ignored. They should be used in exclusive pattern.

Parameter Type Description
QuoteId string Unique quote identifier returned on the POST api/rates endpoint query.
Carrier string Name of the carrier to use for the shipment. You can query the POST API/availableservices endpoint to find the valid carrier names. You can also pass '*' to choose the cheapest of any carrier.
Service string Carrier service name for which the shipment should be created for. If not supplied, the cheapest price option is selected.
origin object Leave blank when using site address, or provide one for freight forwards (Contact Model).
destination object

Recipient address details (Contact Model).

packages object list

Array of package sizes (Rate Package Model).

issaturdaydelivery boolean

Is saturday delivery required.

issignaturerequired boolean

Is signature on delivery required.

dutiesandtaxesbyreceiver boolean

Where duties are due, is the receiver paying for these.

deliveryreference string

Order reference: max length is 50.

commodities object list

Customs declared commoditiy information. Only required for international shipments.

printtoprinter string

Use "true" to send a print request to your default printer. "false" indicates no printing is required. You can also put a printer name here and the print request would be sent directly to that printer.

CustomField1Value string Value of "Custom field 1" in Site Settings, only able to take the value when "Custom Field 1 Enabled" under "Internal References" is checked. Will response error when "Custom Field 1 Mandatory" is checked and the field is missing.
CustomField2Value string Value of "Custom field 2" in Site Settings, only able to take the value when "Custom Field 2 Enabled" under "Internal References" is checked. Will response error when "Custom Field 2 Mandatory" is checked and the field is missing.
outputs string list

optional - JSON string list. Returns output of label as a PNG or PDF. Acceptable value are Print Output Formats.

hasdg boolean True of false - does your shipment contain any dangerous goods.
dangerousgoods object

JSON object of dangerous goods.

RecipientTaxId string

Optional, Goods shipped into or transiting through certain countries will need to have this value.


Return format

A JSON object with the created shipment details.

Response

Attribute Type Description
carrier integer

Current page number.

carriername integer

Courier provider name.

isfreightforward integer

Is shipment a freight forward shipment.

message object list

Action outcome message.

errors string list

List of error messages.

siteid integer

Account site id.

consignments object list JSON object array or consignments created. Generally only 1 is created however were a split is required, more could be created (Consignment Model)


Request example

1. Domestic Outbound Shipment


curl --location --request POST 'http://api.gosweetspot.com/api/shipments' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Origin": null,
    "Destination": {
        "Name": "DestinationName",
        "Address": {
            "BuildingName": "",
            "StreetAddress": "DestinationStreetAddress",
            "Suburb": "Avonside",
            "City": "Christchurch",
            "PostCode": "8061",
            "CountryCode": "NZ"
        },
        "Email": "destinationemail@email.com",
        "ContactPerson": "DestinationContact",
        "PhoneNumber": "123456789",
        "IsRural": false,
        "DeliveryInstructions": "Desinationdeliveryinstructions",
        "SendTrackingEmail": false,
        "ExplicitNotRural": false
    },
    "Packages": [
        {
            "Name": "GSS-DLE SATCHEL",
            "Length": 1,
            "Width": 10,
            "Height": 1,
            "Kg": 0.1,
        }
    ],
    "Commodities": null,
    "IsSaturdayDelivery": false,
    "IsSignatureRequired": true,
    "IsUrgentCouriers": false,
    "DutiesAndTaxesByReceiver": false,
    "DeliveryReference": "ORDER123",
    "PrintToPrinter": "false",
    "Carrier": "Post Haste"
}'


2. Domestic Outbound Shipment with Dangerous Goods


curl --location --request POST 'http://api.gosweetspot.com/api/shipments' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Origin": null,
    "Destination": {
        "Id": 0,
        "Name": "DestinationName",
        "Address": {
            "BuildingName": "",
            "StreetAddress": "DestinationStreetAddress",
            "Suburb": "Avonside",
            "City": "Christchurch",
            "PostCode": "8061",
            "CountryCode": "NZ"
        },
        "Email": "destinationemail@email.com",
        "ContactPerson": "DestinationContact",
        "PhoneNumber": "123456789",
        "IsRural": false,
        "DeliveryInstructions": "Desinationdeliveryinstructions",
        "SendTrackingEmail": false,
        "CostCentreId": 0,
        "ExplicitNotRural": false
    },
    "Packages": [
        {
            "Id": 0,
            "Name": "GSS-DLE SATCHEL",
            "Length": 1,
            "Width": 10,
            "Height": 1,
            "Kg": 0.1
        }
    ],
    "Commodities": null,
    "IsSaturdayDelivery": false,
    "IsSignatureRequired": true,
    "IsUrgentCouriers": false,
    "DutiesAndTaxesByReceiver": false,
    "RuralOverride": false,
    "DeliveryReference": "ORDER123",
    "PrintToPrinter": "false",
    "Outputs": [
        10
    ],
    "CarrierId": 0,
    "Carrier": "Post Haste",
    "Service": null,
    "SiteId": 0,
    "IncludeLineDetails": false,
    "ShipType": 1,
    "HasDG": true,
    "DangerousGoods": {
        "AdditionalHandlingInfo": "Some info",
        "HazchemCode": "HC",
        "IsRadioActive": false,
        "CargoAircraftOnly": false,
        "IsDGLQ":true,
        "TotalKg":5.2,
        "TotalQuantity":"2",
        "SignOffName":"name",
        "SignOffRole":"role",
        "LineItems": [
            {
                "ConsignmentId": 0,
                "Description": "desc",
                "ClassOrDivision": "class",
                "UNorIDNo": "",
                "PackingGroup": "",
                "SubsidaryRisk": "",
                "Packing": "",
                "PackingInstr": "",
                "Authorization": ""
            }
        ]
    },
    "DisableFreightForwardEmails": false,
    "IncludeInsurance": false
}'

3. International Outbound Shipment


curl --location --request POST 'https://api.gosweetspot.com/api/shipments' \
--header 'access_key: Your API Access Key' \
--header 'site_id: Your Site ID' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Origin": null,
    "Destination": {
        "Name": "DestinationName",
        "Address": {
            "BuildingName": "",
            "StreetAddress": "8 Althea Clos",
            "Suburb": "Sinnamon Park",
            "City": "Queensland",
            "PostCode": "4073",
            "CountryCode": "AU"
        },
        "Email": "destinationemail@email.com",
        "ContactPerson": "DestinationContact",
        "PhoneNumber": "123456789",
        "IsRural": false,
        "DeliveryInstructions": "Desinationdeliveryinstructions",
        "SendTrackingEmail": false,
        "ExplicitNotRural": false
    },
    "Packages": [
        {
            "Name": "GSS-DLE SATCHEL",
            "Length": 10,
            "Width": 10,
            "Height": 10,
            "Kg": 1
        }
    ],
    "Commodities": [
        {
            "Description":"test",
            "unitvalue":100,
            "UnitKg":1,
            "units":1,
            "currency":"NZD",
            "Country":"CN"
        }
    ],
    "IsSaturdayDelivery": false,
    "IsSignatureRequired": true,
    "IsUrgentCouriers": false,
    "DutiesAndTaxesByReceiver": false,
    "DeliveryReference": "ORDER123",
    "PrintToPrinter": "false",
    "Carrier": "FedEx"
}'

Response example

1. Domestic Outbound Shipment


{
  "CarrierId": 102,
  "CarrierName": "Post Haste",
  "IsFreightForward": false,
  "IsOvernight": false,
  "IsResidential": true,
  "IsSaturdayDelivery": false,
  "IsRural": false,
  "HasTrackPaks": false,
  "Message": "Connote created and print queued.",
  "AddressLabelMessage": null,
  "AddressLabelError": null,
  "Errors": [],
  "SiteId": 4180,
  "Consignments": [
    {
      "Connote": "SSPOT018667",
      "TrackingUrl": "http://gosweetspot.com/track/4180-SSPOT018667",
      "Cost": 4.07,
      "CarrierType": 13,
      "IsSaturdayDelivery": false,
      "IsRural": false,
      "IsOvernight": false,
      "IsResidential": true,
      "HasTrackPaks": false,
      "ConsignmentId": 6215942,
      "OutputFiles": null,
      "Items": null
    }
  ],
  "Downloads": [],
  "CarrierType": 13,
  "AlertPath": null,
  "Notifications": [],
  "HasSaturdayDeliveryLabel": false
}

 

2. Domestic Outbound Shipment with Dangerous Goods


{
  "CarrierId": 102,
  "CarrierName": "Post Haste",
  "IsFreightForward": false,
  "IsOvernight": false,
  "IsResidential": true,
  "IsSaturdayDelivery": false,
  "IsRural": false,
  "HasTrackPaks": false,
  "Message": "Connote created and print queued.",
  "AddressLabelMessage": null,
  "AddressLabelError": null,
  "Errors": [],
  "SiteId": 4180,
  "Consignments": [
    {
      "Connote": "SSPOT018668",
      "TrackingUrl": "http://gosweetspot.com/track/4180-SSPOT018668",
      "Cost": 4.07,
      "CarrierType": 13,
      "IsSaturdayDelivery": false,
      "IsRural": false,
      "IsOvernight": false,
      "IsResidential": true,
      "HasTrackPaks": false,
      "ConsignmentId": 6215944,
      "OutputFiles": {
        "DG_FORM_PDF": [
          "JVBERi0xLjQKJdP0zOEKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlKEQ6MjAxNjA0MTYxMDI5MTIrMTInMDAnKQovQ3JlYXRvcihQREZzaGFycCAxLjMyLjMwNTctRU9GCg=="
        ]
      },
      "Items": null
    }
  ],
  "Downloads": [],
  "CarrierType": 13,
  "AlertPath": null,
  "Notifications": [],
  "HasSaturdayDeliveryLabel": false
}

 

3. International Outbound Shipment


{
  "CarrierId": 96,
  "CarrierName": "FedEx",
  "IsFreightForward": false,
  "IsOvernight": false,
  "IsSaturdayDelivery": false,
  "IsRural": false,
  "IsResidential": false,
  "HasTrackPaks": false,
  "Message": "Connote created and print queued.",
  "AddressLabelMessage": null,
  "AddressLabelError": null,
  "Errors": [],
  "SiteId": 1234567,
  "IncludePackingSlip": false,
  "Consignments": [
    {
      "Connote": "ABCDEFG",
      "TrackingUrl": "https://gosweetspot.com/track/1234567-ABCDEFG",
      "Cost": 0,
      "CarrierType": 4,
      "IsSaturdayDelivery": false,
      "IsRural": false,
      "IsOvernight": false,
      "IsResidential": false,
      "HasTrackPaks": false,
      "ConsignmentId": 99999999,
      "OutputFiles": null,
      "Items": null
    }
  ],
  "Downloads": [],
  "CarrierType": 4,
  "AlertPath": null,
  "Notifications": [],
  "HasSaturdayDeliveryLabel": false,
  "SentToPrinter": null,
  "ExternalLinksToOpen": [],
  "CustomField1Value": null,
  "CustomField2Value": null
}

 


Delete Shipments

Description

Delete an unprocessed consignment from the system.

Requests

Method: GET
Content Type: application/json
URL: https://help.nzcouriers.co.nz/gosweetspot-api-integration/gosweetspot-shipments

Headers

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

Parameters

Parameter Type Description
id string

A comma-separated list of consignment numbers to be deleted.

A maximum of 50 consignments can be deleted per call.

Return format

A JSON object array with a consignment number and associated outcome

Valid outcome states are:

  • Invalid ticket number
  • Cannot be deleted. Already deleted.
  • Cannot be deleted. Already delivered.
  • Cannot be deleted. Already in transit.
  • Cannot be deleted. Already manifested


Errors

Http 409 - Max consignment limit 50 exceeded.

Request example


curl --location --request DELETE 'https://api.gosweetspot.com/api/shipments?id=SSPOT014115%2CSSPOT014114%2CSSPOT014113%2CSSPOT014112' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json'

Response example


{
  "SSPOT014112": "Deleted",
  "SSPOT014113": "Deleted",
  "SSPOT014114": "Cannot be deleted. Already deleted.",
  "SSPOT014115": "Cannot be deleted. Already deleted."
}
 

 


Create Cheapest Courier

Description

This interface allows you to create a shipment with the cheapest courier option available.

Upon creating the shipment, the print command can also be automatically initiated. This print command requires the Print Agent to be installed and available.

Requests

Method: POST
Content Type: application/json
URL: https://help.nzcouriers.co.nz/gosweetspot-api-integration/gosweetspot-shipments

Headers

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

Parameters

Parameter Type Description
Carrier
string
Name of the carrier to use for the shipment. You can query the POST api/availableservices endpoint to find the valid carrier names. You can also pass '*' to choose the cheapest of any carrier.
Service
string

Carrier service name, for which the shipment should be created for. If not supplied, the cheapest price option is selected.

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).


issaturdaydelivery
boolean
Is saturday delivery required?
issignaturerequired
boolean
Is signature on delivery required?
dutiesandtaxesbyreceiver
boolean
Where duties are due, is the receiver paying for these?
deliveryreference
string

Order reference, max length is 50.

commodities
object list
Customs declared commoditiy information. Only required for international shipments.
printtoprinter
string
Use "true" to send a print request to your default printer. Use "false" indicates no printing is required. You can also put a printer name here and the print request would be sent directly to that printer
outputs
string list
optional - JSON string list. Returns output of label as a PNG or PDF. Acceptable value are Print Output Formats

Response

A JSON object with the created shipment details.

Response

Attribute Type Description
Carrier
string
Internal system carrier identifier.
carriername
string

Courier provider name.

isfreightforward
boolean

Is shipment a freight forward shipment.

message
string

Action outcome message.


errors
string list

List of error messages.


siteid
integer
Account site ID.
consignments
object list
JSON object array or consignments created. Generally, only 1 is created, however, were a split is required, more could be created (Consignment Model)

Request example

curl --location --request POST '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,
  "Packages": [
    {
      "Height": 1,
      "Length": 1,
      "Id": 0,
      "Width": 10,
      "Kg": 0.1,
      "Name": "GSS-DLE SATCHEL",
      "PackageCode": "DLE",
      "Type": "Box"
    }
  ],
  "PrintToPrinter": true
}'

Response example


{
  "CarrierId": 102,
  "CarrierName": "Post Haste",
  "IsFreightForward": false,
  "IsOvernight": true,
  "IsSaturdayDelivery": false,
  "IsRural": false,
  "HasTrackPaks": true,
  "Message": "Printer invalid. Job created but not queued.",
  "Errors": [],
  "SiteId": 4180,
  "Consignments": [
    {
      "Connote": "SSPOT012863",
      "TrackingUrl": "http://gosweetspot.com/track/4180-SSPOT012863",
      "Cost": 7.52,
      "CarrierType": 13,
      "IsSaturdayDelivery": false,
      "IsRural": false,
      "IsOvernight": true,
      "HasTrackPaks": true,
      "ConsignmentId": 1830321,
      "OutputFiles": null
    }
  ],
  "Downloads": [],
  "CarrierType": 13,
  "AlertPath": null
}


Reprint

Description

Requeue a consignment for printing.

Requests

Method: POST
Content Type: application/json
URL: https://help.nzcouriers.co.nz/gosweetspot-api-integration/gosweetspot-rates

Headers

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

Parameters

Parameter Type Description
Carrier
string
Name of the carrier to use for the shipment. You can query the POST api/availableservices endpoint to find the valid carrier names. You can also pass '*' to choose the cheapest of any carrier.
Service
string

Carrier service name, for which the shipment should be created for. If not supplied, the cheapest price option is selected.

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).

outputs
string list
optional - JSON string list. Returns output of label as a PNG or PDF. Acceptable value are Print Output Formats

Response

A JSON object with the created shipment details.

Response

Attribute Type Description
consignmentno
string

consignment number to be re-printed.

Return format

A string text of response message.

Request example

curl --location --request POST 'https://api.gosweetspot.com/ratesquery/reprint?consignmentno=ABC123' \
--header 'Content-Type: application/json' \
--header 'access_key: ' \
--header 'site_id: '

Response example


Print job sent

 

Did this article answer your question?

Can't find the answer to your question?

Suggest an article