---
title: Order cancellation request
slug: mihai-tests/order-cancellation-request
createdAt: 2025-05-09T09:41:47.055Z
---

{
  "id": "YUO6Bpu6_jTrlPOSENzoz",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://{domain}/app/logisticsorders/v1/api/orders/{orderId}/cancel",
    "servers": [
      {
        "url": "https://{domain}/app/logisticsorders/v1/api/orders/{orderId}/cancel"
      }
    ],
    "name": "Order cancellation request",
    "description": "Order cancellation request",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "orderId",
          "type": "string",
          "description": "Code of an entity."
        }
      ],
      "headerParameters": [
        {
          "kind": "required",
          "name": "X-COREOS-REQUEST-ID",
          "type": "string",
          "description": "Unique requestId"
        },
        {
          "kind": "required",
          "name": "X-COREOS-TID",
          "type": "string",
          "description": "Tenant id"
        },
        {
          "kind": "required",
          "name": "X-COREOS-ACCESS",
          "type": "string",
          "description": "<p>core-os access token</p>"
        },
        {
          "kind": "required",
          "name": "X-COREOS-USERINFO",
          "type": "string",
          "description": "<p>core-os user info token</p>"
        },
        {
          "kind": "optional",
          "name": "X-COREOS-CALLBACK-SECRET",
          "type": "string",
          "description": "<p>Core-os secret token</p>"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "CancelOrderRequest",
          "schema": [
            {
              "name": "callback",
              "kind": "optional",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/Callback",
              "customType": "Callback",
              "schema": [
                {
                  "name": "url",
                  "kind": "optional",
                  "type": "string<uri>",
                  "example": "https://delhivery.requestcatcher.com/"
                },
                {
                  "name": "meta",
                  "kind": "optional",
                  "type": "object",
                  "example": "",
                  "schema": []
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/CancelOrderRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "202",
        "description": "Accepted",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "RequestProcessedSuccessResponse",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "object",
                "description": "Error Information",
                "modelRef": "#/components/schemas/Error",
                "customType": "Error",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error code",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error description",
                    "example": ""
                  },
                  {
                    "name": "additionalInfo",
                    "kind": "optional",
                    "type": "object",
                    "description": "Additional information related to the error",
                    "example": "",
                    "schema": []
                  }
                ]
              },
              {
                "name": "request",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/Request",
                "customType": "Request",
                "schema": [
                  {
                    "name": "uri",
                    "kind": "required",
                    "type": "string",
                    "description": "The API end point where the request was received",
                    "example": ""
                  },
                  {
                    "name": "method",
                    "kind": "optional",
                    "type": "string<POST | GET | PUT>",
                    "description": "HTTP method requested on the API endpoint",
                    "example": ""
                  },
                  {
                    "name": "queryString",
                    "kind": "optional",
                    "type": "string",
                    "description": "Query string received by the server",
                    "example": ""
                  },
                  {
                    "name": "body",
                    "kind": "optional",
                    "type": "object",
                    "description": "Request body data received by the server",
                    "example": "",
                    "schema": []
                  }
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "success message",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/RequestProcessedSuccessResponse",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "error",
                    "kind": "required",
                    "type": "object",
                    "description": "Error Information",
                    "modelRef": "#/components/schemas/Error",
                    "customType": "Error",
                    "schema": [
                      {
                        "name": "code",
                        "kind": "optional",
                        "type": "string",
                        "description": "Error code",
                        "example": ""
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "description": "Error description",
                        "example": ""
                      },
                      {
                        "name": "additionalInfo",
                        "kind": "optional",
                        "type": "object",
                        "description": "Additional information related to the error",
                        "example": "",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "request",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/Request",
                    "customType": "Request",
                    "schema": [
                      {
                        "name": "uri",
                        "kind": "required",
                        "type": "string",
                        "description": "The API end point where the request was received",
                        "example": ""
                      },
                      {
                        "name": "method",
                        "kind": "optional",
                        "type": "string<POST | GET | PUT>",
                        "description": "HTTP method requested on the API endpoint",
                        "example": ""
                      },
                      {
                        "name": "queryString",
                        "kind": "optional",
                        "type": "string",
                        "description": "Query string received by the server",
                        "example": ""
                      },
                      {
                        "name": "body",
                        "kind": "optional",
                        "type": "object",
                        "description": "Request body data received by the server",
                        "example": "",
                        "schema": []
                      }
                    ]
                  }
                ],
                "modelRef": "#/components/schemas/ErrorResponse",
                "customType": "ErrorResponse"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "data",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "string",
                        "description": "success message",
                        "example": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "complexType": "allOf",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Error Occurred",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "PutErrorResponse",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "object",
                "description": "Error Information",
                "modelRef": "#/components/schemas/Error",
                "customType": "Error",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error code",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error description",
                    "example": ""
                  },
                  {
                    "name": "additionalInfo",
                    "kind": "optional",
                    "type": "object",
                    "description": "Additional information related to the error",
                    "example": "",
                    "schema": []
                  }
                ]
              },
              {
                "name": "request",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/Request",
                "customType": "Request",
                "schema": [
                  {
                    "name": "uri",
                    "kind": "required",
                    "type": "string",
                    "description": "The API end point where the request was received",
                    "example": ""
                  },
                  {
                    "name": "method",
                    "kind": "optional",
                    "type": "string<POST | GET | PUT>",
                    "description": "HTTP method requested on the API endpoint",
                    "example": ""
                  },
                  {
                    "name": "queryString",
                    "kind": "optional",
                    "type": "string",
                    "description": "Query string received by the server",
                    "example": ""
                  },
                  {
                    "name": "body",
                    "kind": "optional",
                    "type": "object",
                    "description": "Request body data received by the server",
                    "example": "",
                    "schema": []
                  }
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique ID. Combination of entity name and UUID.",
                    "modelRef": "#/components/schemas/UniqueId",
                    "customType": "UniqueId",
                    "schema": []
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/PutErrorResponse",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "error",
                    "kind": "required",
                    "type": "object",
                    "description": "Error Information",
                    "modelRef": "#/components/schemas/Error",
                    "customType": "Error",
                    "schema": [
                      {
                        "name": "code",
                        "kind": "optional",
                        "type": "string",
                        "description": "Error code",
                        "example": ""
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "description": "Error description",
                        "example": ""
                      },
                      {
                        "name": "additionalInfo",
                        "kind": "optional",
                        "type": "object",
                        "description": "Additional information related to the error",
                        "example": "",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "request",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/Request",
                    "customType": "Request",
                    "schema": [
                      {
                        "name": "uri",
                        "kind": "required",
                        "type": "string",
                        "description": "The API end point where the request was received",
                        "example": ""
                      },
                      {
                        "name": "method",
                        "kind": "optional",
                        "type": "string<POST | GET | PUT>",
                        "description": "HTTP method requested on the API endpoint",
                        "example": ""
                      },
                      {
                        "name": "queryString",
                        "kind": "optional",
                        "type": "string",
                        "description": "Query string received by the server",
                        "example": ""
                      },
                      {
                        "name": "body",
                        "kind": "optional",
                        "type": "object",
                        "description": "Request body data received by the server",
                        "example": "",
                        "schema": []
                      }
                    ]
                  }
                ],
                "modelRef": "#/components/schemas/ErrorResponse",
                "customType": "ErrorResponse"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "data",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Unique ID. Combination of entity name and UUID.",
                        "modelRef": "#/components/schemas/UniqueId",
                        "customType": "UniqueId",
                        "schema": []
                      }
                    ]
                  }
                ]
              }
            ],
            "complexType": "allOf",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Error Occurred",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "PutErrorResponse",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "object",
                "description": "Error Information",
                "modelRef": "#/components/schemas/Error",
                "customType": "Error",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error code",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error description",
                    "example": ""
                  },
                  {
                    "name": "additionalInfo",
                    "kind": "optional",
                    "type": "object",
                    "description": "Additional information related to the error",
                    "example": "",
                    "schema": []
                  }
                ]
              },
              {
                "name": "request",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/Request",
                "customType": "Request",
                "schema": [
                  {
                    "name": "uri",
                    "kind": "required",
                    "type": "string",
                    "description": "The API end point where the request was received",
                    "example": ""
                  },
                  {
                    "name": "method",
                    "kind": "optional",
                    "type": "string<POST | GET | PUT>",
                    "description": "HTTP method requested on the API endpoint",
                    "example": ""
                  },
                  {
                    "name": "queryString",
                    "kind": "optional",
                    "type": "string",
                    "description": "Query string received by the server",
                    "example": ""
                  },
                  {
                    "name": "body",
                    "kind": "optional",
                    "type": "object",
                    "description": "Request body data received by the server",
                    "example": "",
                    "schema": []
                  }
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique ID. Combination of entity name and UUID.",
                    "modelRef": "#/components/schemas/UniqueId",
                    "customType": "UniqueId",
                    "schema": []
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/PutErrorResponse",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "error",
                    "kind": "required",
                    "type": "object",
                    "description": "Error Information",
                    "modelRef": "#/components/schemas/Error",
                    "customType": "Error",
                    "schema": [
                      {
                        "name": "code",
                        "kind": "optional",
                        "type": "string",
                        "description": "Error code",
                        "example": ""
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "description": "Error description",
                        "example": ""
                      },
                      {
                        "name": "additionalInfo",
                        "kind": "optional",
                        "type": "object",
                        "description": "Additional information related to the error",
                        "example": "",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "request",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/Request",
                    "customType": "Request",
                    "schema": [
                      {
                        "name": "uri",
                        "kind": "required",
                        "type": "string",
                        "description": "The API end point where the request was received",
                        "example": ""
                      },
                      {
                        "name": "method",
                        "kind": "optional",
                        "type": "string<POST | GET | PUT>",
                        "description": "HTTP method requested on the API endpoint",
                        "example": ""
                      },
                      {
                        "name": "queryString",
                        "kind": "optional",
                        "type": "string",
                        "description": "Query string received by the server",
                        "example": ""
                      },
                      {
                        "name": "body",
                        "kind": "optional",
                        "type": "object",
                        "description": "Request body data received by the server",
                        "example": "",
                        "schema": []
                      }
                    ]
                  }
                ],
                "modelRef": "#/components/schemas/ErrorResponse",
                "customType": "ErrorResponse"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "data",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Unique ID. Combination of entity name and UUID.",
                        "modelRef": "#/components/schemas/UniqueId",
                        "customType": "UniqueId",
                        "schema": []
                      }
                    ]
                  }
                ]
              }
            ],
            "complexType": "allOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://{domain}/app/logisticsorders/v1/api/orders/{orderId}/cancel \\\n     --header 'accept: application/json' \\\n     --header 'x-coreos-request-id: string' \\\n     --header 'x-coreos-tid: string' \\\n     --header 'x-coreos-access: string' \\\n     --header 'x-coreos-userinfo: string'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-coreos-request-id\", \"string\");\nmyHeaders.append(\"x-coreos-tid\", \"string\");\nmyHeaders.append(\"x-coreos-access\", \"string\");\nmyHeaders.append(\"x-coreos-userinfo\", \"string\");\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://{domain}/app/logisticsorders/v1/api/orders/{orderId}/cancel\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://{domain}/app/logisticsorders/v1/api/orders/{orderId}/cancel\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-coreos-request-id\"] = \"string\"\nrequest[\"x-coreos-tid\"] = \"string\"\nrequest[\"x-coreos-access\"] = \"string\"\nrequest[\"x-coreos-userinfo\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://{domain}/app/logisticsorders/v1/api/orders/{orderId}/cancel\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-coreos-request-id': 'string',\n   'x-coreos-tid': 'string',\n   'x-coreos-access': 'string',\n   'x-coreos-userinfo': 'string'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-202",
          "language": "202",
          "code": "// Accepted\n{\n  \"error\": {\n    \"code\": \"\",\n    \"description\": \"\",\n    \"additionalInfo\": {}\n  },\n  \"request\": {\n    \"uri\": \"\",\n    \"method\": \"\",\n    \"queryString\": \"\",\n    \"body\": {}\n  },\n  \"data\": {\n    \"id\": \"\"\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Error Occurred\n{\n  \"error\": {\n    \"code\": \"\",\n    \"description\": \"\",\n    \"additionalInfo\": {}\n  },\n  \"request\": {\n    \"uri\": \"\",\n    \"method\": \"\",\n    \"queryString\": \"\",\n    \"body\": {}\n  },\n  \"data\": {\n    \"id\": \"\"\n  }\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Error Occurred\n{\n  \"error\": {\n    \"code\": \"\",\n    \"description\": \"\",\n    \"additionalInfo\": {}\n  },\n  \"request\": {\n    \"uri\": \"\",\n    \"method\": \"\",\n    \"queryString\": \"\",\n    \"body\": {}\n  },\n  \"data\": {\n    \"id\": \"\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-202"
    }
  },
  "children": [
    {
      "id": "74u2yCilZaq-errOYVQ-d",
      "type": "paragraph",
      "children": [
        {
          "text": "Order cancellation request"
        }
      ]
    }
  ]
}