Introduction
The Tracking Number Subscription API is designed for the webhook subscribers to manage their tracking number based webhook projects and perform project related operations such as add new tracking numbers, edit or view job details using API endpoints.
Note:
- You must have admin or contributor access for your webhook project
- For more information on webhook and its features, visit the Shipment Visibility Webhook documentation page.
Benefits of Tracking Number Subscription API
The benefits of Tracking Number Subscription API are:
- You can easily update and manage tracking numbers of your webhook project using the API endpoints.
- This API enables you to associate multiple tracking numbers to your project in a single API transaction, instead of associating each tracking number one by one.
- You can submit API requests consecutively and view log details of success/failures of these requests.
How Tracking Number Subscription API Works
Use the below endpoints to manage your webhook project:
This API can be accessed only through your project overview as depicted in above screenshot.
Tracking Number Association
Use this endpoint to trigger an asynchronous job to associate one or multiple tracking numbers to a specific webhook project.
The required input information for this request is:
- Action – Specify the action to be performed when you submit the request. Example: ADD
- Tracking number Details – Specify the tracking number
You can associate maximum of 1000 tracking numbers in a single request. The successful response for this request will return the jobID, current job status, and job creation and job completion timestamp. This jobId can be used later to check the status of the asynchronous job.
Tracking Number Job Status
Use this endpoint to get the status of an asynchronous job (one or more consecutive requests in queue) or status of all the jobs submitted.
The required input information for this request is:
The successful response for this request will return the jobID, current job status, and job creation and job completion timestamp. The response will show the current status of the jobs. In addition, the response will also contain success messages, errors, or warnings for users to view and troubleshoot them as applicable.
- If the job status is displayed as COMPLETED, it means that all the tracking numbers have been validated and processed successfully.
- The COMPLETED status implies the tracking numbers are validated and processed successfully. It does not imply that all the tracking numbers have been successfully added to the webhook project.
- If you attempt to associate multiple tracking numbers and only some of them get associated and rest of them fail to associate, even then the job status will be updated as COMPLETED. To confirm the status of each tracking number in the associate request the batch-report must be downloaded.
- If the job status is displayed as FAILED, it implies that due to various reasons/hard failures, the request could not be processed, and user must retry it again.
Note:
Following are the status and their respective descriptions:
JOB STATUS | DESCRIPTION |
---|---|
SUBMITTED |
Job is submitted to the system after all basic validations, it will be processed asynchronously. |
ACCEPTED |
Job is accepted and it will be queued. |
UNACCEPTED |
Job is unaccepted due to internal failure or system unavailability, need to be retried by user. |
QUEUED |
Job is queued to be processed and the processing will start any time. |
INPROGRESS |
Job has been started and it is in-progress state. |
COMPLETED |
Job has been completed and import report or export file is available for user to download. |
FAILED |
Job has failed due to various reasons and must be tried again by user. |
Tracking Number Job Details
Use this endpoint to download JSON report for an asynchronous job that is in COMPLETED status.
The required input information associated with this request is:
- Job ID is a mandatory input for this endpoint.
- You can download the report of only one asynchronous job at a time.
- If the job is not COMPLETED and you try to download the report, then an error message is displayed.
The successful response for this request provides you the report of the job in JSON format.
Business Rules
- A maximum of 1,000 shipping tracking numbers can be associated with a webhook project in each request.
- There is no limit on maximum tracking numbers that you can associate with a given webhook project.
- Any associated tracking number(s) will be dissociated after 40 number of days from a given webhook project.
- Any created Job Id status & details will not be available after 90 number of days for a given webhook project.
- An endpoint with the ability to retrieve all Job Ids will be available soon. In the Interim, please save your Job Ids information to retrieve job status details.
- Secured tracking information such as recipient address, recipient signature will not be available via tracking number based webhook.
Response