Create Parcel
TRT Express Create Parcel API allows you to create a parcel delivery. You can use the API to create a new parcel delivery and get the tracking number for the parcel.
Request
Endpoint
POST /api/v1/parcels
Headers
Authorization: Basic bXktY2xpZW50LWlkOm15LWNsaWVudC1zZWNyZXQ=
Body
{
"accountNumber": "1234567890", # Account number for bill to
"serviceOptions": ["PURCHASE_FORWARDING"],
"referenceNumbers":[
{
"type": "PO_NUMBER",
"value": "1234567890"
}
],
"shipper": {
"contact":{
"companyName": "", # Optional
"type": "Individual", # Business, Individual
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "123-456-7890",
"email": "john.doe@example.com",
"referenceNumber": "1234567890" # Optional for contact matching
},
"address":{
"addressLine1": "456 Queen St",
"addressLine2": "Suite 100",
"city": "Toronto",
"province": "ON",
"postalCode": "M5V 2A1",
"country": "CA",
"streetNumber": "123",
"streetName": "Main St",
"apartment": "100",
"phoneNumber": "123-456-7890",
"email": "john.doe@example.com",
"referenceNumber": "1234567890" # Optional for address matching
}
},
"consignee": [{
"contact":{
"companyName": "John Doe Inc.", # Optional
"type": "BUSINESS", # Business, Individual
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "123-456-7890",
"email": "john.doe@example.com",
"referenceNumber": "1234567890" # Optional for contact matching
},
"address":{
"addressLine1": "456 Queen St",
"addressLine2": "Suite 100",
"city": "Toronto",
"province": "ON",
"postalCode": "M5V 2A1",
"country": "CA",
"streetNumber": "123",
"streetName": "Main St",
"apartment": "100",
"phoneNumber": "123-456-7890",
"email": "john.doe@example.com",
"referenceNumber": "1234567890" # Optional for address matching
}
}
],
"purchaseRefs": [ # Optional
{
"type": "PO_NUMBER",
"value": "1234567890"
}
],
"commodities": [ # Content of the parcel
{
"description": "T-shirt",
"quantity": 1,
"declaredValue": {
"amount": 10,
"currency": "CAD"
},
"commodityType": "HS Code",
}
],
"packagingType": "PACKAGE", # PACKAGE, BOX, LETTER
"pieces": 1, # Number of pieces in the parcel
"weight": 5,
"weight_unit": "kg",
"length": 10,
"width": 10,
"height": 10,
"dimensionsUnit": "cm",
"additionalServices": [
{
"type": "INSURANCE",
"value": 500 # Amount of insurance in USD
}
]
}
Response
{
"tracking_number": "TRT123456",
"status": "created",
"label_url": "https://trtexpress.com/labels/TRT123456.pdf"
}