ShippingOptions API

(0 reviews)

International

Resource URL

UAT:

https://api.uat.nzpost.co.nz/shippingoptions/2.0/international
Production:
https://api.nzpost.co.nz/shippingoptions/2.0/international

Resource Description

The international method is used to retrieve a list of valid shipping options available for a delivery address outside of New Zealand.

Resource Information

AttributeDetail
Response FormatJSON
Requires AuthenticationYes
Rate Limited15 calls per second. If rate limit is exceeded, calls will be queued. Calls unprocessed for over 60 seconds will time out.

Please note that all request parameters should be in lower case.

Request Parameters

FieldField NameDescriptionMandExample
country_codeCountry CodeThe destination country code of the package. Value must be in upper caseYesAU
valueValueApproximate commercial value in NZ dollarsYes9.50
lengthLengthLength of package (mm)Yes250
heightHeightHeight of the package (mm)Yes (if parcel is not a tube)150
widthWidthWidth of the package (mm)Yes (if parcel is not a tube)50
diameterDiameterDiameter of the package (mm)Yes (if parcel is tube)55
weightWeightPackage weight in kgYes1.2
promo_codePromo CodeNZ Post promotional codeNoXYZ001
formatFormatThe format of the responseYesjson
documentsDocumentsInclude document package types in results. Use "include" to include document types. Use "only" to return only document types. Leave blank to exclude document typesNoInclude
account_numberAccount NumberYour NZ Post Billing Account number (9 or 5 series). This is highly recommended to pass in the API call to obtain your account ratesNo12345678
channelAccountThis is highly recommended to pass in the API call to obtain the service codes that are appropriate for you to access our servicesNoOnline,Offshore,Account or ETOE
service_codeService CodeCode to represent a delivery service. This is highly recommended to get service and country specific validationsNoICOU
postcodePostcodePostal or zip code of the Box or Bag locationNo1142
insurance_requiredInsurance RequiredIndicates whether insurance is required for the parcelNotrue
pickup_country_codePickup Country CodeTwo letter country code of pickup_address. Only required for Saudi post labels (GoSPL) serviceNoNZ
location_typeLocation TypeType of delivery location requested for the item. Only required for Saudi post labels (GoSPL) serviceNoHOM

Shipping Options Country Specific Validations

To support AusPost-Courier International/EMS requirements, below country specific restrictions have been added for some services

resources/SO_CountrySpecificValues-fec5c53f-be6a-4600-b1db-27d0176667f7.PNG

Sample Request

https://api.uat.nzpost.co.nz/shippingoptions/2.0/international?value=100&country_code=AU&length=10&height=10&width=10&weight=10&documents=&account_number=12345678

Response Parameters

Field NameDescriptionMandExample
successReturns if request is successfulYesTrue
servicesArray listing applicable service codes and ratesYesSee Services Object section below

Services Object Parameters

Field NameDescriptionMandExample
service_codeNZ Post code specifying serviceYesTIEX
descriptionDescription of service codeYesInt Express Pcl Zone A 13.0kg
min_delivery_targetThe minimum expected delivery timeYes1
max_delivery_targetThe maximum expected delivery timeYes5
tracking_includedBoolean indication tracking is included in serviceYestrue
signature_includedBoolean indication signature is included in serviceYestrue
price_excluding_gstPrice excluding GSTYes191.86
price_including_gstPrice with GSTYes220.64
cms_codeThis is the product code that will show on your invoice if you use this service with the parameters you have provided in the API callYesIACNA10

Products available (and their prices) are contained in an array within the 'products' node.

Error Response Elements

Field NameDescriptionMandExample
successReturns if request is successfulYesTrue
errorsError object with error detailsY if success =falseSee Error Object Parameters below
message_idThe unique message identifierYesec608f40-2a8b-11e5-a9c0-025c481d35ef

Error Object Parameters

Field NameDescriptionExample
codeError code where first 3 digits are http status code, last three digits identify error type400002
messageDescription of error codeInvalid Parameter(s)
detailsDescription of specific errorCountry code is not a supported country code

HTTP Status Codes

Note that some error messages are customised for the request, i.e. error code 400 usually will describe what is wrong with the request

CodeMessage
200Success
400Bad request
401Unautorized
403Forbidden
409Invalid request
500System unavailable

Error Codes

CodeMessage
200001Partial results returned, not all system(s) have responded
200002All sources responded, data may be incomplete
400001Parameter(s) missing
400002Invalid parameter(s)
400003Non mutually exclusive parameters detected
401001Unauthorised access, please contact administrator
500001General Exception
500002System(s) offline

Sample Response

Sample of success message:


 {
  "success": true,
  "contract_rates": true,
  "message_id": "5a989d10-e02e-11ea-b3cf-062bf6fa0ba0",
  "services": [
    {
      "service_code": "TIALP",
      "description": "Air Parcel",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "tracking_included": false,
      "signature_included": false,
      "price_excluding_gst": 25.6,
      "price_including_gst": 25.6,
      "cms_code": "IACNA1500"
    },
    {
      "service_code": "TIALP7",
      "description": "Air Parcel 7x4",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "tracking_included": false,
      "signature_included": false,
      "price_excluding_gst": 25.6,
      "price_including_gst": 25.6,
      "cms_code": "IACNA1500"
    },
    {
      "service_code": "TIALPR",
      "description": "Air Parcel Restricted",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "tracking_included": false,
      "signature_included": false,
      "price_excluding_gst": 25.6,
      "price_including_gst": 25.6,
      "cms_code": "IACNA1500"
    },
    {
      "service_code": "TIAS",
      "description": "Air Small Parcel",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "tracking_included": false,
      "signature_included": false,
      "price_excluding_gst": 17.37,
      "price_including_gst": 17.37,
      "cms_code": "IASNA1500"
    },
    {
      "service_code": "TIASPC",
      "description": "Air Parcel",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "tracking_included": false,
      "signature_included": false,
      "price_excluding_gst": 17.37,
      "price_including_gst": 17.37,
      "cms_code": "IASNA1500"
    },
    {
      "service_code": "TIEX",
      "description": "Express Courier",
      "min_delivery_target": 1,
      "max_delivery_target": 5,
      "tracking_included": true,
      "signature_included": true,
      "price_excluding_gst": 67.26,
      "price_including_gst": 67.26,
      "cms_code": "ICPNA1500"
    },
    {
      "service_code": "TIEXDT",
      "description": "Express Courier Duties Paid",
      "min_delivery_target": 1,
      "max_delivery_target": 5,
      "tracking_included": true,
      "signature_included": true,
      "price_excluding_gst": 67.26,
      "price_including_gst": 67.26,
      "cms_code": "ICPNA1500"
    },
    {
      "service_code": "TIEXRI",
      "description": "Express Courier Restricted",
      "min_delivery_target": 1,
      "max_delivery_target": 5,
      "tracking_included": true,
      "signature_included": true,
      "price_excluding_gst": 67.26,
      "price_including_gst": 67.26,
      "cms_code": "ICPNA1500"
    },
    {
      "service_code": "TIEC",
      "description": "International  Courier",
      "min_delivery_target": 2,
      "max_delivery_target": 6,
      "tracking_included": true,
      "signature_included": true,
      "price_excluding_gst": 34.57,
      "price_including_gst": 34.57,
      "cms_code": "IEZPA1500"
    },
    {
      "service_code": "TIEC7",
      "description": "International  Courier 7x4",
      "min_delivery_target": 2,
      "max_delivery_target": 6,
      "tracking_included": true,
      "signature_included": true,
      "price_excluding_gst": 34.57,
      "price_including_gst": 34.57,
      "cms_code": "IEZPA1500"
    },
    {
      "service_code": "TIECDA",
      "description": "International Courier DIA",
      "min_delivery_target": 2,
      "max_delivery_target": 6,
      "tracking_included": true,
      "signature_included": true,
      "price_excluding_gst": 34.57,
      "price_including_gst": 34.57,
      "cms_code": "IEZPA1500"
    },
    {
      "service_code": "TIECRI",
      "description": "International Courier Restricted",
      "min_delivery_target": 2,
      "max_delivery_target": 6,
      "tracking_included": true,
      "signature_included": true,
      "price_excluding_gst": 34.57,
      "price_including_gst": 34.57,
      "cms_code": "IEZPA1500"
    },
    {
      "service_code": "TIASPP",
      "description": "Air Small Parcel Non D (IBP)",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "tracking_included": false,
      "signature_included": false,
      "price_excluding_gst": 1.2,
      "price_including_gst": 1.2,
      "cms_code": "ISURA"
    }
  ]
}

Sample of failure message:


{
   "success": false,
   "errors": [   {
      "code": "400002",
      "message": "Invalid Parameter",
      "details": "Country code is not a supported country code"
   }],
   "message_id": "a1129930-0d7a-11e5-b1ba-06132e0eed7f"
}

Reviews