---
agentTools:
  projectIndex: https://docs.instamojo.com/v2-mdp/llms.txt
---

# Cancel Order

Use to Cancel an Order that was placed on the merchant's Instamojo Online Store.

`32568` in the API URL is the Order ID against which you want to update the Order details.
The Payload data needs to be passed in `form-data` format.

The param that you need to be using for this API endpoint to function is the "id" param.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API v2",
    "version": "2-mdp"
  },
  "servers": [
    {
      "url": "https://api.instamojo.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-default": "Bearer {{access_token}}"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v2/store/orders/32568/cancel/": {
      "patch": {
        "summary": "Cancel Order",
        "description": "Use to Cancel an Order that was placed on the merchant's Instamojo Online Store.",
        "operationId": "cancel-order",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "Bearer <token>"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "cancellation_reason"
                ],
                "properties": {
                  "cancellation_reason": {
                    "type": "string",
                    "description": "string",
                    "default": "Mark cancel"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"order_status\": \"cancelled\"\n}\n\n{\n  \"order_status\": \"cancel-requested\"\n}"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "4XX",
            "content": {
              "application/json": {
                "examples": {
                  "Errors": {
                    "value": "{\n  \"non_field_errors\": [\n    \"Cannot cancel order with order status initiated\"\n  ]\n}\n\n{\n  \"non_field_errors\": [\n    \"Cannot cancel order with transaction status success\"\n  ]\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "text",
              "code": "Payload example: \n\n{\n  \"cancellation_reason\": \"Mark cancel\"\n}"
            }
          ],
          "samples-languages": [
            "text"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "63053f959807941f67a92cfe:60ca6842be2e9400483ca541"
}
```