# Create an order consumer

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.

Endpoint: POST /v2.1/orders/{orderRef}/consumers
Version: v2.1
Security: BasicAuth

## Security:

  - `BasicAuth` (unknown)
    http basic

## Path parameters:

  - `orderRef` (string, required)

## Request fields (application/json):

  - `title` (string)
    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"
    Example: Mr

  - `firstName` (string)
    The person's first name.
    Example: John

  - `lastName` (string)
    The person's last name.
    Example: Doe

  - `gender` (string)
    The person's gender.

Example values: "male", "female", "unknown"
    Enum: "male", "female", "unknown"

  - `dateOfBirth` (string)
    The person's date of birth. Validation: Date must be in the past.
    Example: 1991-01-01T16:17:16Z

  - `emails` (array)
    All the email addresses of the person.
    Example: ["john.doe@gmail.com"]

  - `phoneNumbers` (array)
    The phone numbers of the person.
    Example: ["+353161123345","+353161123346"]

  - `nationality` (string)
    The person's nationality.

Example values: "Irish", "British", "Spanish", "French"
    Example: Irish

  - `passportNumber` (string)
    The passport number of the guest.
    Example: PZ4A9565

  - `country` (string)
    The guest's country.

Example values: "IE", "GB", "ES", "FR"
    Example: IE

  - `identifiers` (array)
    The guest's identifiers.

  - `identifiers.provider` (string)
    The identifier provider.
    Example: ProfileSystem

  - `identifiers.id` (string)
    The identifier ID.
    Example: B7524AE6-CF1C-440F-B1A2-0C9D42F5CB41

## Response 200:

  - `200` (unknown)
    Resource successfully created

## Response 200 fields (application/json):

  - `ref` (string)
    The order consumer reference.
    Example: 2d7de9df-45a2-45ea-872c-30e45139007d

  - `href` (string)
    The link to the order consumer.
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orderConsumers/2d7de9df-45a2-45ea-872c-30e45139007d

  - `title` (string)
    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"
    Example: Mr

  - `firstName` (string)
    The person's first name.
    Example: John

  - `lastName` (string)
    The person's last name.
    Example: Doe

  - `gender` (string)
    The person's gender.

Example values: "male", "female", "unknown"
    Enum: "male", "female", "unknown"

  - `dateOfBirth` (string)
    The person's date of birth. Validation: Date must be in the past.
    Example: 1991-01-01T16:17:16Z

  - `emails` (array)
    All the email addresses of the person.
    Example: ["john.doe@gmail.com"]

  - `phoneNumbers` (array)
    The phone numbers of the person.
    Example: ["+353161123345","+353161123346"]

  - `nationality` (string)
    The person's nationality.

Example values: "Irish", "British", "Spanish", "French"
    Example: Irish

  - `passportNumber` (string)
    The passport number of the guest.
    Example: PZ4A9565

  - `country` (string)
    The guest's country.

Example values: "IE", "GB", "ES", "FR"
    Example: IE

  - `orderItems` (object)
    Order item details, containing a list of items.

  - `orderItems.orderItems` (array)

  - `orderItems.orderItems.href` (string)
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/111d106a-feff-42b2-90fb-a6ed136ec333

  - `order` (object)
    The link to the order.

  - `order.href` (string)
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10

  - `guest` (object)
    The link to the guest.

  - `guest.href` (string)
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03

## Response 401:

  - `401` (unknown)
    Unauthorized request

## Response 401 fields (application/json):

  - `status` (string)
    The HTTP request status.
    Example: UNAUTHORIZED

  - `code` (integer)
    The HTTP response status code.
    Example: 401

  - `message` (string)
    Error description.
    Example: Authentication credentials are required to access the resource. All requests must be authenticated.

  - `moreInfoUrl` (string)
    URL to get more information about the error.
    Example: https://support.sitecore.com

