> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wizcommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update order status

> Update order status. Status is passed in the request body (draft, confirmed, cancelled).

<Info>
  The `PATCH` request is used to partially update an existing entity by the
  given id. This means:

  * Only the fields provided in the request body will be updated.
  * Fields not provided in the request body will remain unchanged.
  * The request is idempotent, meaning multiple identical PATCH requests will
    always result in the same final state.
</Info>


## OpenAPI

````yaml patch /v1/orders/{id}/status
openapi: 3.0.0
info:
  description: Open API's for WizCommerce API's
  title: WizCommerce Open API's
  termsOfService: https://wizcommerce.com/terms/
  contact:
    name: Tech Support
    url: https://help.wizcommerce.com/
    email: tech@wizcommerce.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.wizcommerce.com
    description: Production BaseURL
  - url: https://api-staging.sourcerer.tech
    description: Staging BaseURL
security: []
paths:
  /v1/orders/{id}/status:
    patch:
      tags:
        - Orders
      summary: Update order status
      description: >-
        Update order status. Status is passed in the request body (draft,
        confirmed, cancelled).
      parameters:
        - description: Order ID
          name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dtos.UpdateOrderStatusRequest'
        description: Request body with status
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dtos.SuccessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    dtos.UpdateOrderStatusRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - draft
            - confirmed
            - cancelled
          x-order: '1'
          example: draft
    dtos.SuccessResponse:
      type: object
      properties:
        data:
          x-order: '1'
    errors.HttpError:
      type: object
      properties:
        code:
          type: string
          x-order: '1'
        message:
          type: string
          x-order: '2'
        details:
          type: array
          items:
            $ref: '#/components/schemas/errors.HttpErrorDetails'
          x-order: '3'
    errors.HttpErrorDetails:
      type: object
      properties:
        field:
          type: string
          x-order: '1'
        reason:
          type: string
          x-order: '2'
  securitySchemes:
    ApiKeyAuth:
      description: API Key for authentication
      type: apiKey
      name: X-API-Key
      in: header

````