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

# Create Order

> Issue tickets, like the dashboard does for guests and reservations: free at once, or with a payment link the buyer pays on Tickable's hosted page (service fee included, as in the shop). Capacity, the timeslot and the ticket types' timeslots are checked in one transaction; sale windows do not apply, as for tickets issued from the dashboard. Send an `Idempotency-Key` so a retry cannot issue twice. Requires the `orders.write` scope.



## OpenAPI

````yaml post /orders
openapi: 3.0.0
info:
  version: 1.0.0
  title: Tickable API
  description: >-
    The Tickable API provides programmatic access to events, orders, tickets,
    and webhooks for your organization.
  contact:
    name: Tickable
    url: https://tickable.nl
servers:
  - url: https://api.tickable.io
    description: Production
security:
  - Bearer: []
tags:
  - name: Events
    description: Manage events
  - name: Tickets
    description: View tickets
  - name: Orders
    description: View orders
  - name: Webhooks
    description: Manage webhook subscriptions
  - name: User
    description: Current user information
  - name: OAuth
    description: OAuth2 authorization and token endpoints
paths:
  /orders:
    post:
      tags:
        - Orders
      summary: Create order
      description: >-
        Issue tickets, like the dashboard does for guests and reservations: free
        at once, or with a payment link the buyer pays on Tickable's hosted page
        (service fee included, as in the shop). Capacity, the timeslot and the
        ticket types' timeslots are checked in one transaction; sale windows do
        not apply, as for tickets issued from the dashboard. Send an
        `Idempotency-Key` so a retry cannot issue twice. Requires the
        `orders.write` scope.
      operationId: createOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrder'
      responses:
        '200':
          description: Order created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDetail'
        '400':
          description: Invalid order, e.g. a ticket type of another event
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed to issue tickets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Event not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Not enough places left
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Bearer: []
components:
  schemas:
    CreateOrder:
      type: object
      properties:
        event_id:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        timeslot_id:
          type: string
          format: uuid
          description: Required when the event has more than one timeslot
          example: d4e5f6a7-8901-4b2c-3d4e-5f6a7b8c9d0e
        lines:
          type: array
          items:
            type: object
            properties:
              ticket_type_id:
                type: string
                format: uuid
                example: b2c4e6a8-1234-4f5a-9c8d-0e1f2a3b4c5d
              amount:
                type: integer
                minimum: 1
                maximum: 100
                description: Number of tickets
                example: 2
            required:
              - ticket_type_id
              - amount
          minItems: 1
          maxItems: 50
        buyer:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              example: Jane Doe
            email:
              type: string
              format: email
              example: jane@example.com
            language:
              type: string
              pattern: ^[a-z]{2}$
              description: Language of the mails, e.g. `nl` or `en`
              example: nl
          default: {}
        payment:
          type: string
          enum:
            - free
            - link
          default: free
          description: >-
            `free`: the tickets are issued at once at no charge (a guest list).
            `link`: the order waits for payment until `expires_at`; the buyer
            gets a mail with the payment link, which is also returned as
            `payment_url`.
          example: link
        expires_at:
          type: string
          format: date-time
          description: >-
            Only for `link`: until when the order can be paid and keeps its
            places. Default 24 hours, at most 30 days.
          example: '2026-06-10T18:00:00Z'
        send_mail:
          type: boolean
          default: true
          description: >-
            For `free`: mail the tickets to the buyer. A `link` order always
            mails the payment link.
          example: true
      required:
        - event_id
        - lines
    OrderDetail:
      allOf:
        - $ref: '#/components/schemas/Order'
        - type: object
          properties:
            metadata:
              type: object
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - nullable: true
              description: >-
                Visitor Information values, keyed by the field's `key`. Empty
                when the event has no custom fields.
              example:
                naam_deelnemer: Jane Doe
                email_deelnemer: jane@example.com
            metadata_fields:
              type: array
              items:
                $ref: '#/components/schemas/MetadataField'
              description: >-
                The same Visitor Information values, with the dashboard label
                for each field.
            order_lines:
              type: array
              items:
                $ref: '#/components/schemas/OrderLine'
            order_url:
              type: string
              description: The buyer's order page, with the tickets
              example: >-
                https://myorg.tickable.nl/order/f47ac10b-58cc-4372-a567-0e02b2c3d479
            payment_url:
              type: string
              nullable: true
              description: Where the buyer pays an unpaid reservation; `null` otherwise
              example: >-
                https://myorg.tickable.nl/pay/f47ac10b-58cc-4372-a567-0e02b2c3d479
          required:
            - metadata
            - metadata_fields
            - order_lines
            - order_url
            - payment_url
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - not_found_error
                - idempotency_error
                - api_error
              example: not_found_error
            code:
              type: string
              example: resource_missing
            message:
              type: string
              example: No such event.
            param:
              type: string
              description: The parameter the error relates to, if any
              example: event_id
            request_id:
              type: string
              description: Quote this when contacting support
              example: req_3f2a9c1b7d4e4f0a8b6c5d2e1f0a9b8c
          required:
            - type
            - code
            - message
            - request_id
      required:
        - error
    Order:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        event_id:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        event_timeslot_id:
          type: string
          nullable: true
          format: uuid
          example: d4e5f6a7-8901-4b2c-3d4e-5f6a7b8c9d0e
        buyer_name:
          type: string
          nullable: true
          example: Jane Doe
        buyer_email:
          type: string
          nullable: true
          example: jane@example.com
        channel:
          type: string
          enum:
            - shop
            - import
            - api
            - swapped
            - reservation
            - guest
            - pos
            - hold
            - moved
            - test
            - waitlist
          description: >-
            Where the order came from: `shop`, `guest` (issued for free),
            `reservation` (a payment link), `pos`, `waitlist`, ...
          example: shop
        payment_method:
          type: string
          nullable: true
          example: ideal
        total_price:
          type: integer
          nullable: true
          description: Order total in cents (EUR), including VAT
          example: 5000
        refunded:
          type: integer
          description: Amount refunded in cents (EUR)
          example: 0
        payed_at:
          type: string
          nullable: true
          example: '2026-06-15T14:30:00Z'
        created_at:
          type: string
          example: '2026-06-15T14:25:00Z'
      required:
        - id
        - event_id
        - event_timeslot_id
        - buyer_name
        - buyer_email
        - channel
        - payment_method
        - total_price
        - refunded
        - payed_at
        - created_at
    MetadataField:
      type: object
      properties:
        id:
          type: string
          nullable: true
          description: >-
            Metadata field ID, or `null` for values without a matching field
            definition
          example: 9f8e7d6c-5b4a-4392-8171-6f5e4d3c2b1a
        key:
          type: string
          description: Stable key, matching the key used in `metadata`
          example: naam_deelnemer
        name:
          type: string
          nullable: true
          description: Label as configured in the dashboard
          example: Naam deelnemer
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - nullable: true
          example: Jane Doe
      required:
        - id
        - key
        - name
        - value
    OrderLine:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: a1b2c3d4-5678-4e9f-0a1b-2c3d4e5f6a7b
        ticket_type_id:
          type: string
          nullable: true
          format: uuid
          example: b2c4e6a8-1234-4f5a-9c8d-0e1f2a3b4c5d
        description:
          type: string
          nullable: true
          example: Early Bird
        amount:
          type: number
          description: Number of tickets or items on this line
          example: 2
        cancelled_amount:
          type: number
          description: How many of them were cancelled
          example: 0
        item_price:
          type: integer
          nullable: true
          description: Price per item in cents (EUR)
          example: 2500
        discount:
          type: integer
          description: Discount on this line in cents (EUR)
          example: 0
        total_price:
          type: integer
          description: Line total in cents (EUR)
          example: 5000
      required:
        - id
        - ticket_type_id
        - description
        - amount
        - cancelled_amount
        - item_price
        - discount
        - total_price
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: >-
        Pass as `Authorization: Bearer {token}`. Accepts either an OAuth2 JWT
        access token or an API key (`tk_live_...`) created from the Tickable
        dashboard.

````

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