openapi: 3.1.0
info:
  title: Sitecore CDP Order REST API
  description: >
    Use the Order REST API to create, retrieve, update, and delete order data in
    Sitecore CDP.


    This REST API lets you interact with the following objects:
       - Order - the parent for all other objects, containing attributes common to the entire order.
       - Order item - something that has been purchased as part of the order. 
       - Order contact - the primary contact person for an order. 
       - Order consumer - the person that consumes the order item. 
       - Order data extension - any key-value pairs you want to add to the order object. 
       - Order item data extension - any key-value pairs you want to add to the order item object. 

    Note the following:
       - To use this REST API, you must authenticate your API requests.
       - All API requests are made in your production environment.
       - This reference documentation describes Sitecore CDP functionality for data model 2.1.

     For more information, see the [official Sitecore CDP developer documentation](https://doc.sitecore.com/cdp/en/developers/api/index-en.html), including [examples](https://doc.sitecore.com/cdp/en/developers/api/examples-of-order-items-rest-api-v2-1.html) of order items and order item data extensions.
    ## Authentication

    The Order REST API uses basic authentication.

    Basic authentication involves sending a user name and a password with every
    request.

    To find your user name and password, in Sitecore CDP, on the navigation
    pane, click **Settings** > **API access**:
       - The user name is the **Client key**.
       - The password is the **API token**.

    You must include the user name and password in every request you make. For
    example:

    ```

    curl -X GET '{baseURL}/v2.1/orders' \ 

    -u '{YOUR_USERNAME}:{YOUR_PASSWORD}' \ 

    -H 'Accept: application/json' 

    ```

    ## Get started

    To create your first order and find it in Sitecore CDP:

    1. Create an order. The response contains the order reference.

    2. Create an order contact using the order reference. Make sure to provide
    enough identity information according to [your organization's identity
    rules](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/identifying-guests-in-sitecore-cdp.html).

    This associates a guest with the order. In the response, in `guest.href`,
    the guest reference is the string that follows the final slash.

    3. Copy the guest reference.

    4. In Sitecore CDP, click **Guests**. In the **Search** field, enter the
    guest reference, then click the **Guest type: All** filter. Then, Sitecore
    CDP lists the guest profile for the guest.

    5. On the **Guest Profile** page, click the **Orders** tab. The order you
    previously created displays.
  contact:
    name: Sitecore Corporation A/S
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: v2.1
  x-metadata:
    product: Sitecore CDP
security:
  - BasicAuth: []
servers:
  - url: https://api-engage-ap.sitecorecloud.io
    description: Production server AP
  - url: https://api-engage-eu.sitecorecloud.io
    description: Production server EU
  - url: https://api-engage-jpe.sitecorecloud.io
    description: Production server JP
  - url: https://api-engage-us.sitecorecloud.io
    description: Production server US
tags:
  - name: Order
    description: >-
      An order object is the parent for all other objects and contains
      attributes that are common to the entire order.

      The Order REST API matches orders that have the same `referenceId` values
      and have `orderedAt` values (purchase dates) within two days of another.
  - name: Order item
    description: >-
      The order item object represents something that has been purchased as part
      of the order. For an airline reservation, an order item is typically one
      or more flight segments, or an ancillary item purchased in addition to the
      flight, such as excess baggage allowance or priority boarding.
  - name: Order contact
    description: >-
      An order contact is a person who is the primary contact for an order. The
      same guest can be both the order contact and order consumer.
  - name: Order consumer
    description: >-
      An order consumer represents a person who is consuming an order item. If
      the order item is a flight, the order consumer is the traveler or
      passenger of the flight segment. If more than one order consumer is
      consuming the same order item, the order item has a quantity representing
      the number of order consumers.

       The same guest can be both the order contact and order consumer.
  - name: Order data extension
    description: >-
      An order data extension is an object that lets you specify any key-value
      pairs you want. Order data extensions are optional and enable your
      organization to capture more robust information about your orders.

       To get started with this API, create a data extension for the order you previously created.
  - name: Order item data extension
    description: >-
      An order item data extension is an object that lets you specify any
      key-value pairs you want. Order data extensions are optional and enable
      your organization to capture more robust information about your order
      items.

       To get started with this API, create a data extension for the order items you previously created.
paths:
  /v2.1/orders/{orderRef}/extensions/{dataExtensionName}:
    post:
      tags:
        - Order data extension
      summary: Create an order data extension
      description: |+
        Creates an order data extension. 

         To avoid creating key-value pairs that already exist in the data extension for an order, first retrieve all the data extensions for an order to check that the keys you intend to create are unique. 

         ### Creating the request body 
         In the request body, you must provide one object. This object represents the data extension. Note the following about the object: 

         - Can contain primitive values only. You cannot nest objects. If you need to group key-value pairs, use prefixes for the key names. 
         - Can contain a maximum of 100 key-value pairs. 
         - The key-value pairs you include in the object become the extension data. For example, if you include `"firstTimeOrder": true` in the object, **First Time Order** with the value of `true` becomes extension data. 
         - Supported data types for the values: 
           - string, for example `"level2"` 
           - boolean, for example `true` 
           - integer, for example `9` 
           - floating-point number, for example `99.9` 

         #### Naming keys 
         The keys you enter in the request body must be: 
         - Alphanumeric [A-Z,a-z,0-9] as per the [JSON RFC 7159](https://www.rfc-editor.org/rfc/rfc7159) specification. 
         - In camel case. 

         ### Example request body 
         Here's an example request body: 
         ```
        { 
         "firstTimeOrder": true, 
         "storeLocation": "London", 
         "totalUnits": 8, 
         "totalDiscount": "20%"
         }
        ``` 
         This creates four key-value pairs for the order. 

      operationId: CreateOrderDataExtension
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The data extension name. You must set this to `ext`.
            example: ext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataExtensionCreateRequest'
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    get:
      tags:
        - Order data extension
      summary: Retrieve an order data extension
      description: Retrieves a data extension for an order.
      operationId: RetrieveOrderDataExtension
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >-
              The order reference. This is a unique identifier of the order
              record. If you don't know the order reference, first retrieve
              orders.
            example: f7aabbca-1c1b-4fc2-be72-3e16294a4f03
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The name of the data extension. Set this to `ext`.
            example: ext
      responses:
        '200':
          description: Resource successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    put:
      tags:
        - Order data extension
      summary: Update an order data extension
      description: >-
        Fully updates a data extension for an order, replacing the entire
        resource including all the key-value pairs with the data you send in the
        request.


        To update certain key-value pairs only, use the Partially update a data
        extension endpoint instead.
      operationId: PutOrderDataExtension
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The name of the data extension. Set this to `ext`.
            example: ext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataExtensionCreateRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionUpdateBadRequestResponse'
    patch:
      tags:
        - Order data extension
      summary: Partially update an order data extension
      description: >-
        Partially updates a data extension for an order, replacing only those
        key-value pairs in the resource that you provide in the request.
      operationId: UpdateOrderDataExtension
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The name of the data extension. Set this to `ext`.
            example: ext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataExtensionCreateRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionUpdateBadRequestResponse'
    delete:
      tags:
        - Order data extension
      summary: Delete an order data extension
      description: >-
        Deletes the data extension for an order, including all the key-value
        pairs in the data extension.


        To delete certain key-value pairs only, use the Delete key-value pairs
        from a data extension endpoint instead.
      operationId: DeleteOrderDataExtension
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The name of the data extension. Set this to `ext`.
            example: ext
      responses:
        '200':
          description: Successful operation
          content:
            application/json: {}
        '404':
          description: Order data extension not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionNotFoundResponse'
  /v2.1/orders/{orderRef}/extensions/{dataExtensionName}/fields:
    delete:
      tags:
        - Order data extension
      summary: Delete key-value pairs from an order data extension
      description: >-
        Deletes the key-value pairs you provide in the `name` query parameter
        from a data extension for an order.


        For example, if your data extension contains the `firstTimeOrder` and
        `storeLocation` keys, you can delete both keys and their values by
        making the following request:



         `{baseURL}/v2.1/orders/{orderRef}/extensions/{dataExtensionName}/fields?name=firstTimeOrder|storeLocation`

        If you don't provide the query parameter, this operation will empty the
        data extension: the data extension itself will not be deleted, but all
        the key-value pairs in it will.
      operationId: deleteOrderDataExtensionFields
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The name of the data extension. Set this to `ext`.
            example: ext
        - name: name
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: The fields in the data extension object that you want to delete.
            example: withWarranty|color
            items:
              type: string
              description: The fields in the data extension object that you want to delete.
              example: withWarranty|color
              default: ''
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionResponse'
  /v2.1/orders/{orderRef}/extensions:
    get:
      tags:
        - Order data extension
      summary: Retrieve the URL for an order's data extension
      description: >-
        Retrieves the URL for the order's data extension. This lets you check if
        the data extension exists.
      operationId: RetrieveOrderDataExtensions
      parameters:
        - name: expand
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: >
              You can expand items in a collection by setting `expand=true`.
              This eliminates the need to send multiple follow-up requests (one
              for the collection and another for each of its items). This also
              helps you check if the data you intend to create already exists.
            example: true
            items:
              type: string
              description: >
                You can expand items in a collection by setting `expand=true`.
                This eliminates the need to send multiple follow-up requests
                (one for the collection and another for each of its items). This
                also helps you check if the data you intend to create already
                exists.
              example: 'true'
              default: ''
        - name: offset
          in: query
          schema:
            $ref: '#/components/schemas/Offset'
        - name: limit
          in: query
          schema:
            $ref: '#/components/schemas/Limit'
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveOrderDataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orderItems/{orderItemRef}/extensions/{dataExtensionName}:
    post:
      tags:
        - Order item data extension
      summary: Create an order item data extension
      description: |+
        Creates an order item data extension. 

         To avoid creating key-value pairs that already exist in the data extension for an order item, first retrieve all the data extensions for an order item to check that the keys you intend to create are unique. 

         ### Creating the request body 
         In the request body, you must provide one object. This object represents the data extension. Note the following about the object: 

         - Can contain primitive values only. You cannot nest objects. If you need to group key-value pairs, use prefixes for the key names. 
         - Can contain a maximum of 100 key-value pairs. 
         - The key-value pairs you include in the object become the extension data. For example, if you include `"withWarranty": true` in the object, **With Warranty** with the value of `true` becomes extension data. 
         - Supported data types for the values: 
           - string, for example `"level2"` 
           - boolean, for example `true` 
           - integer, for example `9` 
           - floating-point number, for example `99.9` 

         #### Naming keys 
         The keys you enter in the request body must be: 
         - Alphanumeric [A-Z,a-z,0-9] as per the [JSON RFC 7159](https://www.rfc-editor.org/rfc/rfc7159) specification. 
         - In camel case. 

         ### Example request body 
         Here's an example request body: 
         ```
        {
         "withWarranty": true,
         "color": "obsidian", 
         "capacityInGb": 128 
        }
        ``` 
         This creates three key-value pairs for the order item. 

      operationId: CreateOrderItemDataExtension
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The data extension name. You must set this to `ext`.
            example: ext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataExtensionCreateRequest'
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    get:
      tags:
        - Order item data extension
      summary: Retrieve an order item data extension
      description: Retrieves a data extension for an order item.
      operationId: retrieveOrderItemDataExtension
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The data extension name. You must set this to `ext`.
            example: ext
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemDataExtensionResponse'
        '404':
          description: Order Item data extension not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionConflictResponse'
    put:
      tags:
        - Order item data extension
      summary: Update an order item data extension
      description: >-
        Fully updates a data extension for an order item, replacing the entire
        resource including all the key-value pairs with the data you send in the
        request.


        To update certain key-value pairs only, use the Partially update a data
        extension endpoint instead.
      operationId: PutOrderItemDataExtension
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The data extension name. You must set this to `ext`.
            example: ext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataExtensionCreateRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemDataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionUpdateBadRequestResponse'
    patch:
      tags:
        - Order item data extension
      summary: Partially update an order item data extension
      description: >-
        Partially updates a data extension for an order, replacing only those
        key-value pairs in the resource that you provide in the request.
      operationId: UpdateOrderItemDataExtension_1
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The data extension name. You must set this to `ext`.
            example: ext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataExtensionCreateRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemDataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionUpdateBadRequestResponse'
    delete:
      tags:
        - Order item data extension
      summary: Delete an order item data extension
      description: >-
        Deletes the data extension for an order item, including all the
        key-value pairs in the data extension.


        To delete certain key-value pairs only, use the Delete key-value pairs
        from a data extension endpoint instead.
      operationId: DeleteOrderItemDataExtension
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The data extension name. You must set this to `ext`.
            example: ext
      responses:
        '200':
          description: Successful operation
          content:
            application/json: {}
        '404':
          description: Order Item data extension not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionConflictResponse'
  /v2.1/orderItems/{orderItemRef}/extensions/{dataExtensionName}/fields:
    delete:
      tags:
        - Order item data extension
      summary: Delete key-value pairs from an order item data extension
      description: >-
        Deletes the key-value pairs you provide in the `name` query parameter
        from a data extension for an order item.


        For example, if your data extension contains the `firstTimeOrder` and
        `storeLocation` keys, you can delete both keys and their values by
        making the following request:



         `{baseURL}/v2.1/orders/{orderRef}/extensions/{dataExtensionName}/fields?name=firstTimeOrder|storeLocation`

        If you don't provide the query parameter, this operation will empty the
        data extension: the data extension itself will not be deleted, but all
        the key-value pairs in it will.
      operationId: UpdateOrderItemDataExtension
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: dataExtensionName
          in: path
          required: true
          schema:
            type: string
            description: |
              The data extension name. You must set this to `ext`.
            example: ext
        - name: name
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: The fields in the data extension object that you want to delete.
            example: withWarranty|color
            items:
              type: string
              description: The fields in the data extension object that you want to delete.
              example: withWarranty|color
              default: ''
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemDataExtensionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionUpdateBadRequestResponse'
  /v2.1/orderItems/{orderItemRef}/extensions:
    get:
      tags:
        - Order item data extension
      summary: Retrieve the URL for an order item's data extension
      description: >-
        Retrieves the URL for the order item's data extension. This lets you
        check if the data extension exists.
      operationId: retrieveOrderItemDataExtensions
      parameters:
        - name: expand
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: >
              You can expand items in a collection by setting `expand=true`.
              This eliminates the need to send multiple follow-up requests (one
              for the collection and another for each of its items). This also
              helps you check if the data you intend to create already exists.
            example: true
            items:
              type: string
              description: >
                You can expand items in a collection by setting `expand=true`.
                This eliminates the need to send multiple follow-up requests
                (one for the collection and another for each of its items). This
                also helps you check if the data you intend to create already
                exists.
              example: 'true'
              default: ''
        - name: offset
          in: query
          schema:
            $ref: '#/components/schemas/Offset'
        - name: limit
          in: query
          schema:
            $ref: '#/components/schemas/Limit'
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveOrderItemDataExtensionResponse'
        '404':
          description: Order Item data extension not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExtensionConflictResponse'
  /v2.1/orders:
    post:
      tags:
        - Order
      summary: Create an order
      description: |-
        Creates an order. 

         In the response, `ref` contains the order reference. Use the order reference to interact with a specific order, for example, to retrieve it, update it, or create a data extension for it.
      operationId: CreateOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderCreateRequest'
      responses:
        '201':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderCreateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '409':
          description: Already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderAlreadyExistsResponse'
    get:
      tags:
        - Order
      summary: List orders
      description: >-
        Retrieves a list of orders that either have the same reference ID or
        belong to the same guest. You must include either the `referenceId` of
        the order or the `guestRef` as a query string parameter in the URI of
        the request, but not both.

         In the response, `items.ref` contains the order reference. Use the order reference to interact with a specific order, for example, to retrieve it, update it, or create a data extension for it.
      operationId: RetrieveOrders
      parameters:
        - name: referenceId
          in: query
          schema:
            type: string
            description: >
              A unique identifier generated by your organization to reference
              the order. For flight orders, this is often the PNR. Specify
              either `referenceId` or `guestRef` in the query parameters, not
              both.
            example: B94TXY-1
        - name: guestRef
          in: query
          schema:
            type: string
            description: >
              The guest reference. This is a unique identifier of the guest
              record. If you don't know the guest reference, first retrieve
              guests using the [Sitecore CDP Guest REST
              API](https://api-docs.sitecore.com/cdp/guest-rest-api). Specify
              either `referenceId` or `guestRef` in the query parameters, not
              both.
        - name: offset
          in: query
          schema:
            $ref: '#/components/schemas/Offset'
        - name: limit
          in: query
          schema:
            $ref: '#/components/schemas/Limit'
        - name: expand
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: >
              You can expand items in a collection by setting `expand=true`.
              This eliminates the need to send multiple follow-up requests (one
              for the collection and another for each of its items). This also
              helps you check if the data you intend to create already exists.
            example: true
            items:
              type: string
              description: >
                You can expand items in a collection by setting `expand=true`.
                This eliminates the need to send multiple follow-up requests
                (one for the collection and another for each of its items). This
                also helps you check if the data you intend to create already
                exists.
              example: 'true'
              default: ''
        - name: sort
          in: query
          schema:
            type: string
            description: >-
              You can sort search results by the date and time when the order
              was created (`created`) or made (`orderedAt`). You can only use
              `orderedAt` if you list orders using `guestRef`.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveOrdersResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orders/{orderRef}/consumers:
    post:
      tags:
        - Order consumer
      summary: Create an order consumer
      description: |-
        Creates a consumer on an order.
         In `identifiers`, make sure to provide enough identity information according to [your organization's identity rules](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/identifying-guests-in-sitecore-cdp.html).

         In the response, `ref` contains the order consumer reference. Use the order consumer reference to interact with a specific consumer, for example, to retrieve or update it.
      operationId: CreateOrderConsumer
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderConsumerRequest'
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerResponseObject'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    get:
      tags:
        - Order consumer
      summary: List consumers of an order
      description: |-
        Retrieves a list of order consumers for an order.

         In the response, `items.ref` contains the order consumer reference. Use the order consumer reference to interact with a specific order consumer, for example, to retrieve or update it.
      operationId: RetrieveOrderConsumers
      parameters:
        - name: expand
          in: query
          schema:
            $ref: '#/components/schemas/Expand'
        - name: offset
          in: query
          schema:
            $ref: '#/components/schemas/Offset'
        - name: limit
          in: query
          schema:
            $ref: '#/components/schemas/Limit'
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveOrderConsumersResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orderConsumers/{orderConsumerRef}:
    get:
      tags:
        - Order consumer
      summary: Retrieve an order consumer
      description: Retrieves an order consumer.
      operationId: RetrieveOrderConsumer
      parameters:
        - name: orderConsumerRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order consumer reference. This is a unique identifier of the
              order consumer. Automatically generated when you created the order
              consumer. If you don't know the order consumer reference, first
              list order consumers.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '201':
          description: Resource successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerResponseObject'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    put:
      tags:
        - Order consumer
      summary: Update an order consumer
      description: Updates an order consumer.
      operationId: UpdateOrderConsumer
      parameters:
        - name: orderConsumerRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order consumer reference. This is a unique identifier of the
              order consumer. Automatically generated when you created the order
              consumer. If you don't know the order consumer reference, first
              list order consumers.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderConsumerRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerResponseObject'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    patch:
      tags:
        - Order consumer
      summary: Partially update an order consumer
      description: Partially updates an order consumer.
      operationId: PartiallyUpdateOrdeConsumer
      parameters:
        - name: orderConsumerRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order consumer reference. This is a unique identifier of the
              order consumer. Automatically generated when you created the order
              consumer. If you don't know the order consumer reference, first
              list order consumers.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderConsumerRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerResponseObject'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    delete:
      tags:
        - Order consumer
      summary: Delete an order consumer
      description: >-
        Delete an order consumer. An empty, 204 response means that the deletion
        was successful.
      operationId: DeleteOrder
      parameters:
        - name: orderConsumerRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order consumer reference. This is a unique identifier of the
              order consumer. Automatically generated when you created the order
              consumer. If you don't know the order consumer reference, first
              list order consumers.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '204':
          description: Successful operation
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orderConsumers/{orderConsumerRef}/orderItems:
    get:
      tags:
        - Order consumer
      summary: List a consumer's order items
      description: Retrieves order items for a consumer.
      operationId: RetrieveOrderItems
      parameters:
        - name: orderConsumerRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order consumer reference. This is a unique identifier of the
              order consumer. Automatically generated when you created the order
              consumer. If you don't know the order consumer reference, first
              list order consumers.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveOrderItemsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderConsumerBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orders/{orderRef}/contacts:
    post:
      tags:
        - Order contact
      summary: Create an order contact
      description: |-
        Creates the primary contact on an order. 
         In `identifiers`, make sure to provide enough identity information according to [your organization's identity rules](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/identifying-guests-in-sitecore-cdp.html). 

         In the response, `ref` contains the order contact reference. Use the order contact reference to interact with a specific contact, for example, to retrieve or update it.
      operationId: CreateOrderContact
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderContactRequest'
      responses:
        '201':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactResponseObject'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    get:
      tags:
        - Order contact
      summary: List order contacts for an order
      description: |-
        Retrieves a list of order contacts for an order.

         In the response, `items.ref` contains the order contact reference. Use the order contact reference to interact with a specific order contact, for example, to retrieve or update it.
      operationId: RetrieveOrderContacts
      parameters:
        - name: expand
          in: query
          schema:
            $ref: '#/components/schemas/expand'
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '200':
          description: Resource successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveOrderContactsResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orderContacts/{orderContactRef}:
    get:
      tags:
        - Order contact
      summary: Retrieve an order contact
      description: Retrieves an order contact.
      operationId: RetrievesOrderContact
      parameters:
        - name: orderContactRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order contact reference. This is a unique identifier of the
              order contact. Automatically generated when you created the order
              contact. If you don't know the order contact reference, first list
              order contacts.
            example: 3b5cb55e-c616-424a-991c-a241d0024896
      responses:
        '200':
          description: Resource successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactResponseObject'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    put:
      tags:
        - Order contact
      summary: Update an order contact
      description: Updates an order contact.
      operationId: UpdateOrderContact
      parameters:
        - name: orderContactRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order contact reference. This is a unique identifier of the
              order contact. Automatically generated when you created the order
              contact. If you don't know the order contact reference, first list
              order contacts.
            example: 3b5cb55e-c616-424a-991c-a241d0024896
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderContactRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactResponseObject'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    patch:
      tags:
        - Order contact
      summary: Partially update an order contact
      description: Partially updates an order contact.
      operationId: PartiallyUpdateOrderContact_1
      parameters:
        - name: orderContactRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order contact reference. This is a unique identifier of the
              order contact. Automatically generated when you created the order
              contact. If you don't know the order contact reference, first list
              order contacts.
            example: 3b5cb55e-c616-424a-991c-a241d0024896
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderContactRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactResponseObject'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    delete:
      tags:
        - Order contact
      summary: Delete an order contact
      description: Partially updates an order contact.
      operationId: PartiallyUpdateOrderContact
      parameters:
        - name: orderContactRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order contact reference. This is a unique identifier of the
              order contact. Automatically generated when you created the order
              contact. If you don't know the order contact reference, first list
              order contacts.
            example: 3b5cb55e-c616-424a-991c-a241d0024896
      responses:
        '204':
          description: Successful operation
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderContactBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orders/{orderRef}/orderItems:
    post:
      tags:
        - Order item
      summary: Create an order item
      description: |-
        Creates an order item on an order. 

         In the response, `ref` contains the order item reference. Use the order item reference to interact with a specific order item, for example, to retrieve it, update it, or create a data extension for it.
      operationId: CreateOrderItem
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderItemRequest'
      responses:
        '201':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    get:
      tags:
        - Order item
      summary: List order items for an order
      description: |-
        Retrieves a list of order items for an order. 

         In the response, `items.ref` contains the order item reference. Use the order item reference to interact with a specific order item, for example, to retrieve or update it.
      operationId: RetrieveOrderItems_1
      parameters:
        - name: expand
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: >
              You can expand items in a collection by setting `expand=true`.
              This eliminates the need to send multiple follow-up requests (one
              for the collection and another for each of its items). This also
              helps you check if the data you intend to create already exists.
            example: true
            items:
              type: string
              description: >
                You can expand items in a collection by setting `expand=true`.
                This eliminates the need to send multiple follow-up requests
                (one for the collection and another for each of its items). This
                also helps you check if the data you intend to create already
                exists.
              example: 'true'
              default: ''
        - name: offset
          in: query
          schema:
            $ref: '#/components/schemas/Offset'
        - name: limit
          in: query
          schema:
            $ref: '#/components/schemas/Limit'
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveOrderItemsResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orderItems/{orderItemRef}:
    get:
      tags:
        - Order item
      summary: Retrieve an order item
      description: Retrieves an order item.
      operationId: RetrieveOrderItem
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: expand
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: >
              You can expand items in a collection by setting `expand=true`.
              This eliminates the need to send multiple follow-up requests (one
              for the collection and another for each of its items). This also
              helps you check if the data you intend to create already exists.
            example: true
            items:
              type: string
              description: >
                You can expand items in a collection by setting `expand=true`.
                This eliminates the need to send multiple follow-up requests
                (one for the collection and another for each of its items). This
                also helps you check if the data you intend to create already
                exists.
              example: 'true'
              default: ''
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    put:
      tags:
        - Order item
      summary: Update an order item
      description: Updates an order item.
      operationId: UpdatesOrderItem
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderItemRequest'
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    patch:
      tags:
        - Order item
      summary: Partially update an order item
      description: Partially updates an order item.
      operationId: PartiallyUpdatesOrderItem
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderItemRequest'
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItemRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    delete:
      tags:
        - Order item
      summary: Delete an order item
      description: Deletes an order item.
      operationId: DeleteOrderItem
      parameters:
        - name: orderItemRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order item reference. This is a unique identifier of the order
              item. Automatically generated when you created the order item. If
              you don't know the order item reference, first list order items.
            format: UUID
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '204':
          description: Successful operation
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /v2.1/orders/{orderRef}:
    get:
      tags:
        - Order
      summary: Retrieve an order
      description: Retrieves an order.
      operationId: RetrieveOrder
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
        - name: expand
          in: query
          schema:
            type: array
            properties:
              empty:
                type: boolean
            description: >
              You can expand items in a collection by setting `expand=true`.
              This eliminates the need to send multiple follow-up requests (one
              for the collection and another for each of its items). This also
              helps you check if the data you intend to create already exists.
            example: true
            items:
              type: string
              description: >
                You can expand items in a collection by setting `expand=true`.
                This eliminates the need to send multiple follow-up requests
                (one for the collection and another for each of its items). This
                also helps you check if the data you intend to create already
                exists.
              example: 'true'
              default: ''
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderCreateResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    put:
      tags:
        - Order
      summary: Update an order
      description: >-
        Updates an order. You can update orders that have the same `referenceId`
        and have `orderedAt` values (purchase dates) within two days of another.
        `referenceId` and `orderedAt` cannot be updated.
      operationId: UpdateOrder
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderCreateRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderCreateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    patch:
      tags:
        - Order
      summary: Partially update an order
      description: >-
        Partially updates an order. You can update orders that have the same
        `referenceId` and have `orderedAt` values (purchase dates) within two
        days of another. `referenceId` and `orderedAt` cannot be updated.
      operationId: UpdateOrder_1
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderCreateRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderCreateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderBadRequestResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    delete:
      tags:
        - Order
      summary: Delete an order
      description: >-
        Deletes an order. An empty, `204 No Content` response means that the
        deletion was successful.
      operationId: DeleteOrder_1
      parameters:
        - name: orderRef
          in: path
          required: true
          schema:
            type: string
            description: >
              The order reference. This is a unique identifier of the order
              record. Automatically generated when you created the order. If you
              don't know the order reference, first list orders.
            example: 2d7de9df-45a2-45ea-872c-30e45139007d
      responses:
        '204':
          description: Successful operation
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
components:
  schemas:
    UnauthorizedResponse:
      type: object
      properties:
        status:
          type: string
          description: The HTTP request status.
          format: uppercase
          example: UNAUTHORIZED
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 401
        message:
          type: string
          description: Error description.
          example: >-
            Authentication credentials are required to access the resource. All
            requests must be authenticated.
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: https://support.sitecore.com
    OrderItemLinkFirst:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/111d106a-feff-42b2-90fb-a6ed136ec333
      description: The request's first list of order items URL.
    OrderItemLinkLast:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/111d106a-feff-42b2-90fb-a6ed136ec333
      description: The request's last list of order items URL.
    OrderItemNext:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/111d106a-feff-42b2-90fb-a6ed136ec333/orderItems?offset=1&limit=10
      description: The request's next list of order items URL.
    RetrieveOrderItemsResponse:
      type: object
      properties:
        offset:
          type: integer
          description: The request's offset.
          format: int32
          example: 0
        limit:
          type: integer
          description: The request's limit.
          format: int32
          example: 10
        first:
          $ref: '#/components/schemas/OrderItemLinkFirst'
        last:
          $ref: '#/components/schemas/OrderItemLinkLast'
        next:
          $ref: '#/components/schemas/OrderItemNext'
        href:
          type: string
          description: The request's URL.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/orderItems?offset=0&limit=10
        items:
          type: array
          format: List
          items:
            $ref: '#/components/schemas/items'
    items:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/111d106a-feff-42b2-90fb-a6ed136ec333
      description: orderItems
    OrderConsumerBadRequestResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP request status.
          format: int32
          example: 400
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 400
        message:
          type: string
          description: 'firstName: firstName may not be null.'
        developerMessage:
          type: string
          description: Error description for developers.
          example: 'firstName: may not be null.'
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: https://support.sitecore.com
    CollectionResourceLink:
      type: object
      properties:
        href:
          type: string
        offset:
          type: object
        nextOffset:
          type: object
        limit:
          type: integer
          format: int32
        first:
          $ref: '#/components/schemas/Link'
        prev:
          $ref: '#/components/schemas/Link'
        next:
          $ref: '#/components/schemas/Link'
        last:
          $ref: '#/components/schemas/Link'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Link'
    Link:
      type: object
      properties:
        href:
          type: string
    OrderConsumerResponseObject:
      type: object
      properties:
        ref:
          type: string
          description: |
            The order consumer reference.
          format: UUID
          example: 2d7de9df-45a2-45ea-872c-30e45139007d
        href:
          type: string
          description: |
            The link to the order consumer.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderConsumers/2d7de9df-45a2-45ea-872c-30e45139007d
        title:
          type: string
          description: >
            The title of the person.


            Example values: "Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr",
            "Elder", "Fr", "General", "Hon", "Judge", "Lord", "Master", "Miss",
            "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha",
            "Sheikh", "Sir", "Sister", "Sr"
          format: title case
          example: Mr
        firstName:
          type: string
          description: The person's first name.
          format: title case
          example: John
        lastName:
          type: string
          description: The person's last name.
          format: title case recommended
          example: Doe
        gender:
          type: string
          description: |
            The person's gender.

            Example values: "male", "female", "unknown"
          format: lowercase
          example: male
          enum:
            - male
            - female
            - unknown
        dateOfBirth:
          type: string
          description: |
            The person's date of birth. Validation: Date must be in the past.
          format: date-time
          example: '1991-01-01T16:17:16Z'
        emails:
          type: array
          description: |
            All the email addresses of the person.
          example:
            - john.doe@gmail.com
          items:
            type: string
            description: |
              All the email addresses of the person.
            example: '["john.doe@gmail.com"]'
        phoneNumbers:
          type: array
          description: |
            The phone numbers of the person.
          example:
            - '+353161123345'
            - '+353161123346'
          items:
            type: string
            description: |
              The phone numbers of the person.
            example: '["+353161123345","+353161123346"]'
        nationality:
          type: string
          description: |
            The person's nationality.

            Example values: "Irish", "British", "Spanish", "French"
          format: title case
          example: Irish
        passportNumber:
          type: string
          description: |
            The passport number of the guest.
          format: uppercase
          example: PZ4A9565
        country:
          type: string
          description: |-
            The guest's country.

            Example values: "IE", "GB", "ES", "FR"
          format: 2-letter ISO 3166-1 Alpha-2 country code
          example: IE
        orderItems:
          $ref: '#/components/schemas/OrderItemResponseObj'
        order:
          type: object
          properties:
            href:
              type: string
              example: >-
                https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10
          description: The link to the order.
        guest:
          type: object
          properties:
            href:
              type: string
              example: >-
                https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03
          description: The link to the guest.
    OrderItemResponseObj:
      type: object
      properties:
        orderItems:
          type: array
          format: List
          items:
            $ref: '#/components/schemas/OrderItemLinkLast'
      description: Order item details, containing a list of items.
    guest:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03
      description: |
        The link to the guest.
      format: object
    order:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10
      description: |
        The link to the order.
      format: object
    Identifier:
      type: object
      properties:
        provider:
          type: string
          description: The identifier provider.
          example: ProfileSystem
        id:
          type: string
          description: The identifier ID.
          example: B7524AE6-CF1C-440F-B1A2-0C9D42F5CB41
    OrderConsumerRequest:
      type: object
      properties:
        title:
          type: string
          description: >
            The title of the person.


            Example values: "Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr",
            "Elder", "Fr", "General", "Hon", "Judge", "Lord", "Master", "Miss",
            "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha",
            "Sheikh", "Sir", "Sister", "Sr"
          format: title case
          example: Mr
        firstName:
          type: string
          description: The person's first name.
          format: title case
          example: John
        lastName:
          type: string
          description: The person's last name.
          format: title case recommended
          example: Doe
        gender:
          type: string
          description: |
            The person's gender.

            Example values: "male", "female", "unknown"
          format: lowercase
          example: male
          enum:
            - male
            - female
            - unknown
        dateOfBirth:
          type: string
          description: |
            The person's date of birth. Validation: Date must be in the past.
          format: date-time
          example: '1991-01-01T16:17:16Z'
        emails:
          type: array
          description: |
            All the email addresses of the person.
          example:
            - john.doe@gmail.com
          items:
            type: string
            description: |
              All the email addresses of the person.
            example: '["john.doe@gmail.com"]'
        phoneNumbers:
          type: array
          description: |
            The phone numbers of the person.
          example:
            - '+353161123345'
            - '+353161123346'
          items:
            type: string
            description: |
              The phone numbers of the person.
            example: '["+353161123345","+353161123346"]'
        nationality:
          type: string
          description: |
            The person's nationality.

            Example values: "Irish", "British", "Spanish", "French"
          format: title case
          example: Irish
        passportNumber:
          type: string
          description: |
            The passport number of the guest.
          format: uppercase
          example: PZ4A9565
        country:
          type: string
          description: |-
            The guest's country.

            Example values: "IE", "GB", "ES", "FR"
          format: 2-letter ISO 3166-1 Alpha-2 country code
          example: IE
        identifiers:
          type: array
          description: The guest's identifiers.
          items:
            $ref: '#/components/schemas/Identifier'
    OrderContactBadRequestResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP request status.
          format: int32
          example: 400
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 400
        message:
          type: string
          description: description message
          example: 'firstName: may not be null.'
        developerMessage:
          type: string
          description: Error description for developers.
          example: 'firstName: may not be null.'
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: https://support.sitecore.com
    GuestLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03
      description: List of order contacts.
      example: []
    OrderContactResponseObject:
      type: object
      properties:
        ref:
          type: string
          description: |
            The order contact reference.
          format: UUID
          example: 2d7de9df-45a2-45ea-872c-30e45139007d
        href:
          type: string
          description: |
            The link to the order contact.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderContacts/2d7de9df-45a2-45ea-872c-30e45139007d
        firstName:
          type: string
          description: The person's first name.
          format: title case
          example: John
        lastName:
          type: string
          description: The person's last name.
          format: title case recommended
          example: Doe
        emails:
          type: array
          description: |
            All the email addresses of the person.
          example:
            - john.doe@gmail.com
          items:
            type: string
            description: |
              All the email addresses of the person.
            example: '["john.doe@gmail.com"]'
        identifiers:
          type: array
          description: The guest's identifiers.
          items:
            $ref: '#/components/schemas/Identifier'
        street:
          type: array
          description: The order contact's street address.
          example:
            - Tara St.
            - Main Ave.
          items:
            type: string
        city:
          type: string
          description: The order contact's city.
          format: String
          example: Dublin
        state:
          type: string
          description: The order contact's state.
          format: String
          example: New York
        postCode:
          type: string
          description: The order contact's post code.
          format: String
          example: '10001'
        title:
          type: string
          description: >
            The title of the person.


            Example values: "Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr",
            "Elder", "Fr", "General", "Hon", "Judge", "Lord", "Master", "Miss",
            "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha",
            "Sheikh", "Sir", "Sister", "Sr"
          format: title case
          example: Mr
        gender:
          type: string
          description: |
            The person's gender.

            Example values: "male", "female", "unknown"
          format: lowercase
          example: male
          enum:
            - male
            - female
            - unknown
        dateOfBirth:
          type: string
          description: |
            The person's date of birth. Validation: Date must be in the past.
          format: date-time
          example: '1991-01-01T16:17:16Z'
        phoneNumbers:
          type: array
          description: |
            The phone numbers of the person.
          example:
            - '+353161123345'
            - '+353161123346'
          items:
            type: string
            description: |
              The phone numbers of the person.
            example: '["+353161123345","+353161123346"]'
        nationality:
          type: string
          description: |
            The person's nationality.

            Example values: "Irish", "British", "Spanish", "French"
          format: title case
          example: Irish
        passportNumber:
          type: string
          description: |
            The passport number of the contact.
          format: uppercase
          example: PZ4A9565
        country:
          type: string
          description: |-
            The guest's country.

            Example values: "IE", "GB", "ES", "FR"
          format: 2-letter ISO 3166-1 Alpha-2 country code
          example: IE
        order:
          type: object
          properties:
            href:
              type: string
              example: >-
                https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10
          description: The link to the order.
        guest:
          type: object
          properties:
            href:
              type: string
              example: >-
                https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03
          description: The link to the guest.
    OrderLinkFirst:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10
      description: The request's first list of orders URL.
    OrderContactRequest:
      type: object
      properties:
        firstName:
          type: string
          description: The person's first name.
          format: title case
          example: John
        lastName:
          type: string
          description: The person's last name.
          format: title case recommended
          example: Doe
        emails:
          type: array
          description: |
            All the email addresses of the person.
          example:
            - john.doe@gmail.com
          items:
            type: string
            description: |
              All the email addresses of the person.
            example: '["john.doe@gmail.com"]'
        identifiers:
          type: array
          description: The guest's identifiers.
          items:
            $ref: '#/components/schemas/Identifier'
        street:
          type: array
          description: The order contact's street address.
          example:
            - Tara St.
            - Main Ave.
          items:
            type: string
        city:
          type: string
          description: The order contact's city.
          format: String
          example: Dublin
        state:
          type: string
          description: The order contact's post code.
          format: String
          example: '10001'
        title:
          type: string
          description: >
            The title of the person.


            Example values: "Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr",
            "Elder", "Fr", "General", "Hon", "Judge", "Lord", "Master", "Miss",
            "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha",
            "Sheikh", "Sir", "Sister", "Sr"
          format: title case
          example: Mr
        gender:
          type: string
          description: |
            The person's gender.

            Example values: "male", "female", "unknown"
          format: lowercase
          example: male
          enum:
            - male
            - female
            - unknown
        dateOfBirth:
          type: string
          description: |
            The person's date of birth. Validation: Date must be in the past.
          format: date-time
          example: '1991-01-01T16:17:16Z'
        phoneNumbers:
          type: array
          description: |
            The phone numbers of the person.
          example:
            - '+353161123345'
            - '+353161123346'
          items:
            type: string
            description: |
              The phone numbers of the person.
            example: '["+353161123345","+353161123346"]'
        nationality:
          type: string
          description: |
            The person's nationality.

            Example values: "Irish", "British", "Spanish", "French"
          format: title case
          example: Irish
        passportNumber:
          type: string
          description: |
            The passport number of the contact.
          format: uppercase
          example: PZ4A9565
        country:
          type: string
          description: |-
            The guest's country.

            Example values: "IE", "GB", "ES", "FR"
          format: 2-letter ISO 3166-1 Alpha-2 country code
          example: IE
    DataExtensionResponse:
      type: object
      properties:
        name:
          type: string
          description: The name of the data extension.
          example: ext
        href:
          type: string
          description: |
            The URL of the order extension.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/extensions/ext
        ref:
          type: string
          description: |
            The order extension reference.
          example: 6a5cb3c2-1a4a-56d8-8a01-1ede232b9db2
        key:
          type: string
          description: The value `"default"`.
          example: default
        createdAt:
          type: string
          description: The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: >-
            The date and time when the resource was last updated in Sitecore
            CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        '{exampleKey1}':
          type:
            - string
            - boolean
            - integer
            - number
          description: |-
            A key-value pair of your choice.
             Supported data types for the values: string, boolean, integer, floating-point number. 
             Example: `"firstTimeOrder": true`
          example: '{exampleValue1}'
        '{exampleKey2}':
          type:
            - string
            - boolean
            - integer
            - number
          description: |-
            A key-value pair of your choice. 
             Supported data types for the values: string, boolean, integer, floating-point number. 
             Example:`"storeLocation": "London"`
          example: '{exampleValue2}'
        order:
          $ref: '#/components/schemas/OrderLinkFirst'
    DataExtensionCreateRequest:
      required:
        - name
      type: object
      properties:
        '{exampleKey1}':
          type:
            - string
            - boolean
            - integer
            - number
          description: |-
            A key-value pair of your choice.
             Supported data types for the values: string, boolean, integer, floating-point number. 
             Example: `"firstTimeOrder": true`
          example: '{exampleValue1}'
        '{exampleKey2}':
          type:
            - string
            - boolean
            - integer
            - number
          description: |-
            A key-value pair of your choice. 
             Supported data types for the values: string, boolean, integer, floating-point number. 
             Example:`"storeLocation": "London"`
          example: '{exampleValue2}'
    DataExtensionNotFoundResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP request status.
          format: int32
          example: 404
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 404
        message:
          type: string
          description: Error description.
          example: The specified resource does not exist.
        developerMessage:
          type: string
          description: Error description for developers.
          example: >-
            Data extension ext2 for Guest ref
            ea9b4612-3488-47d9-beea-17404876f5d6 and client key ... was not
            found for v2.1
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: https://support.sitecore.com
    name:
      type: array
      properties:
        empty:
          type: boolean
      description: The fields in the data extension object that you want to delete.
      example: withWarranty|color
      items:
        type: string
        description: The fields in the data extension object that you want to delete.
        example: withWarranty|color
        default: ''
    OrderDataExtensionFirstLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions
      description: The request's first list of order data extensions URL.
    OrderDataExtensionLastLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions
      description: The request's last list of order data extensions URL.
    OrderDataExtensionLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions/ext
    OrderDataExtensionNextLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions
      description: The request's next list of order data extensions URL.
    OrderHref:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51
    RetrieveOrderDataExtensionResponse:
      type: object
      properties:
        name:
          type: string
          description: The name of the data extension.
          example: ext
        offset:
          type: integer
          description: The request's offset.
          format: int32
          example: 0
        limit:
          type: integer
          description: The request's limit.
          format: int32
          example: 10
        first:
          $ref: '#/components/schemas/OrderDataExtensionFirstLink'
        last:
          $ref: '#/components/schemas/OrderDataExtensionLastLink'
        next:
          $ref: '#/components/schemas/OrderDataExtensionNextLink'
        href:
          type: string
          description: The request's URL.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions/ext
        items:
          type: array
          description: The request's data extension items.
          format: List
          items:
            $ref: '#/components/schemas/OrderDataExtensionLink'
        order:
          $ref: '#/components/schemas/OrderHref'
    Expand:
      type: array
      properties:
        empty:
          type: boolean
      description: >
        You can expand items in a collection by setting `expand=true`. This
        eliminates the need to send multiple follow-up requests (one for the
        collection and another for each of its items). This also helps you check
        if the data you intend to create already exists.
      example: true
      items:
        type: string
        description: >
          You can expand items in a collection by setting `expand=true`. This
          eliminates the need to send multiple follow-up requests (one for the
          collection and another for each of its items). This also helps you
          check if the data you intend to create already exists.
        example: 'true'
        default: ''
    Offset:
      type: object
      description: >-
        Collection responses use offset pagination. The offset query parameter
        is used to exclude from a response the first N items of the entire
        resource collection.
      example: 0
      default: '0'
    Limit:
      maximum: 100
      minimum: 10
      type: object
      description: >
        Collection responses use offset pagination. This query parameter lets
        you adjust the maximum number of collection items to return for a single
        request.
      example: 40
      default: '10'
    DataExtensionUpdateBadRequestResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP request status.
          format: int32
          example: 400
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 400
        message:
          type: string
          description: Error description.
          example: Unable to parse JSON string
        developerMessage:
          type: string
          description: Error description for developers.
          example: 'JSON parse error [line: 7, column: 6].'
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: http://support.sitecore.com
    DataExtensionConflictResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP request status.
          format: int32
          example: 409
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 409
        message:
          type: string
          description: Error description.
          example: Data extension ext already exists.
        developerMessage:
          type: string
          description: Error description for developers.
          example: '409 (Conflict): Data extension ext already exists.'
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: https://support.sitecore.com
    OrderItemDataExtensionResponse:
      type: object
      properties:
        name:
          type: string
          description: The name of the data extension.
          example: ext
        href:
          type: string
          description: |
            The URL of the order item extension.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/extensions/ext
        ref:
          type: string
          description: |
            The order item extension reference.
          example: 6a5cb3c2-1a4a-56d8-8a01-1ede232b9db2
        key:
          type: string
          description: The value `"default"`.
          example: default
        createdAt:
          type: string
          description: The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: >-
            The date and time when the resource was last updated in Sitecore
            CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        '{exampleKey1}':
          type:
            - string
            - boolean
            - integer
            - number
          description: |-
            A key-value pair in the data extension.
             Example: `"withWarranty": true`
          example: '{exampleValue1}'
        '{exampleKey2}':
          type:
            - string
            - boolean
            - integer
            - number
          description: |-
            A key-value pair in the data extension.
             Example: `"color": "obsidian"`
          example: '{exampleValue2}'
        orderItem:
          $ref: '#/components/schemas/OrderItemLinkLast'
    OrderItemDataExtensionFirstLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions
      description: The request's first list of order item data extensions URL.
    OrderItemDataExtensionLastLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions
      description: The request's last list of order item data extensions URL.
    OrderItemDataExtensionLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions/ext
    OrderItemDataExtensionNextLink:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions
      description: The request's next list of order item data extensions URL.
    RetrieveOrderItemDataExtensionResponse:
      type: object
      properties:
        name:
          type: string
          description: The name of the data extension.
          example: ext
        offset:
          type: integer
          description: The request's offset.
          format: int32
          example: 0
        limit:
          type: integer
          description: The request's limit.
          format: int32
          example: 10
        first:
          $ref: '#/components/schemas/OrderItemDataExtensionFirstLink'
        last:
          $ref: '#/components/schemas/OrderItemDataExtensionLastLink'
        next:
          $ref: '#/components/schemas/OrderItemDataExtensionNextLink'
        href:
          type: string
          description: The request's URL.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/cadd106a-feff-42b2-90fb-a6ed136ece51/extensions
        items:
          type: array
          description: The request's data extension items.
          format: List
          items:
            $ref: '#/components/schemas/OrderItemDataExtensionLink'
        order:
          $ref: '#/components/schemas/OrderHref'
    OrderItemRequestResponse:
      type: object
      properties:
        ref:
          type: string
          description: >
            The order item reference. This is a unique identifier of the order
            item. Use the order item reference to interact with a specific order
            item, for example, to retrieve it, update it, or create a data
            extension for it.
          format: UUID
          example: 2d7de9df-45a2-45ea-872c-30e45139007d
        href:
          type: string
          description: |
            The link to the order item.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/2d7de9df-45a2-45ea-872c-30e45139007d
        name:
          type: string
          description: >
            The name of the order item. Free text value. Maximum character
            limit: 128 
          example: Mobile AZ10
        description:
          type: string
          description: |
            The description of the order item. 
          example: Mobile AZ10 description
        createdAt:
          type: string
          description: |
            The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: |
            The date and time when the resource was updated in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        orderedAt:
          type: string
          description: |
            The date and time when the order item was made.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        type:
          type: string
          description: |
            The type of order item.
          example: MOBILE
        productId:
          type: string
          description: |
            The ID of the product.
          example: 1233-44
        price:
          type: number
          description: |
            The organization's price for the order item.
          example: 105
        currencyCode:
          type: string
          description: |
            The organization's currency code for the order item. 
          example: EUR
        originalPrice:
          type: number
          description: >
            The unit price of the order item before conversion to the
            organization's currency. 
          example: 110
        originalCurrencyCode:
          type: string
          description: |
            The original currency code for the order item. 
          example: USD
        referenceId:
          type: string
          description: |
            An ID generated by the client to reference the order item. 
          example: AAAAA-134
        vendor:
          type: string
          description: |
            The organization that is selling the order item. 
          example: Vendor XYZ
        status:
          type: string
          description: |
            The status of the order item. 
          example: CONFIRMED
        language:
          type: string
          description: |
            The language used when making the order.
          example: EN
        quantity:
          type: integer
          description: |
            The number or quantity of the order item. 
          format: int32
          example: 1
        channel:
          type: string
          description: |
            The channel used in the order. 
          example: WEB
        order:
          $ref: '#/components/schemas/OrderLinkFirst'
    OrderItemRequest:
      required:
        - currencyCode
        - name
        - price
        - status
        - type
      type: object
      properties:
        name:
          type: string
          description: >
            The name of the order item. Free text value. Maximum character
            limit: 128 
          example: Mobile AZ10
        description:
          type: string
          description: |
            The description of the order item. 
          example: Mobile AZ10 description
        type:
          type: string
          description: |-
            The type of order item.
             Must not be set to any of the following: "FLIGHT", "HOTEL", "MORTGAGE", "MORTGAGE_APPLICATION", "LOAN_APPLICATION", "PERSONAL_LOAN", "RAIL"
          example: MOBILE
        productId:
          type: string
          description: |
            The ID of the product.
          example: 1233-44
        price:
          type: number
          description: |
            The organization's price for the order item.
          example: 105
        currencyCode:
          type: string
          description: |
            The organization's currency code for the order item. 
          example: EUR
        originalPrice:
          type: number
          description: >
            The unit price of the order item before conversion to the
            organization's currency.
          example: 110
        originalCurrencyCode:
          type: string
          description: |
            The original currency code for the order item. 
          example: USD
        referenceId:
          type: string
          description: |
            An ID generated by the client to reference the order item.
          example: AAAAA-134
        vendor:
          type: string
          description: |
            The organization that is selling the order item.
          example: Vendor XYZ
        status:
          type: string
          description: |
            The status of the order item.
          example: CONFIRMED
        language:
          type: string
          description: |
            The language used when making the order.
          example: EN
        quantity:
          type: integer
          description: |
            The number or quantity of the order item. 
          format: int32
          example: 1
        channel:
          type: string
          description: |
            The channel used in the order. 
          example: WEB
    OrderConsumerItem:
      type: object
      description: An individual contact item such as email, phone number, etc.
      example: []
    OrderConsumerResponse:
      type: object
      properties:
        items:
          type: array
          description: List of consumers.
          example: []
          items:
            $ref: '#/components/schemas/OrderConsumerItem'
      description: Consumer details, containing a list of items.
    OrderContactResponse:
      type: object
      properties:
        items:
          type: array
          description: List of order contacts.
          example: []
          items:
            $ref: '#/components/schemas/GuestLink'
      description: Contact details, containing a list of items.
    OrderCreateResponse:
      type: object
      properties:
        ref:
          type: string
          description: >
            The order reference. This is a unique identifier of the order
            record. Use the order reference to interact with a specific order,
            for example, to retrieve it, update it, or create a data extension
            for it.
          format: UUID
          example: 2d7de9df-45a2-45ea-872c-30e45139007d
        href:
          type: string
          description: |
            The link to the order.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d
        createdAt:
          type: string
          description: |
            The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: |
            The date and time when the resource was updated in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        orderedAt:
          type: string
          description: |
            The date and time when the order was made.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        currencyCode:
          type: string
          description: |
            The currency the guest used to complete a purchase.
          format: 3 letter ISO 4217
          example: EUR
        price:
          type: number
          description: |
            The amount paid for the order.
          format: number (currency)
          example: 50
        referenceId:
          type: string
          description: >
            A unique identifier generated by your organization to reference the
            order. For flight orders, this is often the PNR.
          format: string
          example: B94TXY-1
        paymentType:
          type: string
          description: |
            The method of payment for the order.
          format: string (title case recommended)
          example: Card
        cardType:
          type: string
          description: |
            The card type used to pay for the order.
          format: string (title case recommended)
          example: Visa
        pointOfSale:
          type: string
          description: |
            The point of sale used in the order.
          format: string (predefined by the client)
          example: home
        channel:
          type: string
          description: |
            The channel used in the order.
          example: WEB
          enum:
            - WEB
            - MOBILE_WEB
            - MOBILE_APP
            - CALL_CENTER
            - AIRPORT_KIOSK
            - BRANCH
            - KIOSK
            - OFFLINE
            - GDS
            - OTA
            - OTHER
        status:
          type: string
          description: |
            The status of the order.
          example: PURCHASED
          enum:
            - BROWSED
            - CANCELLED
            - CONFIRMED
            - DECLINED
            - PARTIALY_CONFIRMED
            - PARTIALY_REFUNDED
            - PAYMENT_PENDING
            - PENDING
            - PURCHASED
            - REFUNDED
            - RESERVED
            - SEARCHED
            - UNKNOWN
        contacts:
          $ref: '#/components/schemas/OrderContactResponse'
        consumers:
          $ref: '#/components/schemas/OrderConsumerResponse'
        orderItems:
          $ref: '#/components/schemas/OrderItemResponse'
    OrderItem:
      type: object
      description: An order item.
      example: []
    OrderItemResponse:
      type: object
      properties:
        items:
          type: array
          description: List of order items.
          example: []
          items:
            $ref: '#/components/schemas/OrderItem'
      description: Order item details, containing a list of items.
    OrderBadRequestResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP request status.
          format: int32
          example: 400
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 400
        message:
          type: string
          description: Error description.
          example: 'orderedAt: may not be null.'
        developerMessage:
          type: string
          description: Error description for developers.
          example: 'orderedAt: may not be null.'
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: https://support.sitecore.com
    OrderAlreadyExistsResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP request status.
          format: int32
          example: 409
        code:
          type: integer
          description: The HTTP response status code.
          format: int32
          example: 409
        message:
          type: string
          description: The resource already exists so it can't be created.
        developerMessage:
          type: string
          description: Error description for developers.
          example: >-
            Order with ref AAA-9999 and orderedAt Wed Jun 23 17:49:07 CEST 2004
            for client key ... already exist
        moreInfoUrl:
          type: string
          description: URL to get more information about the error.
          example: https://support.sitecore.com
    OrderCreateRequest:
      required:
        - currencyCode
        - orderedAt
        - price
        - referenceId
      type: object
      properties:
        createdAt:
          type: string
          description: |
            The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: |
            The date and time when the resource was updated in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        orderedAt:
          type: string
          description: |
            The date and time when the order was made.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        currencyCode:
          type: string
          description: >
            The currency the guest used to complete a purchase. Set this to the
            organization’s default currency.
          format: 3 letter ISO 4217
          example: EUR
        price:
          type: number
          description: |
            The amount paid for the order.
          format: number (currency)
          example: 50
        referenceId:
          type: string
          description: >
            A unique identifier generated by your organization to reference the
            order. For flight orders, this is often the PNR.
          format: string
          example: B94TXY-1
        paymentType:
          type: string
          description: |
            The method of payment for the order.
          format: string (title case recommended)
          example: Card
        cardType:
          type: string
          description: |
            The card type used to pay for the order.
          format: string (title case recommended)
          example: Visa
        pointOfSale:
          type: string
          description: |
            The point of sale used in the order.
          format: string (predefined by the client)
          example: home
        channel:
          type: string
          description: |
            The channel used in the order.
          example: WEB
          enum:
            - WEB
            - MOBILE_WEB
            - MOBILE_APP
            - CALL_CENTER
            - AIRPORT_KIOSK
            - BRANCH
            - KIOSK
            - OFFLINE
            - GDS
            - OTA
            - OTHER
        status:
          type: string
          description: |
            The status of the order.
          example: PURCHASED
          enum:
            - BROWSED
            - CANCELLED
            - CONFIRMED
            - DECLINED
            - PARTIALY_CONFIRMED
            - PARTIALY_REFUNDED
            - PAYMENT_PENDING
            - PENDING
            - PURCHASED
            - REFUNDED
            - RESERVED
            - SEARCHED
            - UNKNOWN
    OrderConsumerLinkFirst:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/111d106a-feff-42b2-90fb-a6ed136ec333/consumers?offset=1&limit=10
      description: The request's first list of order consumers URL.
    OrderConsumerLinkLast:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/111d106a-feff-42b2-90fb-a6ed136ec333/consumers?offset=1&limit=10
      description: The request's last list of order consumers URL.
    OrderConsumerNext:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/111d106a-feff-42b2-90fb-a6ed136ec333/consumers?offset=1&limit=10
      description: The request's next list of order consumers URL.
    RetrieveOrderConsumersResponse:
      type: object
      properties:
        offset:
          type: integer
          description: The request's offset.
          format: int32
          example: 0
        limit:
          type: integer
          description: The request's limit.
          format: int32
          example: 10
        first:
          $ref: '#/components/schemas/OrderConsumerLinkFirst'
        last:
          $ref: '#/components/schemas/OrderConsumerLinkLast'
        next:
          $ref: '#/components/schemas/OrderConsumerNext'
        href:
          type: string
          description: The request's URL.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/consumers?offset=0&limit=10
        items:
          type: array
          description: The order consumer's items.
          format: List
          items:
            $ref: '#/components/schemas/items'
    OrderContactHref:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/contacts/111d106a-feff-42b2-90fb-a6ed136ec333
      description: The order contacts's items.
    OrderContactLinkFirst:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d/contacts?offset=1&limit=10
      description: The request's first list of order contacts URL.
    OrderContactLinkLast:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d/contacts?offset=1&limit=10
      description: The request's last list of order contacts URL.
    OrderContactNext:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d/contacts?offset=1&limit=10
      description: The request's next list of order contacts URL.
    RetrieveOrderContactsResponse:
      type: object
      properties:
        offset:
          type: integer
          description: The request's offset.
          format: int32
          example: 0
        limit:
          type: integer
          description: The request's limit.
          format: int32
          example: 10
        first:
          $ref: '#/components/schemas/OrderContactLinkFirst'
        last:
          $ref: '#/components/schemas/OrderContactLinkLast'
        next:
          $ref: '#/components/schemas/OrderContactNext'
        href:
          type: string
          description: The request's URL.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51/contacts?offset=0&limit=10
        items:
          type: array
          description: The order contacts's items.
          format: List
          items:
            $ref: '#/components/schemas/OrderContactHref'
    expand:
      type: object
      description: >-
        You can expand items in a collection by setting `expand=true`. This
        eliminates the need to send multiple follow-up requests (one for the
        collection and another for each of its items). This also helps you check
        if the data you intend to create already exists.
      example: true
    OrderLinkLast:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10
      description: The request's last list of orders URL.
    OrdersNext:
      type: object
      properties:
        href:
          type: string
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10
      description: The request's next list of orders URL.
    RetrieveOrdersResponse:
      type: object
      properties:
        offset:
          type: integer
          description: The request's offset.
          format: int32
          example: 0
        limit:
          type: integer
          description: The request's limit.
          format: int32
          example: 10
        first:
          $ref: '#/components/schemas/OrderLinkFirst'
        last:
          $ref: '#/components/schemas/OrderLinkLast'
        next:
          $ref: '#/components/schemas/OrdersNext'
        href:
          type: string
          description: The request's URL.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=cadd106a-feff-42b2-90fb-a6ed136ece51/contacts?offset=0&limit=10
        items:
          type: array
          format: List
          items:
            $ref: '#/components/schemas/OrderHref'
    Arrears:
      type: object
      properties:
        daysPastDue:
          type: integer
          format: int32
        daysPastDueDate:
          type: string
          format: date-time
        daysInArrears:
          type: integer
          format: int32
        daysInArrearsDate:
          type: string
          format: date-time
        baselIIDaysPastDue:
          type: integer
          format: int32
        baselIIDaysPastDueDate:
          type: string
          format: date-time
    CollectionResourceDataExtension:
      type: object
      properties:
        href:
          type: string
        offset:
          type: object
        nextOffset:
          type: object
        limit:
          type: integer
          format: int32
        first:
          $ref: '#/components/schemas/Link'
        prev:
          $ref: '#/components/schemas/Link'
        next:
          $ref: '#/components/schemas/Link'
        last:
          $ref: '#/components/schemas/Link'
        items:
          type: array
          items:
            $ref: '#/components/schemas/DataExtension'
    CollectionResourceEntity:
      type: object
      properties:
        href:
          type: string
        offset:
          type: object
        nextOffset:
          type: object
        limit:
          type: integer
          format: int32
        first:
          $ref: '#/components/schemas/Link'
        prev:
          $ref: '#/components/schemas/Link'
        next:
          $ref: '#/components/schemas/Link'
        last:
          $ref: '#/components/schemas/Link'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Entity'
    CollectionResourceOrderConsumer:
      type: object
      properties:
        href:
          type: string
        offset:
          type: object
        nextOffset:
          type: object
        limit:
          type: integer
          format: int32
        first:
          $ref: '#/components/schemas/Link'
        prev:
          $ref: '#/components/schemas/Link'
        next:
          $ref: '#/components/schemas/Link'
        last:
          $ref: '#/components/schemas/Link'
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderConsumer'
    CollectionResourceOrderContact:
      type: object
      properties:
        href:
          type: string
        offset:
          type: object
        nextOffset:
          type: object
        limit:
          type: integer
          format: int32
        first:
          $ref: '#/components/schemas/Link'
        prev:
          $ref: '#/components/schemas/Link'
        next:
          $ref: '#/components/schemas/Link'
        last:
          $ref: '#/components/schemas/Link'
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderContact'
    CollectionResourceOrderItem:
      type: object
      properties:
        href:
          type: string
        offset:
          type: object
        nextOffset:
          type: object
        limit:
          type: integer
          format: int32
        first:
          $ref: '#/components/schemas/Link'
        prev:
          $ref: '#/components/schemas/Link'
        next:
          $ref: '#/components/schemas/Link'
        last:
          $ref: '#/components/schemas/Link'
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
    DataExtension:
      required:
        - key
        - name
      type: object
      properties:
        href:
          type: string
        ref:
          type: string
        key:
          maxLength: 50
          minLength: 0
          pattern: ^(?![bB][xX])((?![bB][oO][xX][eE][vV][eE][rR])[a-zA-Z-0-9])*$
          type: string
          description: 'Optional. Default and only allowed value: "default"'
          example: default
        createdAt:
          type: string
          description: The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: >-
            The date and time when the resource was last updated in Sitecore
            CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        values:
          type: object
          additionalProperties:
            type: object
          writeOnly: true
      description: The data extension object.
    Entity:
      type: object
      properties:
        href:
          type: string
        ref:
          type: string
    FlightOrderItem:
      required:
        - currencyCode
        - price
        - status
        - type
      type: object
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          properties:
            flightSegments:
              type: array
              items:
                $ref: '#/components/schemas/FlightSegment'
            tripType:
              type: string
            passengerTypeCode:
              type: string
            consumerTypeCode:
              type: string
    FlightSegment:
      required:
        - arrivalDateTime
        - carrier
        - departureDateTime
        - destination
        - origin
      type: object
      properties:
        id:
          type: string
        origin:
          type: string
        destination:
          type: string
        departureDateTime:
          type: string
        arrivalDateTime:
          type: string
        flightNumber:
          type: string
        fareClass:
          type: string
        fareFamily:
          type: string
        carrier:
          type: string
        originDestination:
          type: string
        bookingClass:
          type: string
        operatingCarrier:
          type: string
        operatingCarrierFlightNumber:
          type: string
        equipmentType:
          pattern: ^[^\s].*$
          type: string
    HotelOrderItem:
      required:
        - adults
        - checkInDateTime
        - checkOutDateTime
        - children
        - currencyCode
        - infants
        - numberOfNights
        - price
        - roomRate
        - status
        - type
      type: object
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          properties:
            roomRate:
              minimum: 0
              type: number
            roomType:
              type: string
            roomRateCode:
              type: string
            checkInDateTime:
              type: string
              format: date-time
            checkOutDateTime:
              type: string
              format: date-time
            numberOfNights:
              minimum: 0
              type: integer
              format: int32
            adults:
              minimum: 0
              type: integer
              format: int32
            children:
              minimum: 0
              type: integer
              format: int32
            infants:
              minimum: 0
              type: integer
              format: int32
            starRating:
              maximum: 10
              minimum: 0
              type: integer
              format: int32
            cityCode:
              type: string
            cityName:
              type: string
    LoanApplicationOrderItem:
      required:
        - currencyCode
        - price
        - status
        - type
      type: object
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          properties:
            applicationStatus:
              type: string
            applicationStatusDate:
              type: string
              format: date-time
            drawdownStatus:
              type: string
            drawdownStatusDate:
              type: string
              format: date-time
            openStatus:
              type: string
            openDate:
              type: string
              format: date-time
            applicationID:
              type: string
            applicationPreferredFulfilmentChannel:
              type: string
            applicationOriginatorChannel:
              type: string
            applicationReferralChannel:
              type: string
            inArrears:
              type: boolean
            arrears:
              $ref: '#/components/schemas/Arrears'
            balance:
              type: number
            contractMaturityDate:
              type: string
              format: date-time
            feePeriod:
              type: string
            interestRate:
              type: number
            interestRateType:
              type: string
            lastFeeCharge:
              type: number
            loanAmount:
              type: number
            mainAccount:
              type: boolean
            nextRepaymentDate:
              type: string
              format: date-time
            nickName:
              type: string
            partyStatus:
              type: string
            primaryApplicantOrHolder:
              type: string
            category:
              type: string
            productParty:
              type: array
              items:
                type: string
            purpose:
              type: string
            remainingBalance:
              type: number
            repaymentFrequency:
              type: string
            termMonths:
              type: integer
              format: int32
            topUpInd:
              type: boolean
            firstTimeBuyer:
              type: boolean
            smeInDifficultyInd:
              type: boolean
            valueTransPermittedInd:
              type: boolean
            productReportingCode:
              type: string
            signatureAuthorisationCode:
              type: string
            activeStandingOrder:
              type: boolean
            stageBusinessArea:
              type: string
            LTV:
              type: number
    MortgageApplicationOrderItem:
      required:
        - currencyCode
        - price
        - status
        - type
      type: object
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          properties:
            applicationStatus:
              type: string
            applicationStatusDate:
              type: string
              format: date-time
            drawdownStatus:
              type: string
            drawdownStatusDate:
              type: string
              format: date-time
            openStatus:
              type: string
            openDate:
              type: string
              format: date-time
            applicationID:
              type: string
            applicationPreferredFulfilmentChannel:
              type: string
            applicationOriginatorChannel:
              type: string
            applicationReferralChannel:
              type: string
            inArrears:
              type: boolean
            arrears:
              $ref: '#/components/schemas/Arrears'
            balance:
              type: number
            contractMaturityDate:
              type: string
              format: date-time
            feePeriod:
              type: string
            interestRate:
              type: number
            interestRateType:
              type: string
            lastFeeCharge:
              type: number
            loanAmount:
              type: number
            mainAccount:
              type: boolean
            nextRepaymentDate:
              type: string
              format: date-time
            nickName:
              type: string
            partyStatus:
              type: string
            primaryApplicantOrHolder:
              type: string
            category:
              type: string
            productParty:
              type: array
              items:
                type: string
            purpose:
              type: string
            remainingBalance:
              type: number
            repaymentFrequency:
              type: string
            termMonths:
              type: integer
              format: int32
            topUpInd:
              type: boolean
            firstTimeBuyer:
              type: boolean
            smeInDifficultyInd:
              type: boolean
            valueTransPermittedInd:
              type: boolean
            productReportingCode:
              type: string
            signatureAuthorisationCode:
              type: string
            activeStandingOrder:
              type: boolean
            stageBusinessArea:
              type: string
            LTV:
              type: number
    MortgageOrderItem:
      required:
        - currencyCode
        - price
        - status
        - type
      type: object
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          properties:
            applicationStatus:
              type: string
            applicationStatusDate:
              type: string
              format: date-time
            drawdownStatus:
              type: string
            drawdownStatusDate:
              type: string
              format: date-time
            openStatus:
              type: string
            openDate:
              type: string
              format: date-time
            applicationID:
              type: string
            applicationPreferredFulfilmentChannel:
              type: string
            applicationOriginatorChannel:
              type: string
            applicationReferralChannel:
              type: string
            inArrears:
              type: boolean
            arrears:
              $ref: '#/components/schemas/Arrears'
            balance:
              type: number
            contractMaturityDate:
              type: string
              format: date-time
            feePeriod:
              type: string
            interestRate:
              type: number
            interestRateType:
              type: string
            lastFeeCharge:
              type: number
            loanAmount:
              type: number
            mainAccount:
              type: boolean
            nextRepaymentDate:
              type: string
              format: date-time
            nickName:
              type: string
            partyStatus:
              type: string
            primaryApplicantOrHolder:
              type: string
            category:
              type: string
            productParty:
              type: array
              items:
                type: string
            purpose:
              type: string
            remainingBalance:
              type: number
            repaymentFrequency:
              type: string
            termMonths:
              type: integer
              format: int32
            topUpInd:
              type: boolean
            firstTimeBuyer:
              type: boolean
            smeInDifficultyInd:
              type: boolean
            valueTransPermittedInd:
              type: boolean
            productReportingCode:
              type: string
            signatureAuthorisationCode:
              type: string
            activeStandingOrder:
              type: boolean
            stageBusinessArea:
              type: string
            LTV:
              type: number
    Order:
      required:
        - currencyCode
        - orderedAt
        - price
      type: object
      properties:
        href:
          type: string
        ref:
          type: string
        createdAt:
          type: string
          format: date-time
        modifiedAt:
          type: string
          format: date-time
        orderedAt:
          type: string
          format: date-time
        currencyCode:
          type: string
        price:
          minimum: 0
          type: number
        referenceId:
          type: string
        paymentType:
          type: string
        cardType:
          type: string
        orderType:
          type: string
        pointOfSale:
          type: string
        channel:
          type: string
        status:
          type: string
          enum:
            - BROWSED
            - CANCELLED
            - CONFIRMED
            - DECLINED
            - PARTIALY_CONFIRMED
            - PARTIALY_REFUNDED
            - PAYMENT_PENDING
            - PENDING
            - PURCHASED
            - REFUNDED
            - RESERVED
            - SEARCHED
            - UNKNOWN
        contacts:
          $ref: '#/components/schemas/CollectionResourceOrderContact'
        consumers:
          $ref: '#/components/schemas/CollectionResourceOrderConsumer'
        orderItems:
          $ref: '#/components/schemas/CollectionResourceOrderItem'
        dataExtensions:
          $ref: '#/components/schemas/CollectionResourceDataExtension'
        items:
          $ref: '#/components/schemas/CollectionResourceOrderItem'
    OrderConsumer:
      type: object
      properties:
        href:
          type: string
          description: The link to the order contact.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderContacts/3b5cb55e-c616-424a-991c-a241d0024896
        ref:
          type: string
          description: The order contact reference.
          example: 3b5cb55e-c616-424a-991c-a241d0024896
        order:
          $ref: '#/components/schemas/order'
        title:
          type: string
          description: |
            The title of the person.

             Example values: "Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr", "Elder", "Fr", "General", "Hon", "Judge", "Lord", "Master", "Miss", "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha", "Sheikh", "Sir", "Sister", "Sr"
          format: title case
          example: Mr
        firstName:
          type: string
          description: The person's first name.
          format: title case
          example: John
        lastName:
          type: string
          description: The person's last name.
          format: title case recommended
          example: Doe
        gender:
          type: string
          description: |
            The person's gender.

            Example values:"male", "female", "unknown"
          format: lowercase
          example: male
        dateOfBirth:
          type: string
          description: |
            The person's date of birth. Validation: Date must be in the past.
          format: date-time
          example: '1991-01-01T16:17:16Z'
        emails:
          maxItems: 1
          minItems: 0
          type: array
          description: |
            All the email addresses of the person.
          example:
            - john.doe@gmail.com
          items:
            type: string
            description: |
              All the email addresses of the person.
            example: '["john.doe@gmail.com"]'
        phoneNumbers:
          type: array
          description: |
            The phone numbers of the person.
          example:
            - '+353161123345'
            - '+353161123346'
          items:
            type: string
            description: |
              The phone numbers of the person.
            example: '["+353161123345","+353161123346"]'
        nationality:
          type: string
          description: |
            The person's nationality.

             Example values: "Irish", "British", "Spanish", "French"
          format: title case
          example: Irish
        passportNumber:
          type: string
          description: |
            The passport number of the guest.
          format: uppercase
          example: PZ4A9565
        guest:
          $ref: '#/components/schemas/guest'
        country:
          type: string
          description: |-
            The guest's country.

             Example values: "IE", "GB", "ES", "FR"
          format: 2-letter ISO 3166-1 Alpha-2 country code
          example: IE
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        passportExpiry:
          type: string
          format: date-time
        createdAt:
          type: string
          description: |
            The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: |
            The date and time when the resource was updated in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        orderItems:
          $ref: '#/components/schemas/CollectionResourceEntity'
        consumerTypeCode:
          type: string
          description: |
            The consumer type.
          format: String
          example: traveller
    OrderContact:
      type: object
      properties:
        href:
          type: string
          description: The link to the order contact.
          example: >-
            https://api-engage-eu.sitecorecloud.io/v2.1/orderContacts/3b5cb55e-c616-424a-991c-a241d0024896
        ref:
          type: string
          description: The order contact reference.
          example: 3b5cb55e-c616-424a-991c-a241d0024896
        order:
          $ref: '#/components/schemas/order'
        title:
          type: string
          description: |
            The title of the person.

             Example values: "Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr", "Elder", "Fr", "General", "Hon", "Judge", "Lord", "Master", "Miss", "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha", "Sheikh", "Sir", "Sister", "Sr"
          format: title case
          example: Mr
        firstName:
          type: string
          description: The person's first name.
          format: title case
          example: John
        lastName:
          type: string
          description: The person's last name.
          format: title case recommended
          example: Doe
        gender:
          type: string
          description: |
            The person's gender.

            Example values:"male", "female", "unknown"
          format: lowercase
          example: male
        dateOfBirth:
          type: string
          description: |
            The person's date of birth. Validation: Date must be in the past.
          format: date-time
          example: '1991-01-01T16:17:16Z'
        emails:
          maxItems: 1
          minItems: 0
          type: array
          description: |
            All the email addresses of the person.
          example:
            - john.doe@gmail.com
          items:
            type: string
            description: |
              All the email addresses of the person.
            example: '["john.doe@gmail.com"]'
        phoneNumbers:
          type: array
          description: |
            The phone numbers of the person.
          example:
            - '+353161123345'
            - '+353161123346'
          items:
            type: string
            description: |
              The phone numbers of the person.
            example: '["+353161123345","+353161123346"]'
        nationality:
          type: string
          description: |
            The person's nationality.

             Example values: "Irish", "British", "Spanish", "French"
          format: title case
          example: Irish
        passportNumber:
          type: string
          description: |
            The passport number of the guest.
          format: uppercase
          example: PZ4A9565
        guest:
          $ref: '#/components/schemas/guest'
        country:
          type: string
          description: |-
            The guest's country.

             Example values: "IE", "GB", "ES", "FR"
          format: 2-letter ISO 3166-1 Alpha-2 country code
          example: IE
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        passportExpiry:
          type: string
          format: date-time
        createdAt:
          type: string
          description: |
            The date and time when the resource was created in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        modifiedAt:
          type: string
          description: |
            The date and time when the resource was updated in Sitecore CDP.
          format: date-time
          example: '2024-01-01T16:17:16Z'
        street:
          type: array
          description: The order contact's street address.
          example:
            - Tara St.
            - Main Ave.
          items:
            type: string
        city:
          type: string
          description: The order contact's city.
          format: String
          example: Dublin
        state:
          type: string
          description: The order contact's post code.
          format: String
          example: '10001'
    PersonalLoanOrderItem:
      required:
        - currencyCode
        - price
        - status
        - type
      type: object
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          properties:
            applicationStatus:
              type: string
            applicationStatusDate:
              type: string
              format: date-time
            drawdownStatus:
              type: string
            drawdownStatusDate:
              type: string
              format: date-time
            openStatus:
              type: string
            openDate:
              type: string
              format: date-time
            applicationID:
              type: string
            applicationPreferredFulfilmentChannel:
              type: string
            applicationOriginatorChannel:
              type: string
            applicationReferralChannel:
              type: string
            inArrears:
              type: boolean
            arrears:
              $ref: '#/components/schemas/Arrears'
            balance:
              type: number
            contractMaturityDate:
              type: string
              format: date-time
            feePeriod:
              type: string
            interestRate:
              type: number
            interestRateType:
              type: string
            lastFeeCharge:
              type: number
            loanAmount:
              type: number
            mainAccount:
              type: boolean
            nextRepaymentDate:
              type: string
              format: date-time
            nickName:
              type: string
            partyStatus:
              type: string
            primaryApplicantOrHolder:
              type: string
            category:
              type: string
            productParty:
              type: array
              items:
                type: string
            purpose:
              type: string
            remainingBalance:
              type: number
            repaymentFrequency:
              type: string
            termMonths:
              type: integer
              format: int32
            topUpInd:
              type: boolean
            firstTimeBuyer:
              type: boolean
            smeInDifficultyInd:
              type: boolean
            valueTransPermittedInd:
              type: boolean
            productReportingCode:
              type: string
            signatureAuthorisationCode:
              type: string
            activeStandingOrder:
              type: boolean
            stageBusinessArea:
              type: string
            LTV:
              type: number
    RailOrderItem:
      required:
        - currencyCode
        - price
        - status
        - type
      type: object
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          properties:
            journeyType:
              type: string
            segments:
              type: array
              items:
                $ref: '#/components/schemas/TripSegment'
    TripSegment:
      required:
        - arrivalDateTime
        - departureDateTime
      type: object
      properties:
        origin:
          type: string
        destination:
          type: string
        originName:
          type: string
        destinationName:
          type: string
        originDestination:
          type: string
        departureDateTime:
          type: string
        arrivalDateTime:
          type: string
        carrier:
          type: string
        carrierName:
          type: string
        carrierNumber:
          type: string
        fareClass:
          type: string
        fareFamily:
          type: string
        equipmentType:
          pattern: ^[^\s].*$
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-logo:
  altText: Order REST API
  url: https://content-search-api-doc.rfksrv.com/logo.png
