Orders
Cancel Order

Cancel a Order

This endpoint allows you to cancel a shipment order in the Gratero system.

Parameters

No parameters are required to get order details.

Example

Response

JSON
{
  "success": true,
  "awb": "234298793452",
  "order_id": "GTR-0018",
  "message": "Order has been cancelled"
}

Code

import { Instance } from "gratero";
 
const gratero = new Instance({
  api_key: "YOUR_API_KEY",
  secret_key: "YOUR_SECRET_KEY",
  environment: 'test'
});
 
gratero.order.cancel({
    awb: "234298793452",
}).then(data => console.log(data))
  .catch(error => console.log(error))