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

# Get or create an active order

> Auth: optional. This endpoint will return the currently active order (indentified by a cookie). Otherwise, the response would be empty.

Note that orders expire automatically at `expires_at`. This date will be extended with each booking which is added to the order.
An order with `status=draft` represents a cart.



## OpenAPI

````yaml /developers/openapi/customer.openapi.json get /api/v1/order
openapi: 3.1.0
info:
  title: customer-api
  version: '1.0'
  contact:
    name: anny GmbH
    url: anny.co
    email: support@anny.co
  description: >-
    The Customer API is the **public booking surface** for end-user facing
    applications. It covers everything a customer can see and do — searching
    availability, placing bookings, managing their account, and more.


    ---


    ## When to use the Customer API


    Use the Customer API when you are **building something your customers
    interact with directly**:


    - **Custom booking flow** — embed a fully branded booking experience inside
    your own app or website instead of redirecting to anny

    - **Headless checkout** — drive the cart, checkout, and payment steps
    entirely from your own frontend

    - **Custom confirmation pages** — retrieve booking and order details after
    checkout to render a tailored confirmation

    - **Opening hours and availability on public pages** — display live schedule
    data on your website with no authentication required

    - **White-label experiences** — build lobby screens, kiosks, or mobile apps
    on top of the Customer API


    Many endpoints work **without any authentication**. For a custom OAuth2
    client to authenticate your own users, contact
    [support@anny.co](mailto:support@anny.co) with your use case.


    ---


    ## Authentication — Optional Auth


    Most Customer API endpoints work without a token. Providing a customer
    bearer token unlocks personal data and additional actions:


    | Auth state | What's accessible |

    |---|---|

    | Anonymous | Availability, public resource/service info, booking lookup by
    number, checkout |

    | Customer token | Own bookings, account data, communities, passes, queue
    tickets |


    ```

    Authorization: Bearer {customer_access_token}

    ```


    To authenticate your own users, you need a custom OAuth2 client — contact
    [support@anny.co](mailto:support@anny.co). See the [Authentication
    guide](/developers/guides/authentication) for the full token flow.


    ---


    ## Customer API vs Admin API


    | Feature | Customer API | Admin API |

    |---|---|---|

    | **Use case** | End-user apps, booking widgets | Server-side automation,
    backend tooling |

    | **Auth** | Optional — many endpoints work without a token | Required — API
    token or OAuth2 |

    | **Identifiers** | Slugs, booking numbers, order numbers | Immutable UUIDs
    and integer IDs |

    | **Access** | Public and customer-owned data only | Full read/write |


    → [Go to the Admin API](/developers/api-reference/admin)


    ---


    ## Resource Identifiers


    The Customer API uses **human-readable identifiers** that appear in booking
    URLs:


    | Entity | Identifier | Example |

    |---|---|---|

    | Resources | Slug | `conference-room-berlin` |

    | Services | Slug | `hourly-desk-booking` |

    | Organizations | Slug | `acme-gmbh` |

    | Bookings | Booking number | `BB123456789` |

    | Orders | Order number | `BO123456789` |


    Use the Admin API if you need immutable internal IDs for storage in external
    systems.


    ---


    ## Starting Points


    | Guide | What it covers |

    |---|---|

    | [Getting Started](/developers) | First steps and quickstart |

    | [JSON:API Conventions](/developers/guides/json-api-conventions) | Request
    and response format |

    | [Authentication](/developers/guides/authentication) | Customer token flow,
    OAuth2, anonymous access |

    | [Availability & Booking Search](/developers/guides/availability) | Search
    open slots, filter by service and resource |

    | [Customer Booking
    Lifecycle](/developers/guides/customer/booking-lifecycle) | View, modify,
    and cancel bookings |

    | [Order & Checkout Flow](/developers/guides/customer/checkout) | Cart,
    checkout steps, payment |

    | [Plans & Subscriptions](/developers/guides/customer/plans-subscriptions) |
    Membership plans and recurring billing |

    | [Communities & Access Control](/developers/guides/customer/communities) |
    Community membership and access gates |

    | [Waitlist](/developers/guides/customer/waitlist) | Join and manage
    waitlists |


    ---


    ## Base URLs


    | Environment | URL |

    |---|---|

    | Production | `https://b.anny.co` |

    | Gov-Cloud | `https://b.anny.eu` |
  termsOfService: https://anny.co/terms-of-use
  x-logo:
    url: https://cdn.anny.co/cms/anny_logo_main_colour_blue_4865e76654.svg
    altText: anny logo
    href: https://anny.co
servers:
  - url: https://b.anny.co
    description: Production
  - url: https://b.anny.eu
    description: Gov-Cloud
security: []
tags:
  - name: Account Passes
  - name: Account Skills
  - name: Addresses
  - name: Availability
  - name: Booking Bundles
  - name: Booking Passes
  - name: Booking Quota Grants
  - name: Bookings
  - name: Communities
  - name: Community Accounts
  - name: Community Invites
  - name: Customer Accounts
  - name: Favorites
  - name: Orders
  - name: Organizations
  - name: Plan Subscriptions
  - name: Properties
  - name: Queues
  - name: Queue Tickets
  - name: Resources
  - name: Services
  - name: Waitlist
paths:
  /api/v1/order:
    get:
      tags:
        - Orders
      summary: Get or create an active order
      description: >-
        Auth: optional. This endpoint will return the currently active order
        (indentified by a cookie). Otherwise, the response would be empty.


        Note that orders expire automatically at `expires_at`. This date will be
        extended with each booking which is added to the order.

        An order with `status=draft` represents a cart.
      operationId: get-order
      parameters:
        - schema:
            type: string
            enum:
              - bookings
              - bookings.booking_add_ons.add_on
              - bookings.resource
              - bookings.resource.parent
              - bookings.resource.settings
              - bookings.service
              - bookings.service.add_ons
              - bookings.sub_bookings.resource
              - bookings.sub_bookings.service
              - bookings.resource.cover_image
              - bookings.cancellation_policy
              - customer
              - customer.address
              - voucher
              - organization
              - organization.logo_image
              - organization.legal_documents
              - invoice
              - invoice.items
              - invoice_history
              - invoice_history.items
              - sub_orders
              - sub_orders.bookings
              - last_payment
              - last_payment.method
              - sub_orders
              - sub_orders.bookings
              - sub_orders.organization
              - sub_orders.organization.legal_documents
          in: query
          name: include
          description: Allows to include allowed resources in the response
          allowEmptyValue: false
        - schema:
            type: string
            enum:
              - number
              - total
              - status
              - created_at
          in: query
          name: sort
        - name: filter[search]
          in: query
          schema:
            type: string
        - schema:
            type: string
          in: query
          name: filter[number]
        - name: filter[status]
          in: query
          schema:
            type: string
        - schema:
            type: string
          in: query
          name: filter[start_date]
        - schema:
            type: string
          in: query
          name: filter[end_date]
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orders.v1'
              examples:
                Example:
                  value:
                    data:
                      type: orders
                      id: '253'
                      attributes:
                        number: BO655735
                        currency: EUR
                        total: 40
                        net_amount: 33.61
                        tax_amount: 6.39
                        discount_amount: 0
                        status: draft
                        access_token: cVVE7ZZ7p3NXHxEdfKM8gAc8qHpq87
                        expires_at: '2020-05-24T17:19:12+00:00'
                        created_at: '2020-05-24T16:51:22+00:00'
                        updated_at: '2020-05-24T17:04:12+00:00'
                      relationships:
                        bookings:
                          data:
                            - type: bookings
                              id: '83'
                            - type: bookings
                              id: '84'
                        customer:
                          data: null
                      links:
                        self: http://bookingbuddy.test/api/v1/orders/253
                      meta:
                        download_url: >-
                          http://bookingbuddy.test/downloads/order-confirmation/253/cVVE7ZZ7p3NXHxEdfKM8gAc8qHpq87
                        voucher_code: null
                    included:
                      - type: images
                        id: '17'
                        attributes:
                          url: >-
                            http://bookingbuddy.test/storage/images/default/original/51ajS6dCLReTHVxqm44O5UQkR.jpg
                          copyright: null
                          preview_image_base64: null
                          small_path: >-
                            http://bookingbuddy.test/storage/images/default/original/51ajS6dCLReTHVxqm44O5UQkR.jpg
                          medium_path: >-
                            http://bookingbuddy.test/storage/images/default/original/51ajS6dCLReTHVxqm44O5UQkR.jpg
                          large_path: >-
                            http://bookingbuddy.test/storage/images/default/original/51ajS6dCLReTHVxqm44O5UQkR.jpg
                          created_at: '2020-05-24T12:49:13+00:00'
                      - type: organizations
                        id: '5'
                        attributes:
                          slug: blick-and-sons
                          name: Blick and Sons
                          description: >-
                            Aliquid dolorem corporis doloremque ut natus. Et eos
                            deserunt ipsum perferendis. Voluptatem repellendus
                            distinctio suscipit ad.
                          plain_description: >-
                            Aliquid dolorem corporis doloremque ut natus. Et eos
                            deserunt ipsum perferendis. Voluptatem repellendus
                            distinctio suscipit ad.
                          official_name: Blick and Sons
                          support_email: junius.koch@greenholt.info
                          phone: null
                          timezone: Europe/Berlin
                          is_organization: true
                          responsible_for_contents: null
                          ceo: null
                          vat_id: null
                          register_number: null
                          local_court: null
                          financial_office: null
                        relationships:
                          legal_documents:
                            data: []
                      - type: resources
                        id: '24'
                        attributes:
                          slug: blick-and-sons-meeting-room-10
                          name: Meeting room 10
                          cancelable: true
                          auto_accept_bookings: false
                        relationships:
                          cover_image:
                            data:
                              type: images
                              id: '17'
                          organization:
                            data:
                              type: organizations
                              id: '5'
                      - type: bookings
                        id: '83'
                        attributes:
                          number: BB589425
                          status: reserved
                          start_date: '2020-05-27T08:00:00+00:00'
                          end_date: '2020-05-27T09:45:00+00:00'
                          blocker_start_date: '2020-05-27T08:00:00+00:00'
                          blocker_end_date: '2020-05-27T09:45:00+00:00'
                          description: null
                          charged_duration: 105
                          currency: EUR
                          total: 105
                          subtotal: 105
                          charged_total: 105
                          created_at: '2020-05-24T16:52:38+00:00'
                          canceled_at: null
                        relationships:
                          booking_add_ons:
                            data: []
                          resource:
                            data:
                              type: resources
                              id: '24'
                          sub_bookings:
                            data: []
                        meta:
                          ics_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/83?type=ics
                          google_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/83?type=google
                          outlook_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/83?type=webOutlook
                          yahoo_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/83?type=yahoo
                      - type: images
                        id: '8'
                        attributes:
                          url: >-
                            http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg
                          copyright: null
                          preview_image_base64: null
                          small_path: >-
                            http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg
                          medium_path: >-
                            http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg
                          large_path: >-
                            http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg
                          created_at: '2020-05-24T12:49:13+00:00'
                      - type: resources
                        id: '15'
                        attributes:
                          slug: blick-and-sons-meeting-room-1
                          name: Meeting room 1
                          cancelable: true
                          auto_accept_bookings: false
                        relationships:
                          cover_image:
                            data:
                              type: images
                              id: '8'
                          organization:
                            data:
                              type: organizations
                              id: '5'
                      - type: bookings
                        id: '84'
                        attributes:
                          number: BB874795
                          status: reserved
                          start_date: '2020-05-26T09:30:00+00:00'
                          end_date: '2020-05-26T10:30:00+00:00'
                          blocker_start_date: '2020-05-26T09:30:00+00:00'
                          blocker_end_date: '2020-05-26T10:30:00+00:00'
                          description: null
                          charged_duration: 60
                          currency: EUR
                          total: 40
                          subtotal: 40
                          charged_total: 40
                          created_at: '2020-05-24T17:04:12+00:00'
                          canceled_at: null
                        relationships:
                          booking_add_ons:
                            data: []
                          resource:
                            data:
                              type: resources
                              id: '15'
                          sub_bookings:
                            data: []
                        meta:
                          ics_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/84?type=ics
                          google_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/84?type=google
                          outlook_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/84?type=webOutlook
                          yahoo_link: >-
                            http://bookingbuddy.test/add-to-calendar/booking/84?type=yahoo
        '204':
          description: No Content
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties: {}
      security: []
components:
  schemas:
    orders.v1:
      $schema: https://json-schema.org/draft/2020-12/schema
      x-version: 1.1.0
      title: Order
      type: object
      description: >-
        An order groups one or more bookings into a single transaction with
        payment and invoicing.
      x-tags:
        - Models
      properties:
        id:
          type: string
        type:
          type: string
          default: orders
        attributes:
          type: object
          properties:
            number:
              type:
                - string
                - 'null'
              description: Order number
            currency:
              type: string
              description: ISO 4217 currency code
            total:
              type: number
              description: Total amount including tax
            modification_total:
              type: number
              description: Total of modifications/adjustments
            net_amount:
              type: number
              description: Net amount before tax
            tax_amount:
              type: number
              description: Tax amount
            discount_amount:
              type: number
              description: Discount amount applied
            system_fee:
              type: number
              description: Platform system fee
              x-visibility: admin
            status:
              type: string
              enum:
                - pending
                - completed
                - canceled
                - expired
              description: Order status
            access_token:
              type:
                - string
                - 'null'
              description: Token for unauthenticated order access
            note:
              type:
                - string
                - 'null'
              description: Internal admin note
              x-visibility: admin
            manually_created:
              type: boolean
              description: Whether order was created manually
              x-visibility: admin
            has_payment:
              type: boolean
              description: Whether payment is associated
              x-visibility: admin
            payment_settings:
              type: object
              description: Payment configuration
              x-visibility: admin
            custom_entry_map:
              type: object
              description: Custom field entries as key-value map
            expires_at:
              type: string
              description: Reservation expiration timestamp
            start_date:
              type: string
              description: Earliest booking start date
            end_date:
              type: string
              description: Latest booking end date
            created_at:
              type: string
              description: Creation timestamp
            updated_at:
              type: string
              description: Last update timestamp
        links:
          $ref: '#/components/schemas/links.v1'
        relationships:
          type: object
          properties:
            bookings:
              type: object
              description: Bookings in this order
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            customer:
              type: object
              description: The order customer
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            organization:
              type: object
              description: The organization
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            invoice:
              type: object
              description: The final invoice
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            invoice_history:
              type: object
              description: Historical invoice
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            tmp_invoice:
              type: object
              description: Temporary/preview invoice
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            last_payment:
              type: object
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
              description: Most recent payment
            payments:
              type: object
              description: All payments for this order
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            voucher:
              type: object
              description: Applied voucher
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            sub_orders:
              type: object
              description: Sub-orders
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            files:
              type: object
              description: Attached files
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            utm_tracker:
              type: object
              description: UTM tracking data
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
    links.v1:
      $schema: https://json-schema.org/draft/2020-12/schema
      x-version: 1.1.0
      title: ResourceLinks
      x-tags:
        - Models
      type: object
      description: JSON:API self-link object
      properties:
        self:
          type: string
          format: uri

````