Find method

This API call redirects to the Batch method or Label method for the PDF label(s) that are linked to the supplied user_code.

Try it here

API Details

URL HTTP Request Types Request Formats
https://api.uat.nzpost.co.nz/labels/label/find_by_user_code/ GET PDF, JSON, HTML

Request Parameters

Parameter Description Required Value Maximum Length Example
user_code This is the unique code matching the label for which to get the label details.
If the label associated with this user_code has a batch_id, this call redirects to the Batch method.
Yes String A49H6NCK

Types of Response

Response Type Status Code
Success 200
Invalid Request 400
Label(s) Not Found 404

Response Elements

A 200 response will return a PDF

Element Description Value Required Example
error_code The error code String No 2006
error_reason An explanation of the error String No Missing mandatory request parameters

Error Codes

Error Code Error Reason
2006 Missing mandatory request parameters
2010 No label matching supplied user_code
2011 Supplied user_code has expired

Examples

Note: When an error occurs, the content type is set to application/json.

Request:

        https://api.uat.nzpost.co.nz/labels/label/find_by_user_code/A49H6NCK

    

Responses:

    
{
  "error_code": "2011",
  "error_reason": "Supplied user_code has expired"
}