Skip to main content

Cancel an order

POST /v2/fulfillment/users/{user_id}/orders/{order_id}/cancel

Cancels a delivery or pickup order.

Security#

NameInDescription
AuthorizationheaderThe Authorization header with the bearer token acquired during authentication.

Parameters#

NameInRequiredDescription
order_idpathโœ…The ID of the order.
user_idpathโœ…The ID of the user.

Request Examples#

curl --request POST \  --url 'https://connect.instacart.com/v2/fulfillment/users/{user_id}/orders/{order_id}/cancel' \  --header 'Accept: application/json' \  --header 'Authorization: Bearer <token>' \  --header 'Content-Type: application/json'

Response Examples#

{  "id": "12345676789012345678780",  "status": "canceled",  "order_url": "https://example.com/example-order",  "created_at": "2018-02-22T00:00:00Z",  "cancellation_reason": "",  "locale": "en_US",  "fulfillment_details": {    "window_starts_at": "2018-02-22T00:00:00Z",    "window_ends_at": "2018-02-22T00:00:00Z"  },  "items": [    {      "line_num": "1",      "qty": 47,      "qty_unit": "each",      "replaced": false,      "scan_code": "ascandoe",      "replacement_policy": "shoppers_choice",      "item": {        "upc": "123456789012",        "rrc": "",        "requested_upc": "123456789012",        "requested_rrc": "",        "delivered_upc": "123456789012",        "delivered_rrc": ""      }    }  ]}