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

# Create Orders

> Create one or more orders



## OpenAPI

````yaml POST /orders
openapi: 3.0.1
info:
  title: Konvo API
  description: Access to your contact, broadcast, attribution & clicks data
  license:
    name: MIT
  version: 0.0.1
servers:
  - url: https://api.konvoai.com
security:
  - apiKeyAuth: []
paths:
  /orders:
    post:
      description: Create one or more orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/OrderInput'
              minItems: 1
      responses:
        '201':
          description: Orders created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: Number of orders created
                    example: 2
                  result:
                    type: array
                    description: Array of created orders
                    items:
                      $ref: '#/components/schemas/Order'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrderInput:
      type: object
      required:
        - id
        - friendlyName
        - customer
        - orderTotal
        - currency
        - items
      properties:
        id:
          type: string
          description: Unique order identifier
          example: 08c0e60e-26bd-4e41-bb05-97bfbe1ba7cd
        externalId:
          type: string
          description: Order ID in the external system (your internal ID)
          example: order_12345
        friendlyName:
          type: string
          description: 'Human-readable order name (e.g., #1059)'
          example: '#1059'
        customer:
          $ref: '#/components/schemas/OrderCustomer'
        orderTotal:
          type: number
          description: Total order amount in Stripe format (e.g., 3995 = $39.95)
          example: 3995
        currency:
          type: string
          description: Currency code following ISO 4217 standard
          example: USD
        items:
          type: array
          description: Array of ordered items
          items:
            $ref: '#/components/schemas/OrderedItem'
        metadata:
          type: object
          description: Additional information in JSON format for AI prompting
          example:
            preorder: true
            gift_message: Happy Birthday!
        status:
          type: string
          description: Current order status
          enum:
            - open
            - paid
            - refunded
            - partially_refunded
            - cancelled
            - disputed
            - completed
            - shipped
            - fulfilled
          example: paid
        shipmentStatus:
          type: string
          description: Shipping status
          enum:
            - none
            - confirmed
            - in_transit
            - out_for_delivery
            - attempted_delivery
            - ready_for_pickup
            - delivered
            - failure
          example: in_transit
        source:
          type: string
          description: Order source
          enum:
            - online
            - in_store
          example: online
        trackingUrl:
          type: string
          description: Shipping tracking URL
          example: https://tracking.example.com/12345
        address:
          $ref: '#/components/schemas/OrderAddress'
    Order:
      properties:
        id:
          type: string
          example: be6ed223-19c3-47db-8635-794f856e1956
        contactId:
          type: string
          example: 21f0cf2f-30cd-4e13-9cde-7a3e4e77deff
        externalName:
          type: string
          example: '1001'
        externalId:
          type: string
          example: '5210634092624'
        firstName:
          type: string
          example: Jeff
        lastName:
          type: string
          example: Bezos
        email:
          type: string
          example: jeff@amazon.com
        phoneNumber:
          type: string
          example: '+15551234'
        orderTotal:
          type: number
          example: 69995
        currency:
          type: string
          example: eur
        channel:
          type: string
          example: SHOPIFY
        status:
          type: string
          example: PAID
        trackingUrl:
          type: string
          example: https://{{YOUR_SHOPIFY_URL}}.myshopify.com/{{EXTERNAL_ID}}
        createdAt:
          type: string
          example: '2024-11-07T11:57:25.000Z'
        updatedAt:
          type: string
          example: '2024-11-07T11:57:25.000Z'
        shopId:
          type: string
          example: '{{YOUR_SHOPIFY_URL}}.myshopify.com'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    OrderCustomer:
      type: object
      required:
        - id
        - firstName
        - lastName
      properties:
        id:
          type: string
          description: Unique customer identifier
          example: customer_67890
        firstName:
          type: string
          description: Customer's first name
          example: John
        lastName:
          type: string
          description: Customer's last name
          example: Doe
        userIds:
          type: array
          description: Customer identifiers (email, phone, handle, etc.)
          items:
            $ref: '#/components/schemas/OrderUserId'
    OrderedItem:
      type: object
      required:
        - id
        - sku
        - name
        - description
        - price
        - msrp
        - imageUrl
        - currency
      properties:
        id:
          type: string
          description: Product variant ID
          example: variant_123
        sku:
          type: string
          description: Stock Keeping Unit
          example: SHIRT-BLU-M
        name:
          type: string
          description: Product variant name
          example: Blue T-Shirt - Medium
        description:
          type: string
          description: Product description
          example: Comfortable cotton t-shirt in blue
        price:
          type: number
          description: Current price in Stripe format (e.g., 3995 = 39.95)
          example: 2999
        msrp:
          type: number
          description: >-
            Manufacturer's suggested retail price in Stripe format (e.g., 3995 =
            39.95)
          example: 3999
        imageUrl:
          type: string
          description: Product image URL
          example: https://example.com/images/blue-tshirt.jpg
        currency:
          type: string
          description: Currency code
          example: USD
        available:
          type: boolean
          description: Whether the product is available
          example: true
        inventoryQuantity:
          type: number
          description: Available inventory quantity
          example: 150
        quantity:
          type: number
          description: Quantity ordered
          example: 2
    OrderAddress:
      type: object
      required:
        - firstName
        - lastName
        - addressLineOne
        - addressLineTwo
        - zipCode
        - city
        - countryCode
      properties:
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        addressLineOne:
          type: string
          example: 123 Main St
        addressLineTwo:
          type: string
          example: Apt 4B
        zipCode:
          type: string
          example: '10001'
        city:
          type: string
          example: New York
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 country code
          example: US
        state:
          type: string
          example: NY
        latitude:
          type: string
          example: '40.7128'
        longitude:
          type: string
          example: '-74.0060'
        company:
          type: string
          example: Acme Corp
        phone:
          type: string
          example: '+15551234567'
    OrderUserId:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: Type of user identifier
          enum:
            - phone
            - email
            - handle
          example: email
        id:
          type: string
          description: The identifier value
          example: john.doe@example.com
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````