Add Package

This API operation creates a new package in the system and records its associated activity.
Each package requires a unique tracking number to be added successfully. If an attempt is made to add multiple packages using the same tracking number, the API will return an error.
When to use Add Package API?

  • For packages with a barcode
    • Customers scan the barcode label on the package and decode the tracking number using the Decode Tracking Number API.
    • Use the Get Package by Tracking Number API to check if the package already exists in the system:
      • If the package is not found, use Add Package API to add the package in the system.
  • For packages without a barcode or tracking number, generate a unique tracking number using the Generate Tracking Number API and then add the package using Add Package API.
SecuritybearerAuth
Request
Request Body schema: application/json
required
object

Details of the package to be added.

object
Array of objects

List of images related to the packages.

Responses
201

Package has been created successfully.

400

Invalid request.

401

The request could not be authorized.

500

The request could not be completed due to an internal error.

post/api/v1/packages
Request samples
application/json
{
  • "package": {
    },
  • "lastActivity": {
    },
  • "images": [
    ]
}
Response samples
application/json
{}