> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Post v1adminorders cancel



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml post /v1/admin/orders/{orderID}/cancel
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/admin/orders/{orderID}/cancel:
    post:
      tags:
        - orders
      operationId: cancelOrder
      parameters:
        - $ref: '#/components/parameters/OrderID'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
      responses:
        '200':
          description: Idempotently cancelled order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '409':
          $ref: '#/components/responses/Problem'
      security:
        - operatorToken: []
components:
  parameters:
    OrderID:
      in: path
      name: orderID
      required: true
      schema:
        type: string
        format: uuid
    IdempotencyKey:
      in: header
      name: Idempotency-Key
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 128
  schemas:
    Order:
      type: object
      properties:
        id:
          type: string
          format: uuid
        customerId:
          type: string
          format: uuid
        state:
          type: string
          enum:
            - draft
            - pending
            - paid
            - fulfilled
            - cancelled
            - expired
            - partially_refunded
            - refunded
        operation:
          type: string
        currency:
          type: string
        subtotalMinor:
          type: integer
          format: int64
        discountMinor:
          type: integer
          format: int64
        walletMinor:
          type: integer
          format: int64
        externalMinor:
          type: integer
          format: int64
        paidMinor:
          type: integer
          format: int64
        refundedMinor:
          type: integer
          format: int64
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    operatorToken:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.