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

Retails services country specific restrictions

resources/RetailsServiceCodesCountrySpecificValidations-b1386a16-b227-4a32-8a7b-3a23f9c4262a.JPG

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": "ec76ef20-6347-11ef-abf9-064f0484fceb",
  "products": [
    {
      "code": "IECOPA2",
      "cms_code": "IECOPA2",
      "service_code": "IECOP",
      "name": "Economy Plus",
      "channel": "Account",
      "group": "My Service Group",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "has_tracking": true,
      "signature_required": false,
      "special_arrangements": false,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IECOPA2",
      "cms_code": "IECOPA2",
      "service_code": "IECOP7",
      "name": "Economy Plus Thermal",
      "channel": "Account",
      "group": "My Service Group",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "has_tracking": false,
      "signature_required": false,
      "special_arrangements": true,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IECOPRESA5",
      "cms_code": "IECOPRESA5",
      "service_code": "IECOPRES",
      "name": "Economy Plus Restricted",
      "channel": "Account",
      "group": "My Service Group",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "has_tracking": false,
      "signature_required": false,
      "special_arrangements": true,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IECOTA500",
      "cms_code": "IECOTA500",
      "service_code": "IECOT",
      "name": "Economy Tracked",
      "channel": "Account",
      "group": "My Service Group",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "has_tracking": true,
      "signature_required": false,
      "special_arrangements": false,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IEECONOUKAU",
      "cms_code": "IEECONOUKAU",
      "service_code": "IEECONOUK",
      "name": "ETOE Untracked UK -ORG",
      "channel": "ETOE",
      "group": "My Service Group",
      "min_delivery_target": 4,
      "max_delivery_target": 10,
      "has_tracking": false,
      "signature_required": false,
      "special_arrangements": true,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IEECONUSAU",
      "cms_code": "IEECONUSAU",
      "service_code": "IEECONUS",
      "name": "ETOE US Semi-tracked packet",
      "channel": "ETOE",
      "group": "My Service Group",
      "min_delivery_target": 4,
      "max_delivery_target": 10,
      "has_tracking": false,
      "signature_required": false,
      "special_arrangements": true,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IEXPPA1",
      "cms_code": "IEXPPA1",
      "service_code": "IEXP",
      "name": "Express",
      "channel": "Account",
      "group": "My Service Group",
      "min_delivery_target": 1,
      "max_delivery_target": 5,
      "has_tracking": true,
      "signature_required": true,
      "special_arrangements": false,
      "weight": 0.56,
      "promo_code": ""
    },
    {
      "code": "IEXPPA500",
      "cms_code": "IEXPPA500",
      "service_code": "IEXP7",
      "name": "Express",
      "channel": "Account",
      "group": "My Service Group",
      "min_delivery_target": 1,
      "max_delivery_target": 5,
      "has_tracking": true,
      "signature_required": true,
      "special_arrangements": false,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IHCOUPIAAU",
      "cms_code": "IHCOUPIAAU",
      "service_code": "IHCOU",
      "name": "Hubbed - Courier",
      "channel": "Hubbed",
      "group": "My Service Group",
      "min_delivery_target": 2,
      "max_delivery_target": 6,
      "has_tracking": true,
      "signature_required": true,
      "special_arrangements": true,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IOCOUPA40",
      "cms_code": "IOCOUPA40",
      "service_code": "IOCOU",
      "name": "Courier",
      "channel": "Online",
      "group": "My Service Group",
      "min_delivery_target": 2,
      "max_delivery_target": 6,
      "has_tracking": true,
      "signature_required": true,
      "special_arrangements": false,
      "weight": 0.56,
      "promo_code": ""
    },
    {
      "code": "IOECOA",
      "cms_code": "IOECOA",
      "service_code": "IOECO",
      "name": "Economy",
      "channel": "Online",
      "group": "My Service Group",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "has_tracking": false,
      "signature_required": false,
      "special_arrangements": false,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IOECOPA",
      "cms_code": "IOECOPA",
      "service_code": "IOECOP",
      "name": "Economy Plus",
      "channel": "Online",
      "group": "My Service Group",
      "min_delivery_target": 3,
      "max_delivery_target": 10,
      "has_tracking": true,
      "signature_required": false,
      "special_arrangements": false,
      "weight": 0.56,
      "promo_code": ""
    },
    {
      "code": "IREXPPA30",
      "cms_code": "IREXPPA30",
      "service_code": "IREXP",
      "name": "Express",
      "channel": "Retail",
      "group": "My Service Group",
      "min_delivery_target": 1,
      "max_delivery_target": 2,
      "has_tracking": true,
      "signature_required": true,
      "special_arrangements": false,
      "weight": 0.08,
      "promo_code": ""
    }
  ],
  "surcharges": [
    {
      "code": "IETEFSGAU",
      "cms_code": "IETEFSGAU",
      "service_code": "IEECONCSG",
      "name": "ETOE Semi-tracked packet SG Alg",
      "channel": "ETOE",
      "group": "My Service Group",
      "min_delivery_target": 4,
      "max_delivery_target": 10,
      "has_tracking": false,
      "signature_required": false,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IETEFSGAU",
      "cms_code": "IETEFSGAU",
      "service_code": "IEECONSG",
      "name": "ETOE Semi-tracked packet SG Alg",
      "channel": "ETOE",
      "group": "My Service Group",
      "min_delivery_target": 4,
      "max_delivery_target": 10,
      "has_tracking": false,
      "signature_required": false,
      "weight": 0.08,
      "promo_code": ""
    },
    {
      "code": "IETEFUSAU",
      "cms_code": "IETEFUSAU",
      "service_code": "IEECOTUS",
      "name": "ETOE US Tracked packet",
      "channel": "ETOE",
      "group": "My Service Group",
      "min_delivery_target": 4,
      "max_delivery_target": 10,
      "has_tracking": true,
      "signature_required": false,
      "weight": 0.08,
      "promo_code": ""
    }
  ],
  "insuranceCodesFixed": [
  ],
  "insuranceCodesCalculated": [
  ]
}

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