Download vouchers

The term voucher is used to describe the documents that customers receive for their booking. The type of document varies. It could be a reminder of when and where a booking takes place. There may be additional instructions to follow for exchanging the voucher for attraction tickets. The documents could be tickets themselves, suitable for entering an attraction directly without any additional steps.

Once an order has been successfully paid, vouchers for each order item start to become available for download. A voucher for an order item is only available when a URL is present in its vouchers property. Depending on the activity, this property may take longer to change. For more information on order item statuses, check out the dedicated page.

You can get the voucher download URLs from the order:

Copy
Copied
curl -X GET '{baseUrl}/orders/{orderUuid}' \
-H 'X-Musement-Application: {applicationValue}' \
-H 'X-Musement-Version: 3.4.0' \
-H 'Authorization: Bearer {accessToken}'

The endpoint returns information about the order and its order items:

Copy
Copied
{
	[...]
	"uuid": "bf464161-f03a-449e-ac82-566721c0e6b4",
	[..]
	"status": "PENDING",
	[...]
	"items": [
		{
			"product": {
				[...]
				"max_confirmation_time": "PT30M",
				[...]
			},
			"status": "PENDING",
			"vouchers": []
		},
		{
			"product": {
				[...]
				"max_confirmation_time": "P0D",
				[...]
			},
			"status": "OK",
			"vouchers": [
				{
					"url": "https://sandbox.musement.com/voucher/view/286462ss-ba5d-496f-9149-9d846e70ba87?pdf=1"
				}
			]
		}
	],
	[...]
}
In the example above, there are two order items. The first one has an empty array in the vouchers property and its status is still PENDING. The item belongs to a needs confirmation activity and has not been confirmed yet. Looking at the product's max_confirmation_time property, we can expect confirmation within 30 minutes, at which point the order item should contain a voucher URL:
Copy
Copied
{
	"product": {
		[...]
		"max_confirmation_time": "PT30M",
		[..]
	},
	"status": "OK",
	"vouchers": [
		{
			"url": "https://sandbox.musement.com/voucher/view/92utr92-ba5d-496f-9149-9d846e70ba87?pdf=1"
		}
	]
}
The second order item is ready, with a URL in its vouchers property.

Each voucher URL will provide the appropriate voucher for the order item, ready for customer use.

If the order was set up to send email notifications, the lead booker will receive a confirmation email when every order item status changes to OK. However, this property has no effect in the sandbox environment. For more information, refer to the test purchases page.
Copyright © TUI Musement. All rights reserved.