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

# Add customer to order

> Attaches a customer entry to the order. Order customers are order-scoped snapshots, distinct from the CRM customer record — see the customers endpoints for the CRM side.



## OpenAPI

````yaml https://server.twicecommerce.com/api/admin/openapi-mintlify.json post /v1/admin/orders/{orderId}/customers
openapi: 3.0.2
info:
  title: TWICE Admin API
  description: "The TWICE Admin API is the merchant-facing API of the Twice platform. It is currently in alpha: endpoints and schemas may change without notice.\n\n## Webhooks\n\nWebhooks notify your systems when resources change in Twice. A webhook subscription pairs one event type with one HTTPS endpoint of yours; whenever a matching event occurs, we POST the event to that endpoint. Subscriptions and their delivery logs are managed in the Twice admin under **Account → Integrations**.\n\n### Event types\n\n- `order.created`\n- `order.deleted`\n- `order.updated`\n\n### Payload\n\nEvery delivery is an HTTP POST with a JSON body sharing a common envelope. The typed payload of each event type is documented in the **Webhooks** section of the sidebar.\n\n```json\n{\n\t\"eventId\": \"5f2eb3a6-6cbd-4a2e-9350-6e0d1e2f9a11\",\n\t\"eventType\": \"order.created\",\n\t\"eventTime\": \"2026-08-06T12:34:56.789Z\",\n\t\"resource\": \"order\",\n\t\"resourceId\": \"0d9e0a7c-3fd1-4c8f-9c0d-2b7c6f7f2a55\",\n\t\"apiVersion\": \"2025-06\",\n\t\"data\": { \"…\": \"the API representation of the resource, or null for deletes\" }\n}\n```\n\n`data` carries the resource in the same shape the REST API returns it, as of the API version in `apiVersion`. Each subscription is pinned to the API version that was the latest when the subscription was created, so a new API version never changes the payload shape you receive — moving to a newer version is an explicit update of the subscription.\n\n### Acknowledging deliveries\n\nRespond with any **2xx** status to acknowledge a delivery. Any other status — or a timeout — counts as a failed attempt. Respond as quickly as possible and do heavy processing asynchronously after acknowledging.\n\n### Delivery semantics\n\nDeliveries are **at-least-once**: the same event can occasionally be delivered more than once, so deduplicate on the `X-Twice-Event-Id` header (or the equal `eventId` body field). Ordering is not guaranteed — when it matters, use `eventTime` or re-fetch the current state of the resource via the API.\n\n### Retries\n\nFailed deliveries are retried up to 3 times (4 attempts in total) with growing backoff — roughly 10 s, 20 s, 40 s after the preceding attempt — giving up 10 minutes after the first attempt. After 3 consecutive events fail all their attempts, the subscription is automatically disabled (`disabledReason: TOO_MANY_FAILED_DELIVERY_ATTEMPTS`) and must be re-enabled manually in the admin. Individual deliveries can also be redelivered manually from the delivery log.\n\n### Verifying signatures\n\nEach subscription has a signing secret (prefixed `whsec_`), available in the admin. Deliveries carry an HMAC-SHA256 signature of the exact raw request body in the `X-Twice-Signature` header, formatted `sha256=<hex>`. Verify it against the raw body bytes — parse the JSON only after the signature checks out:\n\n```js\nimport { createHmac, timingSafeEqual } from 'node:crypto';\n\nconst expected = 'sha256=' + createHmac('sha256', secret).update(rawBody, 'utf8').digest('hex');\nconst signature = req.headers['x-twice-signature'];\nconst isValid =\n\ttypeof signature === 'string' &&\n\tsignature.length === expected.length &&\n\ttimingSafeEqual(Buffer.from(signature), Buffer.from(expected));\n```"
  version: 2025-06
servers:
  - url: https://server.twicecommerce.com
security:
  - ApiKeyAuth: []
paths:
  /v1/admin/orders/{orderId}/customers:
    post:
      tags:
        - orders
      summary: Add customer to order
      description: >-
        Attaches a customer entry to the order. Order customers are order-scoped
        snapshots, distinct from the CRM customer record — see the customers
        endpoints for the CRM side.
      operationId: admin.orders.addCustomer
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    customerId:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    isMainContact:
                      type: boolean
                    lineItems:
                      type: array
                      items:
                        anyOf:
                          - type: object
                            properties:
                              name:
                                allOf:
                                  - type: object
                                    additionalProperties:
                                      type: string
                                  - type: object
                                    properties:
                                      def:
                                        type: string
                                    required:
                                      - def
                              customPrice:
                                type: number
                              manualDiscount:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              discountCodes:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties:
                                    quantity:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    totalDiscountValue:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    discountCodeId:
                                      type: string
                                  required:
                                    - quantity
                                    - totalDiscountValue
                              customDeposit:
                                description: >-
                                  Security deposit for this custom line. Custom
                                  items have no catalog deposit.
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              stockItems:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        inventoryArticleId:
                                          type: string
                                          format: uuid
                                          pattern: >-
                                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                        note:
                                          type: string
                                      required:
                                        - inventoryArticleId
                                    - type: object
                                      properties:
                                        name:
                                          type: string
                                        code:
                                          type: string
                                        note:
                                          type: string
                                      required:
                                        - name
                              startDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              endDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              quantity:
                                type: number
                              purchaseType:
                                type: string
                                enum:
                                  - booking
                                  - sale
                                  - subscription
                                  - buyback
                              note:
                                type: string
                              customCheckoutFields:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - text
                                        - select
                                        - number
                                        - checkbox
                                        - customer_attribute
                                    value:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                    internal:
                                      type: boolean
                                  required:
                                    - name
                                    - type
                              addonData:
                                anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - cart
                                      cartAddonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                                      - cartAddonId
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - catalog
                                      addonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                      parentLineItemId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                              addons:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    addonId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    catalogItemId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    purchaseType:
                                      type: string
                                      enum:
                                        - booking
                                        - sale
                                    startDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    endDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    quantity:
                                      type: integer
                                      minimum: 1
                                      maximum: 9007199254740991
                                    selectedVariants:
                                      nullable: true
                                      type: object
                                      additionalProperties:
                                        type: string
                                    customPrice:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    manualDiscount:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    discountCodes:
                                      type: object
                                      additionalProperties:
                                        type: object
                                        properties:
                                          quantity:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          totalDiscountValue:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          discountCodeId:
                                            type: string
                                        required:
                                          - quantity
                                          - totalDiscountValue
                                    customDeposit:
                                      description: >-
                                        Overrides the catalog-derived security
                                        deposit for this line. Omit to use the
                                        catalog item deposit.
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    checkoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          fieldId:
                                            description: Checkout field id
                                            type: string
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                        required:
                                          - fieldId
                                          - value
                                    customCheckoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          type:
                                            type: string
                                            enum:
                                              - text
                                              - select
                                              - number
                                              - checkbox
                                              - customer_attribute
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                          internal:
                                            type: boolean
                                        required:
                                          - name
                                          - type
                                    orderCustomerId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                  required:
                                    - catalogItemId
                                    - quantity
                                    - customPrice
                              subscription:
                                type: object
                                properties:
                                  label:
                                    type: string
                                    minLength: 1
                                  price:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  renewalPrice:
                                    nullable: true
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  commitmentCycles:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  paymentCycleUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  paymentCycleAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  initialChargeType:
                                    type: string
                                    enum:
                                      - order_creation
                                      - subscription_start
                                  renewalType:
                                    type: string
                                    enum:
                                      - none
                                      - auto_renew
                                  collectionMethod:
                                    type: string
                                    enum:
                                      - charge_automatically
                                      - send_invoice
                                  cancellationLeadTimeUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  cancellationLeadTimeAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                              subscriptionDiscount:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  valueType:
                                    type: string
                                    enum:
                                      - percentage
                                      - fixed_per_order
                                      - fixed_per_item
                                  value:
                                    type: number
                                  subscriptionDuration:
                                    nullable: true
                                    type: string
                                    enum:
                                      - once
                                      - repeating
                                      - forever
                                  subscriptionDurationCycles:
                                    nullable: true
                                    type: number
                                  discountPeriodTo:
                                    nullable: true
                                    type: string
                                required:
                                  - code
                                  - valueType
                                  - value
                                  - subscriptionDuration
                                  - subscriptionDurationCycles
                              subscriptionDiscounts:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                    valueType:
                                      type: string
                                      enum:
                                        - percentage
                                        - fixed_per_order
                                        - fixed_per_item
                                    value:
                                      type: number
                                    subscriptionDuration:
                                      nullable: true
                                      type: string
                                      enum:
                                        - once
                                        - repeating
                                        - forever
                                    subscriptionDurationCycles:
                                      nullable: true
                                      type: number
                                    discountPeriodTo:
                                      nullable: true
                                      type: string
                                  required:
                                    - code
                                    - valueType
                                    - value
                                    - subscriptionDuration
                                    - subscriptionDurationCycles
                              subscriptionPayNowPricing:
                                type: object
                                properties:
                                  currency:
                                    type: string
                                  total:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  subtotal:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  additionalInfo:
                                    type: string
                                  totalTaxes:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  totalDiscounts:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  taxExcluded:
                                    type: boolean
                                  taxLines:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        combinedLabel:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        label:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        price:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        rate:
                                          type: number
                                        taxableAmount:
                                          anyOf:
                                            - nullable: true
                                              type: integer
                                              minimum: -9007199254740991
                                              maximum: 9007199254740991
                                            - {}
                                      required:
                                        - price
                                        - rate
                                  discountCodes:
                                    type: object
                                    additionalProperties:
                                      type: object
                                      properties:
                                        quantity:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        totalDiscountValue:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        discountCodeId:
                                          type: string
                                      required:
                                        - quantity
                                        - totalDiscountValue
                                  manualDiscount:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  deposit:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  listPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  originalListPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                required:
                                  - currency
                                  - total
                                  - subtotal
                                  - totalTaxes
                                  - totalDiscounts
                                  - taxExcluded
                                  - taxLines
                                  - listPrice
                                  - originalListPrice
                            required:
                              - name
                              - customPrice
                              - quantity
                              - purchaseType
                          - type: object
                            properties:
                              catalogItemId:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              selectedVariants:
                                nullable: true
                                type: object
                                additionalProperties:
                                  type: string
                              startDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              endDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              pricingRowId:
                                nullable: true
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              purchaseType:
                                type: string
                                enum:
                                  - booking
                                  - sale
                                  - subscription
                                  - buyback
                              customPrice:
                                description: >-
                                  Client-computed price in minor units.
                                  Overrides the pricing-row derived price when
                                  set.
                                type: number
                              manualDiscount:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              discountCodes:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties:
                                    quantity:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    totalDiscountValue:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    discountCodeId:
                                      type: string
                                  required:
                                    - quantity
                                    - totalDiscountValue
                              customDeposit:
                                description: >-
                                  Overrides the catalog-derived security deposit
                                  for this line. Omit to use the catalog item
                                  deposit.
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              checkoutFields:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    fieldId:
                                      description: Checkout field id
                                      type: string
                                    value:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                  required:
                                    - fieldId
                                    - value
                              customCheckoutFields:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - text
                                        - select
                                        - number
                                        - checkbox
                                        - customer_attribute
                                    value:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                    internal:
                                      type: boolean
                                  required:
                                    - name
                                    - type
                              quantity:
                                type: number
                              note:
                                type: string
                              addonData:
                                anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - cart
                                      cartAddonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                                      - cartAddonId
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - catalog
                                      addonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                      parentLineItemId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                              addons:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    addonId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    catalogItemId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    purchaseType:
                                      type: string
                                      enum:
                                        - booking
                                        - sale
                                    startDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    endDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    quantity:
                                      type: integer
                                      minimum: 1
                                      maximum: 9007199254740991
                                    selectedVariants:
                                      nullable: true
                                      type: object
                                      additionalProperties:
                                        type: string
                                    customPrice:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    manualDiscount:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    discountCodes:
                                      type: object
                                      additionalProperties:
                                        type: object
                                        properties:
                                          quantity:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          totalDiscountValue:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          discountCodeId:
                                            type: string
                                        required:
                                          - quantity
                                          - totalDiscountValue
                                    customDeposit:
                                      description: >-
                                        Overrides the catalog-derived security
                                        deposit for this line. Omit to use the
                                        catalog item deposit.
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    checkoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          fieldId:
                                            description: Checkout field id
                                            type: string
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                        required:
                                          - fieldId
                                          - value
                                    customCheckoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          type:
                                            type: string
                                            enum:
                                              - text
                                              - select
                                              - number
                                              - checkbox
                                              - customer_attribute
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                          internal:
                                            type: boolean
                                        required:
                                          - name
                                          - type
                                    orderCustomerId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                  required:
                                    - catalogItemId
                                    - quantity
                                    - customPrice
                              subscription:
                                type: object
                                properties:
                                  label:
                                    type: string
                                    minLength: 1
                                  price:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  renewalPrice:
                                    nullable: true
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  commitmentCycles:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  paymentCycleUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  paymentCycleAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  initialChargeType:
                                    type: string
                                    enum:
                                      - order_creation
                                      - subscription_start
                                  renewalType:
                                    type: string
                                    enum:
                                      - none
                                      - auto_renew
                                  collectionMethod:
                                    type: string
                                    enum:
                                      - charge_automatically
                                      - send_invoice
                                  cancellationLeadTimeUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  cancellationLeadTimeAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                              subscriptionDiscount:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  valueType:
                                    type: string
                                    enum:
                                      - percentage
                                      - fixed_per_order
                                      - fixed_per_item
                                  value:
                                    type: number
                                  subscriptionDuration:
                                    nullable: true
                                    type: string
                                    enum:
                                      - once
                                      - repeating
                                      - forever
                                  subscriptionDurationCycles:
                                    nullable: true
                                    type: number
                                  discountPeriodTo:
                                    nullable: true
                                    type: string
                                required:
                                  - code
                                  - valueType
                                  - value
                                  - subscriptionDuration
                                  - subscriptionDurationCycles
                              subscriptionDiscounts:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                    valueType:
                                      type: string
                                      enum:
                                        - percentage
                                        - fixed_per_order
                                        - fixed_per_item
                                    value:
                                      type: number
                                    subscriptionDuration:
                                      nullable: true
                                      type: string
                                      enum:
                                        - once
                                        - repeating
                                        - forever
                                    subscriptionDurationCycles:
                                      nullable: true
                                      type: number
                                    discountPeriodTo:
                                      nullable: true
                                      type: string
                                  required:
                                    - code
                                    - valueType
                                    - value
                                    - subscriptionDuration
                                    - subscriptionDurationCycles
                              subscriptionPayNowPricing:
                                type: object
                                properties:
                                  currency:
                                    type: string
                                  total:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  subtotal:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  additionalInfo:
                                    type: string
                                  totalTaxes:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  totalDiscounts:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  taxExcluded:
                                    type: boolean
                                  taxLines:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        combinedLabel:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        label:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        price:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        rate:
                                          type: number
                                        taxableAmount:
                                          anyOf:
                                            - nullable: true
                                              type: integer
                                              minimum: -9007199254740991
                                              maximum: 9007199254740991
                                            - {}
                                      required:
                                        - price
                                        - rate
                                  discountCodes:
                                    type: object
                                    additionalProperties:
                                      type: object
                                      properties:
                                        quantity:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        totalDiscountValue:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        discountCodeId:
                                          type: string
                                      required:
                                        - quantity
                                        - totalDiscountValue
                                  manualDiscount:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  deposit:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  listPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  originalListPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                required:
                                  - currency
                                  - total
                                  - subtotal
                                  - totalTaxes
                                  - totalDiscounts
                                  - taxExcluded
                                  - taxLines
                                  - listPrice
                                  - originalListPrice
                            required:
                              - catalogItemId
                              - pricingRowId
                              - purchaseType
                              - quantity
                  required:
                    - customerId
                - type: object
                  properties:
                    firstName:
                      type: string
                    lastName:
                      type: string
                    phone:
                      type: string
                    email:
                      type: string
                      format: email
                      pattern: >-
                        ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                    marketingConsent:
                      type: boolean
                    address: {}
                    attributes:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: array
                            items:
                              type: string
                          - type: string
                            nullable: true
                            enum:
                              - null
                    lineItems:
                      type: array
                      items:
                        anyOf:
                          - type: object
                            properties:
                              name:
                                allOf:
                                  - type: object
                                    additionalProperties:
                                      type: string
                                  - type: object
                                    properties:
                                      def:
                                        type: string
                                    required:
                                      - def
                              customPrice:
                                type: number
                              manualDiscount:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              discountCodes:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties:
                                    quantity:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    totalDiscountValue:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    discountCodeId:
                                      type: string
                                  required:
                                    - quantity
                                    - totalDiscountValue
                              customDeposit:
                                description: >-
                                  Security deposit for this custom line. Custom
                                  items have no catalog deposit.
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              stockItems:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        inventoryArticleId:
                                          type: string
                                          format: uuid
                                          pattern: >-
                                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                        note:
                                          type: string
                                      required:
                                        - inventoryArticleId
                                    - type: object
                                      properties:
                                        name:
                                          type: string
                                        code:
                                          type: string
                                        note:
                                          type: string
                                      required:
                                        - name
                              startDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              endDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              quantity:
                                type: number
                              purchaseType:
                                type: string
                                enum:
                                  - booking
                                  - sale
                                  - subscription
                                  - buyback
                              note:
                                type: string
                              customCheckoutFields:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - text
                                        - select
                                        - number
                                        - checkbox
                                        - customer_attribute
                                    value:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                    internal:
                                      type: boolean
                                  required:
                                    - name
                                    - type
                              addonData:
                                anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - cart
                                      cartAddonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                                      - cartAddonId
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - catalog
                                      addonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                      parentLineItemId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                              addons:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    addonId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    catalogItemId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    purchaseType:
                                      type: string
                                      enum:
                                        - booking
                                        - sale
                                    startDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    endDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    quantity:
                                      type: integer
                                      minimum: 1
                                      maximum: 9007199254740991
                                    selectedVariants:
                                      nullable: true
                                      type: object
                                      additionalProperties:
                                        type: string
                                    customPrice:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    manualDiscount:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    discountCodes:
                                      type: object
                                      additionalProperties:
                                        type: object
                                        properties:
                                          quantity:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          totalDiscountValue:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          discountCodeId:
                                            type: string
                                        required:
                                          - quantity
                                          - totalDiscountValue
                                    customDeposit:
                                      description: >-
                                        Overrides the catalog-derived security
                                        deposit for this line. Omit to use the
                                        catalog item deposit.
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    checkoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          fieldId:
                                            description: Checkout field id
                                            type: string
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                        required:
                                          - fieldId
                                          - value
                                    customCheckoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          type:
                                            type: string
                                            enum:
                                              - text
                                              - select
                                              - number
                                              - checkbox
                                              - customer_attribute
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                          internal:
                                            type: boolean
                                        required:
                                          - name
                                          - type
                                    orderCustomerId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                  required:
                                    - catalogItemId
                                    - quantity
                                    - customPrice
                              subscription:
                                type: object
                                properties:
                                  label:
                                    type: string
                                    minLength: 1
                                  price:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  renewalPrice:
                                    nullable: true
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  commitmentCycles:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  paymentCycleUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  paymentCycleAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  initialChargeType:
                                    type: string
                                    enum:
                                      - order_creation
                                      - subscription_start
                                  renewalType:
                                    type: string
                                    enum:
                                      - none
                                      - auto_renew
                                  collectionMethod:
                                    type: string
                                    enum:
                                      - charge_automatically
                                      - send_invoice
                                  cancellationLeadTimeUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  cancellationLeadTimeAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                              subscriptionDiscount:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  valueType:
                                    type: string
                                    enum:
                                      - percentage
                                      - fixed_per_order
                                      - fixed_per_item
                                  value:
                                    type: number
                                  subscriptionDuration:
                                    nullable: true
                                    type: string
                                    enum:
                                      - once
                                      - repeating
                                      - forever
                                  subscriptionDurationCycles:
                                    nullable: true
                                    type: number
                                  discountPeriodTo:
                                    nullable: true
                                    type: string
                                required:
                                  - code
                                  - valueType
                                  - value
                                  - subscriptionDuration
                                  - subscriptionDurationCycles
                              subscriptionDiscounts:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                    valueType:
                                      type: string
                                      enum:
                                        - percentage
                                        - fixed_per_order
                                        - fixed_per_item
                                    value:
                                      type: number
                                    subscriptionDuration:
                                      nullable: true
                                      type: string
                                      enum:
                                        - once
                                        - repeating
                                        - forever
                                    subscriptionDurationCycles:
                                      nullable: true
                                      type: number
                                    discountPeriodTo:
                                      nullable: true
                                      type: string
                                  required:
                                    - code
                                    - valueType
                                    - value
                                    - subscriptionDuration
                                    - subscriptionDurationCycles
                              subscriptionPayNowPricing:
                                type: object
                                properties:
                                  currency:
                                    type: string
                                  total:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  subtotal:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  additionalInfo:
                                    type: string
                                  totalTaxes:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  totalDiscounts:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  taxExcluded:
                                    type: boolean
                                  taxLines:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        combinedLabel:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        label:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        price:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        rate:
                                          type: number
                                        taxableAmount:
                                          anyOf:
                                            - nullable: true
                                              type: integer
                                              minimum: -9007199254740991
                                              maximum: 9007199254740991
                                            - {}
                                      required:
                                        - price
                                        - rate
                                  discountCodes:
                                    type: object
                                    additionalProperties:
                                      type: object
                                      properties:
                                        quantity:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        totalDiscountValue:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        discountCodeId:
                                          type: string
                                      required:
                                        - quantity
                                        - totalDiscountValue
                                  manualDiscount:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  deposit:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  listPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  originalListPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                required:
                                  - currency
                                  - total
                                  - subtotal
                                  - totalTaxes
                                  - totalDiscounts
                                  - taxExcluded
                                  - taxLines
                                  - listPrice
                                  - originalListPrice
                            required:
                              - name
                              - customPrice
                              - quantity
                              - purchaseType
                          - type: object
                            properties:
                              catalogItemId:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              selectedVariants:
                                nullable: true
                                type: object
                                additionalProperties:
                                  type: string
                              startDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              endDate:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              pricingRowId:
                                nullable: true
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              purchaseType:
                                type: string
                                enum:
                                  - booking
                                  - sale
                                  - subscription
                                  - buyback
                              customPrice:
                                description: >-
                                  Client-computed price in minor units.
                                  Overrides the pricing-row derived price when
                                  set.
                                type: number
                              manualDiscount:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              discountCodes:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties:
                                    quantity:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    totalDiscountValue:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    discountCodeId:
                                      type: string
                                  required:
                                    - quantity
                                    - totalDiscountValue
                              customDeposit:
                                description: >-
                                  Overrides the catalog-derived security deposit
                                  for this line. Omit to use the catalog item
                                  deposit.
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              checkoutFields:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    fieldId:
                                      description: Checkout field id
                                      type: string
                                    value:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                  required:
                                    - fieldId
                                    - value
                              customCheckoutFields:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - text
                                        - select
                                        - number
                                        - checkbox
                                        - customer_attribute
                                    value:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                    internal:
                                      type: boolean
                                  required:
                                    - name
                                    - type
                              quantity:
                                type: number
                              note:
                                type: string
                              addonData:
                                anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - cart
                                      cartAddonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                                      - cartAddonId
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - catalog
                                      addonId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                      parentLineItemId:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    required:
                                      - type
                              addons:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    addonId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    catalogItemId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                    purchaseType:
                                      type: string
                                      enum:
                                        - booking
                                        - sale
                                    startDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    endDate:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    quantity:
                                      type: integer
                                      minimum: 1
                                      maximum: 9007199254740991
                                    selectedVariants:
                                      nullable: true
                                      type: object
                                      additionalProperties:
                                        type: string
                                    customPrice:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    manualDiscount:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    discountCodes:
                                      type: object
                                      additionalProperties:
                                        type: object
                                        properties:
                                          quantity:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          totalDiscountValue:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          discountCodeId:
                                            type: string
                                        required:
                                          - quantity
                                          - totalDiscountValue
                                    customDeposit:
                                      description: >-
                                        Overrides the catalog-derived security
                                        deposit for this line. Omit to use the
                                        catalog item deposit.
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    checkoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          fieldId:
                                            description: Checkout field id
                                            type: string
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                        required:
                                          - fieldId
                                          - value
                                    customCheckoutFields:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          type:
                                            type: string
                                            enum:
                                              - text
                                              - select
                                              - number
                                              - checkbox
                                              - customer_attribute
                                          value:
                                            anyOf:
                                              - type: string
                                              - type: number
                                              - type: boolean
                                          internal:
                                            type: boolean
                                        required:
                                          - name
                                          - type
                                    orderCustomerId:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                  required:
                                    - catalogItemId
                                    - quantity
                                    - customPrice
                              subscription:
                                type: object
                                properties:
                                  label:
                                    type: string
                                    minLength: 1
                                  price:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  renewalPrice:
                                    nullable: true
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  commitmentCycles:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  paymentCycleUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  paymentCycleAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                  initialChargeType:
                                    type: string
                                    enum:
                                      - order_creation
                                      - subscription_start
                                  renewalType:
                                    type: string
                                    enum:
                                      - none
                                      - auto_renew
                                  collectionMethod:
                                    type: string
                                    enum:
                                      - charge_automatically
                                      - send_invoice
                                  cancellationLeadTimeUnit:
                                    type: string
                                    enum:
                                      - seconds
                                      - minutes
                                      - hours
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  cancellationLeadTimeAmount:
                                    type: integer
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                              subscriptionDiscount:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  valueType:
                                    type: string
                                    enum:
                                      - percentage
                                      - fixed_per_order
                                      - fixed_per_item
                                  value:
                                    type: number
                                  subscriptionDuration:
                                    nullable: true
                                    type: string
                                    enum:
                                      - once
                                      - repeating
                                      - forever
                                  subscriptionDurationCycles:
                                    nullable: true
                                    type: number
                                  discountPeriodTo:
                                    nullable: true
                                    type: string
                                required:
                                  - code
                                  - valueType
                                  - value
                                  - subscriptionDuration
                                  - subscriptionDurationCycles
                              subscriptionDiscounts:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                    valueType:
                                      type: string
                                      enum:
                                        - percentage
                                        - fixed_per_order
                                        - fixed_per_item
                                    value:
                                      type: number
                                    subscriptionDuration:
                                      nullable: true
                                      type: string
                                      enum:
                                        - once
                                        - repeating
                                        - forever
                                    subscriptionDurationCycles:
                                      nullable: true
                                      type: number
                                    discountPeriodTo:
                                      nullable: true
                                      type: string
                                  required:
                                    - code
                                    - valueType
                                    - value
                                    - subscriptionDuration
                                    - subscriptionDurationCycles
                              subscriptionPayNowPricing:
                                type: object
                                properties:
                                  currency:
                                    type: string
                                  total:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  subtotal:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  additionalInfo:
                                    type: string
                                  totalTaxes:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  totalDiscounts:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  taxExcluded:
                                    type: boolean
                                  taxLines:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        combinedLabel:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        label:
                                          allOf:
                                            - type: object
                                              additionalProperties:
                                                type: string
                                            - type: object
                                              properties:
                                                def:
                                                  type: string
                                              required:
                                                - def
                                        price:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        rate:
                                          type: number
                                        taxableAmount:
                                          anyOf:
                                            - nullable: true
                                              type: integer
                                              minimum: -9007199254740991
                                              maximum: 9007199254740991
                                            - {}
                                      required:
                                        - price
                                        - rate
                                  discountCodes:
                                    type: object
                                    additionalProperties:
                                      type: object
                                      properties:
                                        quantity:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        totalDiscountValue:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                        discountCodeId:
                                          type: string
                                      required:
                                        - quantity
                                        - totalDiscountValue
                                  manualDiscount:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  deposit:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  listPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  originalListPrice:
                                    type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                required:
                                  - currency
                                  - total
                                  - subtotal
                                  - totalTaxes
                                  - totalDiscounts
                                  - taxExcluded
                                  - taxLines
                                  - listPrice
                                  - originalListPrice
                            required:
                              - catalogItemId
                              - pricingRowId
                              - purchaseType
                              - quantity
                    isMainContact:
                      type: boolean
                    dateOfBirth:
                      type: string
                      format: date
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                    billingAddress:
                      type: object
                      properties:
                        address:
                          type: string
                        zipCode:
                          type: string
                        city:
                          type: string
                        country:
                          type: string
                        state:
                          type: string
                        details:
                          type: string
                        deliveryNotes:
                          type: string
                    shippingAddress:
                      type: object
                      properties:
                        address:
                          type: string
                        zipCode:
                          type: string
                        city:
                          type: string
                        country:
                          type: string
                        state:
                          type: string
                        details:
                          type: string
                        deliveryNotes:
                          type: string
                    customerType:
                      type: string
                      enum:
                        - individual
                        - business
                    companyName:
                      type: string
                    taxId:
                      type: string
                    language:
                      type: string
                  required:
                    - firstName
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  firstName:
                    type: string
                  lastName:
                    type: string
                  fullName:
                    type: string
                  phone:
                    type: string
                  email:
                    type: string
                    format: email
                    pattern: >-
                      ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  marketingConsent:
                    type: boolean
                  checkoutFields:
                    type: object
                    properties:
                      name:
                        type: string
                      type:
                        type: string
                        enum:
                          - text
                          - select
                          - number
                          - checkbox
                          - customer_attribute
                      placeholder:
                        type: string
                      required:
                        type: boolean
                      internal:
                        type: boolean
                      attributeId:
                        type: string
                      attributeFormat:
                        type: string
                        enum:
                          - text
                          - number
                          - boolean
                          - date
                          - datetime
                          - formula
                          - select
                          - multiselect
                      options:
                        type: object
                        properties:
                          name:
                            type: string
                        required:
                          - name
                        additionalProperties: false
                      value:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      checkoutFieldId:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      ids:
                        type: array
                        items:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    required:
                      - name
                      - type
                      - ids
                    additionalProperties: false
                  crmCustomerId:
                    type: string
                  dateOfBirth:
                    type: string
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                  billingAddress:
                    type: object
                    properties:
                      address:
                        type: string
                      zipCode:
                        type: string
                      city:
                        type: string
                      country:
                        type: string
                      state:
                        type: string
                      details:
                        type: string
                      deliveryNotes:
                        type: string
                    additionalProperties: false
                  shippingAddress:
                    type: object
                    properties:
                      address:
                        type: string
                      zipCode:
                        type: string
                      city:
                        type: string
                      country:
                        type: string
                      state:
                        type: string
                      details:
                        type: string
                      deliveryNotes:
                        type: string
                    additionalProperties: false
                  customerType:
                    type: string
                    enum:
                      - individual
                      - business
                  companyName:
                    type: string
                  taxId:
                    type: string
                  language:
                    type: string
                required:
                  - id
                  - createdAt
                  - updatedAt
                  - firstName
                  - fullName
                additionalProperties: false
        '400':
          description: '400'
        '401':
          description: '401'
        '403':
          description: '403'
        '404':
          description: '404'
        '429':
          description: '429'
        '500':
          description: '500'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-API-KEY
      in: header
      description: API key for the Twice API

````