Skip to main content

Simulate callbacks

You can test the order status callbacks that are not available through the basic workflows. When you set the status, it simulates a callback to your callback endpoint. For more information, see the Simulate order callback endpoint.

For example, to cancel an order, send the following request.

curl --request POST \
--url 'https://<instacart_development_domain>/v2/fulfillment_sandbox/orders/<order_id>/callbacks' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"event_name": "canceled"
}'

The response confirms that the order status has changed.

{
"success": true
}

To verify the order status is correct, get the order by using the Fulfillment API.

curl --request GET \
--url 'https://<instacart_development_domain>/v2/fulfillment/users/kamalsingh/orders/a1b2c3' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \