The endpoint allows you to change the status for multiple order codes simultaneously.
Non-existing order codes are skipped and summarized in response errors. The request process continues even if some order codes are skipped.
If you try to set the status that the order already has, no change is done and the request process continues.
If at least one order code is processed successfully, the response code is 200. If all the order codes are skipped, the response code is 400. If basic validation of data fails, the response code is 422 and the request is not processed.
Status definition can include an e-mail/SMS sending, or document generation. To suppress these types of consequences you can use following query parameters: suppressEmailSending=true, suppressSmsSending=true, suppressDocumentGeneration=true.
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/status-change
- https://api.myshoptet.comhttps://api.myshoptet.com/api/orders/status-change
- shoptetAccessToken
- shoptetPrivateApiToken
curl -i -X PATCH \
'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/status-change?suppressDocumentGeneration=true&suppressEmailSending=true&suppressSmsSending=true' \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"orderCodes": [
"2017000052"
],
"statusId": -1
}
}'OK — at least one order got its new status. Orders that were skipped or left unchanged are reported in errors, one entry per order code: invalid-request-data when the code does not exist, database-conflict or record-already-changed when the order was modified concurrently (both worth retrying), and unknown-error when the order could not be saved for another reason (retrying will not help). An empty errors array means every requested order was updated.
{ "data": {}, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }