Cancel deals
POST/v1/orders/cancel
Calls off up to 100 of your deals at once, those of them that can be called off now, as cancel-deal would. The answer names them. If none could, the refusal says why the first could not.
Request
Request body
idsstring[]requiredThe deals: those asked about, or in an answer those it changed.
curl -X POST 'https://api.rockvel.store/v1/orders/cancel' \
-H "Authorization: Bearer $ROCKVEL_KEY" \
-H 'Content-Type: application/json' \
-d '{"ids":["019a4c1e-6f3a-7c21-9d40-5b2e8f1a7c03"]}'Answer 200
idsstring[]The deals: those asked about, or in an answer those it changed.
{ "ids": ["019a4c1e-6f3a-7c21-9d40-5b2e8f1a7c03"] }Refusals
| Status | Code | When |
|---|---|---|
| 403 | not_your_order | This deal isn't yours, or this step belongs to the other side. |
| 404 | no_such_order | There is no such deal. |
| 409 | order_moved_on | The deal moved on and this step no longer applies. Read it again. |
| 409 | too_early | The seller still has time: wait for buyer_cancels_at. |
| 422 | too_many_lots | More than 100 items in one request. |
Any route can also answer with the statuses on the Errors page.