Orders
Prerequisites
access_tokenfrom Headless API AuthenticationorderIdorpaymentGuid
Get Order by Order ID
Request
curl -D- -X GET <base_url>/api/v1/orders/<orderId> \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json' \Response
{
"id": "{id}",
"orderNumber": "{orderNumber}",
"orderStatus": {
"id": "{id}",
"name": "{orderStatusName}"
},
"createdDate": "{createdDate}",
"completedDate": "{completedDate}",
"cultureCode": "{cultureCode}",
"discount": "{discountAmount | null}",
"discountTotal": "{discountTotalAmount | null}",
"note": "{note | null}",
"orderTotal": "{orderTotalAmount}",
"paymentTotal": "{paymentTotalAmount}",
"shippingTotal": "{shippingTotalAmount}",
"subTotal": "{subTotalAmount}",
"tax": "{taxAmount}",
"vat": "{vatAmount}",
"store": {
"id": "{storeId}",
"name": "{storeName}",
"description": "{storeDescription}"
},
"billingAddress": {
"addressName": "{addressName}",
"attention": "{attention}",
"city": "{city}",
"companyName": "{companyName}",
"country": {
"id": "{countryId}",
"name": "{countryName}"
},
"emailAddress": "{emailAddress}",
"firstName": "{firstName}",
"id": "{id}",
"lastName": "{lastName}",
"line1": "{line1}",
"line2": "{line2}",
"mobilePhoneNumber": "{mobilePhoneNumber}",
"phoneNumber": "{phoneNumber}",
"postalCode": "{postalCode}",
"state": "{state}"
},
"billingCurrency": {
"id": "{currencyId}",
"isoCode": "{isoCode}"
},
"customer": {
"id": "{id}",
"firstName": "{firstName}",
"lastName": "{lastName}",
"emailAddress": "{emailAddress}",
"phoneNumber": "{phoneNumber}"
},
"customProperties": [],
"orderProperties": [],
"discounts": [],
"orderLines": [
{
"id": "{id}",
"sku": "{sku}",
"productName": "{productName}",
"price": "{priceAmount}",
"quantity": "{quantityNumber}",
"discount": "{discountAmount}",
"tax": "{taxAmount}",
"total": "{totalAmount}",
"taxRate": "{taxRate}",
"variantSku": "{variantSku | null}",
"unitDiscount": "{unitDiscount | null}",
"discounts": [],
"orderLineProperties": []
}
],
"payments": [
{
"id": "{id}",
"amount": "{amount}",
"fee": "{fee}",
"feePercentage": "{feePercentage}",
"feeTotal": "{feeTotal}",
"grossAmount": "{grossAmount | null}",
"transactionId": "{transactionId}",
"tax": "{tax | null}",
"taxRate": "{taxRate | null}",
"paymentMethod": {
"id": "{id}",
"name": "{paymentMethodName}",
"description": "{description}",
"displayName": "{displayName}",
"feePercent": "{feePercent}",
"fees": [
{
"amount": "{amount}",
"priceGroupId": "{priceGroupId}"
}
],
"imageId": "{imageId | null}",
"imageUrl": "{imageUrl | null}",
"paymentMethodProperties": []
}
}
],
"shipments": [
{
"id": "{id}",
"shipmentDiscount": "{shipmentDiscount | null}",
"shipmentName": "{shipmentName}",
"shipmentPrice": "{shipmentPrice}",
"shipmentPriceTotal": "{shipmentPriceTotal}",
"tax": "{taxAmount}",
"taxRate": "{taxRate}",
"vat": "{vatAmount}",
"vatRate": "{vatRate}",
"trackAndTrace": "{trackAndTrace | null}",
"deliveryNote": "{deliveryNote}",
"shipmentAddress": {
"addressName": "{addressName}",
"attention": "{attention}",
"city": "{city}",
"companyName": "{companyName}",
"country": {
"id": "{countryId}",
"name": "{countryName}"
},
"emailAddress": "{emailAddress}",
"firstName": "{firstName}",
"id": "{id}",
"lastName": "{lastName}",
"line1": "{line1}",
"line2": "{line2}",
"mobilePhoneNumber": "{mobilePhoneNumber}",
"phoneNumber": "{phoneNumber}",
"postalCode": "{postalCode}",
"state": "{state}"
},
"shippingMethod": {
"id": "{id}",
"name": "{name}",
"defaultPaymentMethod": "{defaultPaymentMethod | null}",
"eligiblePaymentMethods": []
},
"orderLines": [
{
"id": "{id}",
"sku": "{sku}",
"productName": "{productName}",
"price": "{priceAmount}",
"quantity": "{quantityNumber}",
"discount": "{discountAmount}",
"tax": "{taxAmount}",
"total": "{totalAmount}",
"taxRate": "{taxRate}",
"variantSku": "{variantSku | null}",
"unitDiscount": "{unitDiscount | null}",
"discounts": [],
"orderLineProperties": []
}
]
}
],
"additionalAddresses": "{additionalAddresses | null}"
}Error Handling
Error
Description
BadRequest (400)
Execution of the pipeline fails; AccessToken was not attached.
Unauthorized (401)
The token is expired.
Forbidden (403)
The token does not have access to this endpoint.
NotFound (404)
Order not found.
Error Response Example
Get Order by Payment Guid
Request
Response
Error Handling
Error
Description
BadRequest (400)
Execution of the pipeline fails or AccessToken was not attached.
Unauthorized (401)
The token is expired.
Forbidden (403)
The token does not have access to this endpoint.
NotFound (404)
Order or Payment not found.
Related Articles
Error HandlingLast updated
Was this helpful?