Skip to content
Last updated

Extra customer data

Some activities in the Musement catalog require extra customer data, additional mandatory information that the cart customer (aka lead booker) needs to provide.

While each activity provides a preview of extra customer data at /activities/{'{'}activityUuid}/extra-customer-data/schema, the requested info may change for cart items. The definitive extra customer data appears in the same endpoint used for getting lead booker information:

curl -X GET '{baseUrl}/carts/{cartUuid}/customer/schema' \
-H 'X-Musement-Application: {applicationValue}' \
-H 'X-Musement-Version: 3.4.0' \
-H 'Authorization: Bearer {accessToken}'

Activities with extra customer data will appear in a dedicated extra_customer_data property in the response:

[...]
{
	"title": "cart_customer_guest",
	"type": "object",
	"properties": {
		[...]
		"extra_customer_data": {
			"title": "extra_customer_data",
			"type": "object",
			"properties": {
				"1714c6a7-2046-11e7-9cc9-06a7e332783f": {
					"title": "1714c6a7-2046-11e7-9cc9-06a7e332783f",
					"type": "object",
					"properties": {
						"phone_number": {
							"type": "number",
							"title": "Phone number",
							"propertyOrder": 1
						}
					},
					"required": [
						"phone_number"
					],
					"propertyOrder": 1
				}
			},
			"required": [
				"1714c6a7-2046-11e7-9cc9-06a7e332783f"
			],
			"propertyOrder": 12
		}
	},
	"required": [
		"firstname",
		"lastname",
		"email",
		"musement_newsletter",
		"allow_profiling",
		"thirdparty_newsletter",
		"events_related_newsletter",
		"extra_customer_data"
	]
}

The extra_customer_data property follows the same JSON schema as the rest of the response and may request multiple details.

The extra customer data can be submitted to the cart via the /carts/{'{'}cartUuid}/customer endpoint, either together with the lead booker information or separately:

curl -X PUT '{baseUrl}/carts/{cartUuid}/customer' \
-H 'X-Musement-Application: {applicationValue}' \
-H 'X-Musement-Version: 3.4.0' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json' \
--data-raw '{
	"extra_customer_data": {
		"1714c6a7-2046-11e7-9cc9-06a7e332783f": {
			"phone_number": "1234567890"
		}
	}
}'

When multiple activities in the cart require extra customer data, follow the lead booker JSON schema and include data for all the relevant activities in the request:

curl -X PUT '{baseUrl}/carts/{cartUuid}/customer' \
-H 'X-Musement-Application: {applicationValue}' \
-H 'X-Musement-Version: 3.4.0' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json' \
--data-raw '{
	"extra_customer_data": {
		"1714c6a7-2046-11e7-9cc9-06a7e332783f": {
			"phone_number": "1234567890"
		},
		"165fcd4d-2046-11e7-9cc9-06a7e332783f": {
			"go_kart_color": "red"
		}
	}
}'