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

# Create order

> Create a new order using the streamlined v2 payload with flat schema, customer object, and products array.



## OpenAPI

````yaml /api-reference/v2/openapi.json post /orders
openapi: 3.1.0
info:
  title: Clopos Open API v2
  description: >-
    The **Clopos Open API v2** provides secure and unified access to the Clopos
    ecosystem, enabling seamless integration of POS, ordering, payments, and
    restaurant management services.
  contact:
    email: dev@clopos.com
  version: 2.0.0
  license:
    name: ''
servers:
  - url: https://integrations.clopos.com/open-api/v2
    description: '**Base Url**'
security:
  - xToken: []
tags:
  - name: Authentication
  - name: Venues
  - name: Users
  - name: Customers
  - name: Menu
  - name: Stations
  - name: Products
  - name: Price Lists
  - name: Sales
  - name: Orders
  - name: Receipts
paths:
  /orders:
    post:
      tags:
        - Orders
      summary: Create order
      description: >-
        Create a new order using the streamlined v2 payload with flat schema,
        customer object, and products array.
      requestBody:
        description: Order details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
      responses:
        '200':
          description: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderResponse'
        '400':
          description: Invalid order data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateOrderRequest:
      type: object
      required:
        - sale_type_id
        - venue_id
        - customer
        - products
      properties:
        auto_accept_terminal:
          type: integer
          description: Terminal ID that auto-accepts the order
          example: 1
        auto_order_accept:
          type: boolean
          description: Auto-accept the order
          default: false
        auto_order_sent_to_station:
          type: boolean
          description: Auto-send to stations after acceptance
          default: false
        sale_type_id:
          type: integer
          description: Sale type to use
          example: 2
        venue_id:
          type: integer
          description: Venue where the order belongs
          example: 1
        delivery_fee:
          type: number
          description: Delivery charge to apply
          example: 2.5
        comment:
          type: string
          description: Free text note for the order
          example: Leave at the door
        customer:
          $ref: '#/components/schemas/OrderCustomer'
        discount:
          type: object
          description: Order-level discount
          properties:
            discount_type:
              type: integer
              description: Discount type
              default: 0
            discount_value:
              type: number
              description: Discount value
              default: 0
        service_charge:
          type: object
          description: Service charge settings
          properties:
            enabled:
              type: boolean
              default: false
            value:
              type: number
              default: 0
        products:
          type: array
          description: List of products in the order
          items:
            $ref: '#/components/schemas/OrderProduct'
          minItems: 1
      example:
        auto_accept_terminal: 1
        auto_order_accept: true
        auto_order_sent_to_station: true
        sale_type_id: 2
        venue_id: 1
        delivery_fee: 2.5
        customer:
          id: 9
          phone: '+994705401040'
          address: 123 Main St
          customer_discount_type: 1
          name: Rahid Akhundzada
        comment: Leave at the door
        discount:
          discount_type: 1
          discount_value: 10
        service_charge:
          enabled: true
          value: 5
        products:
          - product_id: 101
            product_name: Pizza
            count: 2
            price: 8.5
            status: new
            product_hash: abc123
            portion_size: 1
            modifiers:
              - modifier_id: 501
                modifier_name: Extra Cheese
                count: 1
                price: 0.5
                portion_size: 1
    CreateOrderResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            status:
              type: string
              example: PENDING
            payload:
              type: object
              properties:
                updated_at:
                  type: string
                  format: date-time
                created_at:
                  type: string
                  format: date-time
                id:
                  type: integer
                venue_id:
                  type: integer
      example:
        success: true
        message: Order created
        data:
          status: PENDING
          payload:
            updated_at: '2026-01-08T06:28:23.000000Z'
            created_at: '2026-01-08T06:28:23.000000Z'
            id: 295
            venue_id: 1
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
    OrderCustomer:
      type: object
      description: Customer information for the order
      required:
        - id
        - phone
        - address
        - name
      properties:
        id:
          type: integer
          description: Customer ID
          example: 9
        phone:
          type: string
          description: Customer phone number
          example: '+994705401040'
        address:
          type: string
          description: Delivery address
          example: 123 Main St
        customer_discount_type:
          type: integer
          description: Customer discount type
        name:
          type: string
          description: Customer name
          example: Rahid Akhundzada
    OrderProduct:
      type: object
      required:
        - product_id
        - product_name
        - count
        - price
        - status
        - product_hash
      properties:
        product_id:
          type: integer
          description: Product identifier
          example: 101
        product_name:
          type: string
          description: Display name of the product
          example: Pizza
        count:
          type: integer
          description: Quantity
          example: 2
        price:
          type: number
          description: Unit price
          example: 8.5
        status:
          type: string
          description: Product status
          example: new
        product_hash:
          type: string
          description: Product hash identifier
          example: abc123
        portion_size:
          type: number
          description: Portion size
          default: 1
        modifiers:
          type: array
          description: List of modifiers for the product
          default: []
          items:
            $ref: '#/components/schemas/OrderModifier'
    OrderModifier:
      type: object
      required:
        - modifier_id
        - modifier_name
        - count
      properties:
        modifier_id:
          type: integer
          description: Modifier identifier
          example: 501
        modifier_name:
          type: string
          description: Display name of the modifier
          example: Extra Cheese
        count:
          type: integer
          description: Quantity
          example: 1
        price:
          type: number
          description: Modifier price
          default: 0
          example: 0.5
        portion_size:
          type: number
          description: Portion size
          default: 1
  securitySchemes:
    xToken:
      type: apiKey
      in: header
      name: x-token
      description: JWT access token obtained from /v2/auth endpoint

````