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

# Create Order

> Create a new order



## OpenAPI

````yaml api-reference/openapi.json post /order
openapi: 3.1.0
info:
  title: Satsuma API
  description: API specification for Satsuma AI commerce platform
  contact:
    name: Satsuma Support
    url: https://satsuma.ai
    email: support@satsuma.ai
  version: 1.0.0
servers:
  - url: https://api.satsuma.ai
    description: Production
security:
  - apiKeyAuth: []
paths:
  /order:
    post:
      tags:
        - Order
      summary: Create Order
      description: Create a new order
      operationId: createOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOrderResponse'
components:
  schemas:
    CreateOrderRequest:
      required:
        - customer
        - fulfillment_method
        - items
        - location_id
      properties:
        tip:
          type: number
          description: Tip amount
        customer:
          $ref: '#/components/schemas/CreateOrderCustomer'
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/CreateOrderItem'
        location_id:
          type: string
          description: Location ID
        fulfillment_method:
          type: string
          description: Fulfillment method
          enum:
            - Delivery
            - Pickup
            - Shipping
        dropoff_instructions:
          type: string
          description: Dropoff instructions
      description: Create order request
    ResponseOrderResponse:
      properties:
        data:
          $ref: '#/components/schemas/OrderResponse'
        messages:
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/Message'
    CreateOrderCustomer:
      required:
        - address
        - id
        - name
        - phone_number
      properties:
        id:
          type: string
          description: Customer ID
        name:
          type: string
          description: Customer name
        email:
          type: string
          description: Customer email
        address:
          $ref: '#/components/schemas/CreateOrderCustomerAddress'
        phone_number:
          pattern: ^\+[1-9]\d{1,14}$
          type: string
          description: Customer phone number in E.164 format
          example: '+12345678901'
      description: Customer information
    CreateOrderItem:
      required:
        - product_id
        - quantity
      properties:
        product_id:
          type: string
          description: Product ID
        quantity:
          minimum: 1
          type: integer
          description: Item quantity
          format: int32
      description: Item information
    OrderResponse:
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - Pending
            - Confirmed
            - Shipped
            - Delivered
            - Cancelled
            - Refunded
        currency:
          type: string
          enum:
            - USD
            - CAD
        tip:
          type: number
        subtotal:
          type: number
        tax:
          type: number
        total:
          type: number
        customer:
          $ref: '#/components/schemas/Customer'
        fees:
          type: array
          items:
            $ref: '#/components/schemas/FeeResponse'
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemResponse'
        merchant_id:
          type: string
        location_id:
          type: string
        fulfillment_method:
          type: string
          enum:
            - Delivery
            - Pickup
            - Shipping
        fee_total:
          type: number
        dropoff_instructions:
          type: string
    Message:
      properties:
        context:
          type: string
        level:
          type: string
          enum:
            - Information
            - Warning
            - Error
        text:
          type: string
        data:
          type: object
          additionalProperties: true
    CreateOrderCustomerAddress:
      required:
        - city
        - country
        - postal_code
        - region
        - street_address
      properties:
        city:
          type: string
          description: Customer city
        region:
          pattern: ^[A-Z0-9]{1,3}$
          type: string
          description: >-
            Customer region in ISO 3166-2 subdivision format, without country
            prefix (e.g., NY for New York)
          example: NY
        country:
          pattern: ^[A-Z]{2}$
          type: string
          description: >-
            Customer country in ISO 3166-1 alpha-2 format (e.g., US for United
            States)
          example: US
        street_address:
          type: string
          description: Customer street address
        street_address_detail:
          type: string
          description: Customer street address detail
        postal_code:
          type: string
          description: Customer postal code
      description: Customer address information
    Customer:
      properties:
        id:
          type: string
        name:
          type: string
        phone:
          type: string
        email:
          type: string
        address:
          $ref: '#/components/schemas/Address'
    FeeResponse:
      properties:
        type:
          type: string
          enum:
            - DeliveryFee
            - ServiceFee
        amount:
          type: number
    OrderItemResponse:
      properties:
        quantity:
          type: integer
          format: int32
        price:
          type: number
        product_id:
          type: string
        product_name:
          type: string
    Address:
      properties:
        street_number:
          type: string
        street_name:
          type: string
        street_address:
          type: string
        street_address_detail:
          type: string
        city:
          type: string
        region:
          type: string
        postal_code:
          type: string
        country:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: API Key authentication
      name: Authorization
      in: header

````