Create an order consumer

Request

Creates a consumer on an order. In identifiers, make sure to provide enough identity information according to your organization's identity rules.

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.

Security
BasicAuth
Path
orderRefstringrequired

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
Bodyapplication/json
titlestring, (title case)

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"
firstNamestring, (title case)

The person's first name.

Example:"John"
lastNamestring, (title case recommended)

The person's last name.

Example:"Doe"
genderstring, (lowercase)

The person's gender.

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

Enum:"male""female""unknown"
Example:"male"
dateOfBirthstring, (date-time)

The person's date of birth. Validation: Date must be in the past.

Example:"1991-01-01T16:17:16Z"
emailsArray of strings

All the email addresses of the person.

Example:
[ "john.doe@gmail.com" ]
phoneNumbersArray of strings

The phone numbers of the person.

Example:
[ "+353161123345", "+353161123346" ]
nationalitystring, (title case)

The person's nationality.

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

Example:"Irish"
passportNumberstring, (uppercase)

The passport number of the guest.

Example:"PZ4A9565"
countrystring, (2-letter ISO 3166-1 Alpha-2 country code)

The guest's country.

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

Example:"IE"
identifiersArray of objects(Identifier)

The guest's identifiers.

curl -i -X POST \
  -u '<username>:<password>' \
  https://api-engage-ap.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d/consumers \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Mr",
    "firstName": "John",
    "lastName": "Doe",
    "gender": "male",
    "dateOfBirth": "1991-01-01T16:17:16Z",
    "emails": [
      "john.doe@gmail.com"
    ],
    "phoneNumbers": [
      "+353161123345",
      "+353161123346"
    ],
    "nationality": "Irish",
    "passportNumber": "PZ4A9565",
    "country": "IE",
    "identifiers": [
      {
        "provider": "ProfileSystem",
        "id": "B7524AE6-CF1C-440F-B1A2-0C9D42F5CB41"
      }
    ]
  }'

Responses

Resource successfully created

Bodyapplication/json
refstring, (UUID)

The order consumer reference.

Example:"2d7de9df-45a2-45ea-872c-30e45139007d"
hrefstring

The link to the order consumer.

Example:"https://api-engage-eu.sitecorecloud.io/v2.1/orderConsumers/2d7de9df-45a2-45ea-872c-30e45139007d"
titlestring, (title case)

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"
firstNamestring, (title case)

The person's first name.

Example:"John"
lastNamestring, (title case recommended)

The person's last name.

Example:"Doe"
genderstring, (lowercase)

The person's gender.

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

Enum:"male""female""unknown"
Example:"male"
dateOfBirthstring, (date-time)

The person's date of birth. Validation: Date must be in the past.

Example:"1991-01-01T16:17:16Z"
emailsArray of strings

All the email addresses of the person.

Example:
[ "john.doe@gmail.com" ]
phoneNumbersArray of strings

The phone numbers of the person.

Example:
[ "+353161123345", "+353161123346" ]
nationalitystring, (title case)

The person's nationality.

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

Example:"Irish"
passportNumberstring, (uppercase)

The passport number of the guest.

Example:"PZ4A9565"
countrystring, (2-letter ISO 3166-1 Alpha-2 country code)

The guest's country.

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

Example:"IE"
orderItemsobject(OrderItemResponseObj)

Order item details, containing a list of items.

orderobject

The link to the order.

guestobject

The link to the guest.

Response
{ "ref": "2d7de9df-45a2-45ea-872c-30e45139007d", "href": "https://api-engage-eu.sitecorecloud.io/v2.1/orderConsumers/2d7de9df-45a2-45ea-872c-30e45139007d", "title": "Mr", "firstName": "John", "lastName": "Doe", "gender": "male", "dateOfBirth": "1991-01-01T16:17:16Z", "emails": [ "john.doe@gmail.com" ], "phoneNumbers": [ "+353161123345", "+353161123346" ], "nationality": "Irish", "passportNumber": "PZ4A9565", "country": "IE", "orderItems": { "orderItems": [ … ] }, "order": { "href": "https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10" }, "guest": { "href": "https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03" } }