Create an order

After a cart has been filled with products and customer data, you can create an order with the following request:

Copy
Copied
curl -X POST '{baseUrl}/orders' \
-H 'X-Musement-Application: {applicationValue}' \
-H 'X-Musement-Version: 3.4.0' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json' \
--data-raw '{
	"cart_uuid": "{cartUuid}",
	"email_notification": "NONE"
}'

A successful request returns a new order:

Copy
Copied
{
	"identifier": "MUS0738876",
	"uuid": "8bd6f4a4-ece7-4cf6-a1c4-2455b6f5f514",
	"date": "2018-08-17T15:59:43+0000",
	"status": "PENDING",
	"trustpilot_url": "https://us.trustpilot.com/evaluate/embed/www.musement.com?a=MUS0738876&b=Zm9vQHN0YXlvbG9neS5jb20=&c=Test+3.3.0+One+&e=bac16bfbee8271a62fa90988dd70065a0af93164&stars=5",
	"customer": {
		"email": "example@musement.com",
		"firstname": "John",
		"lastname": "Smith"
	},
	"items": [
		{
			"uuid": "8b742505-38c7-4bed-9bf5-468a3e7cc731",
			"transaction_code": "19c8af5f-2a1c-487d-be27-cfdc20c03c83",
			"product": {
				"type": "musement",
				"max_confirmation_time": "P0D",
				"price_tag": {
					"price_feature": "Tour",
					"ticket_holder": "Adult",
					"price_feature_code": "tour",
					"ticket_holder_code": "adult"
				},
				"date": "2018-09-01 15:30",
				"id": "434696106",
				"title": "Exclusive skip-the-line guided visit of Leonardo da Vinci's vineyard",
				"api_url": "https://sandbox.musement.com/api/v3/activities/11eeb25c-2046-11e7-9cc9-06a7e332783f",
				"url": "https://sandbox.musement.com/us/milan/exclusive-skip-the-line-guided-visit-of-leonardo-da-vinci-s-vineyard-3936/",
				"cover_image_url": "https://images.musement.com/cover/0002/50/thumb_149030_cover_header.jpeg",
				"original_retail_price": {
					"currency": "USD",
					"value": 21,
					"formatted_value": "$ 21.00"
				},
				"retail_price": {
					"currency": "USD",
					"value": 21,
					"formatted_value": "$ 21.00"
				},
				"discount_amount": {
					"currency": "USD",
					"value": 0,
					"formatted_value": "$ 0.00"
				},
				"service_fee": {
					"currency": "USD",
					"value": 0,
					"formatted_value": "$ 0.00"
				}
			},
			"quantity": 2,
			"status": "PENDING",
			"vouchers": []
		}
	],
[...]
}
For subsequent requests in the API involving the order, use its uuid property. The same property can also be used when contacting us about questions or issues, but you are also free to use the more human-friendly identifier property.
Pay for the order

We strongly recommend creating orders only when payment is guaranteed. This reduces the number of unnecessary API calls. Additionally, creating too many unpaid orders can lead to misleading sales reports for the Strategic partnerships team.

Abandoned carts

Carts without an order are automatically removed after three months.

Email notifications

Note the email_notification property in the example request above. This property affects email notifications which are sent to the lead booker and activity providers. It accepts the following values:
  • ALL: Emails are sent to both the lead booker and the activity providers.
  • NONE: No emails are sent.
  • TO-CUSTOMER: Emails are sent to the lead booker only.

Partners who opt to send no email notifications assume responsibility of managing all communication with their customers regarding the order. This includes issuing vouchers and communicating status changes.

In the sandbox environment, this property has no effect. For more information, refer to the test purchases guide.

Extra data

When creating an order, partners can add the extra_data property to the request body to include additional information which might be relevant for their own booking systems. The exact values to save are the partner's choice. However, be aware that this property only accepts a serialized JSON object with key-value pairs:
Copy
Copied
curl -X POST '{baseUrl}/orders' \
-H 'X-Musement-Application: {applicationValue}' \
-H 'X-Musement-Version: 3.4.0' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json' \
--data-raw '{
	"cart_uuid": "{cartUuid}",
	"email_notification": "NONE",
	"extra_data": "{\"clientReferenceId\":\"12345678\",\"firstName\":\"John\",\"lastName\":\"Smith\",\"reservationId\":\"3E5B7445-00E6-4ED6-9321-19E30D73A128\",\"utm_campaign\":\"example-it\",\"utm_content\":\"it-native\",\"utm_medium\":\"example-App it\",\"utm_source\":\"channel-abc\"}"
}'
In the example request above, the partner is saving the following object to extra_data:
Copy
Copied
{
	"clientReferenceId": "12345678",
	"firstName": "John",
	"lastName": "Smith",
	"reservationId": "3E5B7445-00E6-4ED6-9321-19E30D73A128",
	"utm_campaign": "example-it",
	"utm_content": "it-native",
	"utm_medium": "example-App it",
	"utm_source": "channel-abc"
}
Copyright © TUI Musement. All rights reserved.