Skip to content

Bulk order status change

Request

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.

Security
shoptetAccessToken or shoptetPrivateApiToken
Query
suppressDocumentGenerationboolean

Suppress the generation of linked documents.

Default:false
Example:suppressDocumentGeneration=true
suppressEmailSendingboolean

Suppress sending the linked information e-mails.

Default:false
Example:suppressEmailSending=true
suppressSmsSendingboolean

Suppress sending the linked information SMS messages.

Default:false
Example:suppressSmsSending=true
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
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
    }
  }'

Responses

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.

Bodyapplication/json
dataobject or nullrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": {}, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }