Flit
  1. Orders
Flit
  • Flit Client API
    • Pricing
      • Check Serviceability and Calculate Price
    • Orders
      • Create New Order
        POST
      • Cancel Order
        POST
      • Get Order Details
        GET
    • Schemas
      • Schemas
        • Order
        • Error
      • Response
        • UnauthorizedError
        • InternalServerError
  1. Orders

Cancel Order

POST
/cancel-order/{orderId}
Cancel an existing order. Orders can only be cancelled when in specific statuses: pending or accepted. Orders cannot be cancelled after pickup has been verified.

Request

Authorization
Basic Auth
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
or
Path Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
Order cancelled successfully
Body

🟠400Bad Request
🟠401Unauthorized
🟠404Not Found
🔴500Internal Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/cancel-order/' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reason": "Customer changed plans"
}'
Response Response Example
200 - Example 1
{
    "success": true,
    "message": "Order cancelled successfully",
    "data": {
        "orderId": "507f1f77bcf86cd799439011",
        "status": "cancelled"
    }
}
Modified at 2025-10-07 17:45:45
Previous
Create New Order
Next
Get Order Details
Built with