To connect with the printing API, you first need to create an API token from the API tab in your account settings.
Overview
The API has three methods for printing FNSKU, Generic, and Shipping labels. The labels will be generated based on the configured label size in your account. See the label size section to update your configured label size.
Base URL: https://api.azlabels.com
The API can accept either JSON or Form Data. When sending JSON, you should set your headers as follows:
Content-Type: application/json Accept: application/json
Authentication
To authenticate with the API, pass your token as a JSON parameter in every request that you make:
token: YOUR_API_TOKEN
Invalid tokens will receive a 401 response.
Label Limits
When you reach your label limit, you will receive a 401 response with the following JSON for FNSKU prints:
{"message": "To continue printing, you will need to upgrade your plan on the AZLabels dashboard. You have used all your available FNSKU prints for this month."}
and for shipping label prints:
{"message": "To continue printing, you will need to upgrade your plan on the AZLabels dashboard. You have used all your available shipping label prints for this month."}
On print responses (once a label has been generated and the label URLs returned), a labels_remaining parameter is returned containing the labels remaining in the current billing cycle.
FNSKU Labels
Endpoint: /fnskuv2 Method: POST
The FNSKU endpoint accepts an array of labels, formatted as follows:
labels: [ { fnsku: 'X001339AD5', title: 'Pascall Pineapple Lumps 185g', condition: 'New', msku: 'ABC-1234', expiration_date: '01-31-2022', }, ]
Parameter | Required | Format | Notes |
---|---|---|---|
fnsku | Yes | Alphanumeric string, 10 characters | |
title | Yes | String | |
condition | Yes | String, maximum 30 characters | |
msku | No | String, maximum 40 characters | The MSKU will not be added to the label unless that option is enabled in the user's advanced settings |
expiration_date | No | Date, formatted: MM-DD-YYYY | The expiration date requires a minimum label size of 4x2" |
Amazon Shipping Labels
Endpoint: /shipAmazon Method: POST
The Amazon shipping labels endpoint requires you to pass in the Amazon shipping label PDF that Amazon generates. That PDF will then be converted into a thermal label format. If you receive a 202 response, see the Check Results section.
Parameter | Required | Format | Notes |
---|---|---|---|
labelType | Yes | Alphanumeric string, must be in a list of accepted types | To get the labelType parameter, inspect the dropdown of label types that Amazon provides before you generate the label. The value of the option you select is the labelType, for example, "PackageLabel_Letter_2" |
Yes | File | The PDF file that Amazon generates |
Check Results
Endpoint: /check Method: POSTIf you receive a 202 response for any of the generation endpoints, that means the label generation job was queued for processing and you will need to poll the /check endpoint. Once this endpoint returns a 200 response, you will receive the link to the completed labels. If the job is not yet ready, it will return a 202 response.
Parameter | Required | Format | Notes |
---|---|---|---|
hash | Yes | Alphanumeric string | This is the hash that was returned from a previous call to a generation endpoint. |
Generic Labels
More details on the types of generic labels available can found here: https://azlabels.helpscoutdocs.com/article/20-print-generic-labels
Endpoint: /generic Method: POST
Parameter | Required | Format | Notes |
---|---|---|---|
type | Yes | String, must be in list of types | Types available: bb-date, expiry-date, fragile,set, set-no-separate, ready-ship, single-item, suffocation, team-lift, mech-lift, caution-heavy, small-light, review-request, glue-pen |
quantity | Yes | Integer, Min 1, Max 1,000 | |
day | No | Numeric, Min 1, Max 31 | If set, the day will be added to label types with dates |
month | Sometimes | Numeric, Min 1, Max 12 | The month is required for any of the following label types: bb-date, expiry-date |
year | Sometimes | Numeric, Min 2017, Max 3000 | The year is required for any of the following label types: bb-date, expiry-date |
date-format | No | String, must be either "int" or "us" | "int" will put the day before the month (DD/MM/YYYY), and "us" will put the month before the day (MM/DD/YYYY). Defaults to "int". |
Label Sizes
Base URL: https://dashboard.azlabels.com/api
The API can accept either JSON or Form Data. When sending JSON, you should set your headers as follows:
Content-Type: application/json Accept: application/json
Authentication
To authenticate with the API, pass your token as a parameter in every request that you make:
api_token: YOUR_API_TOKEN
Invalid tokens will receive a 401 response.
Index
Endpoint: /label-sizes Method: GET
Get the available label sizes to know the label size ID to pass in the update request.
Parameter | Required | Format | Notes |
type | No | "fnsku" or "shipping" |
Update
Endpoint: /label-sizes Method: POST
Parameter | Required | Format | Notes |
fnsku_label_size_id | Required without shipping_label_size_id | integer | |
shipping_label_size_id | Required without fnsku_label_size_id | integer |