# Cancel an Order

Cancel an order that has not yet entered processing. Orders can only be cancelled while in NEW status.

Endpoint: POST /orders/{orderId}/cancel
Version: 1.0.2
Security: oauth2ClientCredentials

## Path parameters:

  - `orderId` (string, required)
    Example: "2vTgd30JFgnwLrgb383PcV9Rken"

## Response 200 fields (application/json):

  - `orderId` (string)
    ID of the cancelled order
    Example: "2vTYQiGzufR4cn1cloW97DtSOYF"

  - `status` (string)
    Order status
    Example: "CANCELLED"

## Response 404 fields (application/json):

  - `detail` (string, required)
    Detailed error message explaining the resource not found
    Example: "The requested resource could not be found"

## Response 409 fields (application/json):

  - `message` (string)
    Error message explaining why the order cannot be cancelled
    Example: "Cannot Update Order Status"


