QR Code method

This API generates a QR code used to find and download the PDF of a label or batch of labels.

The QR code will contain a URL to the Find method. QR codes are generated on demand and not stored.

Try it here

API Details

URL HTTP Request Types Request Formats
https://api.nzpost.co.nz/labels/label/qr_code/ GET PNG

Request Parameters

Parameter Description Required Value Maximum Length Example
uuid This is the unique uuid matching the label for which to generate a QR code Yes String bcdfh47fdgsd534

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 PNG image

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
2001 No label matching supplied uuid
2006 Missing mandatory request parameters
2012 Error generating QR code

Examples

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

Request:

        https://api.nzpost.co.nz/labels/label/qr_code/bcdfh47fdgsd534.png

    

Responses:

    
{
  "error_code": "2001",
  "error_reason": "No label matching supplied uuid"
}