Discussions

Ask a Question
Back to All

Create a Tracking issue

(edited)

$response = $client->request('POST', 'https://api.easyship.com/2023-01/trackings', [
'body' => '{"origin_address":{"company_name":"Test Plc.","contact_name":"Foo Bar","contact_email":"[email protected]","contact_phone":"+852-1234-5678","line_1":"123 Test Street","line_2":"Block 3","postal_code":"ABC123","city":"City","state":"State","country_alpha2":"SG"},"destination_address":{"company_name":"Test Plc.","contact_name":"Foo Bar","contact_email":"[email protected]","contact_phone":"+65 6910 1185","line_1":"123 Test Street","line_2":"Block 3","postal_code":"247964","city":"Singapore","state":"Singapore","country_alpha2":"SG"},"tracking_number":"13213213","courier_id":"01563646-58c1-4607-8fe0-cae3e33c0002","items":[{"description":"iPhone","quantity":1},{"description":"Macbook"}]}',
'headers' => [
'accept' => 'application/json',
'authorization' => 'Bearer prod_xxx,
'content-type' => 'application/json',
],
]);

I am trying to create tracking API but it is not working fine see the below response..

{
"error": {
"code": "forbidden",
"details": [
"Access to this resource requires scope(s) track_3p."
],
"message": "You do not have permission to access this resource. Please contact our support team or your account manager if you believe you should have access.",
"request_id": "7f01e9b3-4ad2-48d6-aeb5-e7caa6c92c7f",
"type": "invalid_request_error"
}
}