Retrieve an order

The Retrieve an order operation retrieves the detailed information about a specific order.

This article explains how to use the Quickstart API to retrieve the detailed information about an order.

Sample use case

Your customers want to view the detailed information of their changes in an order (order_number=O-00021614), you can use the "Retrieve an order" operation to return the details.

Code examples

cURLJavaNode
Copy
Copied
curl --request GET \
     --url https://rest.apisandbox.zuora.com/v2/orders/O-00021614 \
     --header 'Authorization: Bearer 210901c2dd6c4c748a09e3a0fcaee12f' \
     --header 'Content-Type: application/json'
Copy
Copied
Order orderResponse = zuoraClient.orders().getOrder("O-00021614");
System.out.println(orderResponse.toString());
Copy
Copied
const getOrderResponse = await zuoraClient.orders.getOrder('O-00021614');
console.log(getOrderResponse);

Then you can get the following sample response:

Copy
Copied
{
	"id": "8ad09e20858682bc01859fd1633a1de3",
	"updated_by_id": "8ad09bce80507dab0180688bdabc20cb",
	"updated_time": "2023-01-10T23:52:58-08:00",
	"created_by_id": "8ad09bce80507dab0180688bdabc20cb",
	"created_time": "2023-01-10T23:52:57-08:00",
	"category": null,
	"description": "description of a new account",
	"order_date": "2023-01-01",
	"order_number": "O-00021630",
	"line_items": [],
	"subscriptions": [
		{
			"id": "8ad09e20858682bc01859fd164471dea",
			"updated_by_id": "8ad09bce80507dab0180688bdabc20cb",
			"updated_time": "2023-01-10T23:52:58-08:00",
			"created_by_id": "8ad09bce80507dab0180688bdabc20cb",
			"created_time": "2023-01-10T23:52:58-08:00",
			"subscription_number": "A-S00013655",
			"state": "active",
			"account_id": "8ad09b21858682bc01859f0a6de91594",
			"invoice_owner_account_id": "8ad09b21858682bc01859f0a6de91594",
			"auto_renew": false,
			"latest_version": true,
			"initial_term": {
				"type": "termed",
				"interval_count": 1,
				"interval": "year"
			},
			"current_term": {
				"type": "termed",
				"start_date": "2022-01-01",
				"end_date": "2023-01-01",
				"interval_count": 1,
				"interval": "year"
			},
			"renewal_term": {
				"type": "evergreen"
			},
			"start_date": "2022-01-01",
			"end_date": "2023-01-01",
			"description": "",
			"contract_effective": "2022-01-01",
			"service_activation": "2022-01-01",
			"customer_acceptance": "2022-01-01",
			"invoice_separately": false,
			"version": 1,
			"order_number": "O-00021630",
			"actions": [
				{
					"action_id": "8ad09e20858682bc01859fd1634e1de6",
					"type": "create",
					"sequence": 0,
					"start_on": {
						"contract_effective": "2022-01-01",
						"service_activation": "2022-01-01",
						"customer_acceptance": "2022-01-01"
					},
					"subscription_plans": [
						{
							"id": "8ad09e20858682bc01859fd164c01dff",
							"plan_id": "8ad09fc2843cc2fb01843f4504b761af",
							"unique_token": null,
							"subscription_items": [
								{
									"id": "8ad09e20858682bc01859fd164c01e08",
									"subscription_item_number": "C-00048963",
									"name": "Recurring Yearly Plan 2",
									"description": "Subscription under yearly plan",
									"charged_through_date": "2023-01-01",
									"recurring": {
										"on": "subscription_start_day",
										"alignment_behavior": "none",
										"interval": "year",
										"interval_count": 1,
										"timing": "in_advance",
										"usage": false,
										"duration_interval": "year",
										"duration_interval_count": 1,
										"recurring_on": "subscription_start_day"
									},
									"price_id": "8ad09bce8455cd0c01845e8d3c152199",
									"start_event": "contract_effective",
									"tax_inclusive": false,
									"unit_of_measure": "License",
									"quantity": 1,
									"price_base_interval": "billing_period",
									"created_time": "2023-01-10T23:52:58-08:00",
									"charge_model": "per_unit",
									"charge_type": "recurring",
									"created_by_id": "8ad09bce80507dab0180688bdabc20cb",
									"updated_by_id": "8ad09bce80507dab0180688bdabc20cb",
									"updated_time": "2023-01-10T23:52:58-08:00",
									"subscription_plan_id": "8ad09e20858682bc01859fd164c01dff",
									"start_date": "2022-01-01",
									"end_date": "2023-01-01",
									"processed_through_date": "2022-01-01",
									"active": false,
									"state": "active",
									"unit_amount": 0
								},
								{
									"id": "8ad09e20858682bc01859fd164c01e07",
									"subscription_item_number": "C-00048961",
									"name": "Recurring Yearly Plan 2",
									"description": "Subscription under yearly plan",
									"charged_through_date": "2023-01-01",
									"recurring": {
										"on": "subscription_start_day",
										"alignment_behavior": "none",
										"interval": "year",
										"interval_count": 1,
										"timing": "in_advance",
										"usage": false,
										"duration_interval": "year",
										"duration_interval_count": 1,
										"recurring_on": "subscription_start_day"
									},
									"price_id": "8ad08e0184ade9350184af5bf1f46007",
									"start_event": "contract_effective",
									"tax_inclusive": false,
									"unit_of_measure": "License",
									"quantity": 1,
									"price_base_interval": "billing_period",
									"created_time": "2023-01-10T23:52:58-08:00",
									"charge_model": "per_unit",
									"charge_type": "recurring",
									"created_by_id": "8ad09bce80507dab0180688bdabc20cb",
									"updated_by_id": "8ad09bce80507dab0180688bdabc20cb",
									"updated_time": "2023-01-10T23:52:58-08:00",
									"subscription_plan_id": "8ad09e20858682bc01859fd164c01dff",
									"custom_fields": {
										"Price__c": "0"
									},
									"start_date": "2022-01-01",
									"end_date": "2023-01-01",
									"processed_through_date": "2022-01-01",
									"active": false,
									"state": "active",
									"unit_amount": 150
								}
                            ]
						}
					]
				}
			]
		}
	]
}