Skip to main content

Create Purchase

TRT Express Create Purchase API allows you to create a purchase order for a parcel delivery. You can use the API to create a new purchase order and get the tracking number for the parcel.

Request

Endpoint

POST /api/v1/purchases

Headers

Authorization: Basic bXktY2xpZW50LWlkOm15LWNsaWVudC1zZWNyZXQ=

Body

{
"accountNumber": "1234567890", # Account number for bill to
"referenceNumbers":[
{
"type": "PO_NUMBER", # Required
"value": "1234567890" # Required
}
],
"commodities": [ # Optional
{
"description": "T-shirt",
"quantity": 1,
"declaredValue": {
"amount": 10,
"currency": "CAD"
},
"commodityType": "HS Code",
}
],
"packagingType": "PACKAGE", # PACKAGE, BOX, LETTER # Optional
"pieces": 1, # Number of pieces in the parcel # Optional
"weight": 5, # Optional
"weight_unit": "kg", # Optional
"length": 10, # Optional
"width": 10, # Optional
"height": 10, # Optional
"dimensionsUnit": "cm", # Optional
"additionalServices": [ # Optional
{
"type": "INSURANCE",
"value": 500 # Amount of insurance in USD
}
]
}

Response

{
"id": "1234567890",
"status": "created"
}