Discussions

Ask a Question
Back to All

Broken TNT pickup request through API

Hi, we're trying to book a pickup through the API for two TNT shipments, but we keep getting 422 responses like below regardless of what pickup dates we use, or if we use a pickup slot ID instead. Works fine for other couriers (CouriersPlease).

We can't seem to request pickup for these through the Dashboard either.


curl --request POST
--url https://api.easyship.com/2023-01/pickups
--header 'accept: application/json'
--header 'authorization: Bearer prod_XXXXXXXX'
--header 'content-type: application/json'
--data '
{
"courier_id": "5f9647b8-7a97-4a0a-b329-b9d6817a96a1",
"selected_date": "2023-09-05",
"selected_from_time": "08:00",
"selected_to_time": "18:00",
"easyship_shipment_ids": [
"ESAU160187163",
"ESAU160163823"
]
}
'

{
"error": {
"code": "invalid_content",
"details": [
"Something went wrong when requesting a pickup to TNT (AU), please try later or contact Easyship Customer Service",
[]
],
"message": "The request body content is not valid.",
"request_id": "8acb3f33-39d0-4418-9330-4f4bf7002c63",
"type": "invalid_request_error"
}
}


curl --request POST
--url https://api.easyship.com/2023-01/pickups
--header 'accept: application/json'
--header 'authorization: Bearer prod_XXXXXXXX'
--header 'content-type: application/json'
--data '
{
"courier_id": "5f9647b8-7a97-4a0a-b329-b9d6817a96a1",
"selected_date": "2023-09-06",
"selected_from_time": "08:00",
"selected_to_time": "18:00",
"easyship_shipment_ids": [
"ESAU160187163",
"ESAU160163823"
]
}
'

{
"error": {
"code": "invalid_content",
"details": [
"Something went wrong when requesting a pickup to TNT (AU), please try later or contact Easyship Customer Service",
[]
],
"message": "The request body content is not valid.",
"request_id": "be3a78b4-39cf-4275-a1aa-f04cc64c5b8a",
"type": "invalid_request_error"
}
}


curl --request POST
--url https://api.easyship.com/2023-01/pickups
--header 'accept: application/json'
--header 'authorization: Bearer prod_XXXXXXXX'
--header 'content-type: application/json'
--data '
{
"courier_id": "5f9647b8-7a97-4a0a-b329-b9d6817a96a1",
"selected_date": "2023-09-05",
"time_slot_id": "54fd94b1-d57c-4a8f-9b46-cbb498a5f56a",
"easyship_shipment_ids": [
"ESAU160187163",
"ESAU160163823"
]
}
'

{
"error": {
"code": "invalid_content",
"details": [
"Something went wrong when requesting a pickup to TNT (AU), please try later or contact Easyship Customer Service",
[]
],
"message": "The request body content is not valid.",
"request_id": "9f169a64-e09e-47ad-aeba-fd3f5fb812a2",
"type": "invalid_request_error"
}
}