Orders

Prerequisites

Get Order

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}",
        "allowOrderEdit": "{true | false}",
        "allowUpdate": "{true | false}",
        "alwaysAvailable": "{true | false}",
        "externalId": "{externalId | null}",
        "name": "{orderName}",
        "nextOrderStatus": {
            "id": "{id}",
            "allowOrderEdit": "{true | false}",
            "allowUpdate": "{true | false}",
            "alwaysAvailable": "{true | false}",
            "externalId": "{externalId | null}",
            "name": "{orderName}",
            "nextOrderStatus": {
                "id": "{id}",
                "allowOrderEdit": "{true | false}",
                "allowUpdate": "{true | false}",
                "alwaysAvailable": "{true | false}",
                "externalId": "{externalId | null}",
                "name": "{orderName}",
                "nextOrderStatus": {
                    "id": "{id}",
                    "allowOrderEdit": "{true | false}",
                    "allowUpdate": "{true | false}",
                    "alwaysAvailable": "{true | false}",
                    "externalId": "{externalId | null}",
                    "name": "{orderName}",
                    "nextOrderStatus": "{nextOrderStatus | null}",
                    "pipeline": "{pipeline | null}",
                    "renderInMenu": "{true | false}",
                    "renderChildren": "{true | false}",
                    "sort": "{sortNumber}"
                },
                "pipeline": "{pipeline | null}",
                "renderInMenu": "{true | false}",
                "renderChildren": "{true | false}",
                "sort": "{sortNumber}"
            },
            "pipeline": "{pipeline | null}",
            "renderInMenu": "{true | false}",
            "renderChildren": "{true | false}",
            "sort": "{sortNumber}"
        },
        "pipeline": "{pipeline | null}",
        "renderInMenu": "{true | false}",
        "renderChildren": "{true | false}",
        "sort": "{sortNumber}"
    },
    "createdDate": "{createdDate}",
    "completedDate": "{completedDate}",
    "cultureCode": "{cultureCode}",
    "discount": "{discountAmount}",
    "discountTotal": "{discountTotalAmount}",
    "note": "{note | null}",
    "orderTotal": "{orderTotalAmount}",
    "paymentTotal": "{paymentTotalAmount}",
    "shippingTotal": "{shippingTotalAmount}",
    "subTotal": "{subTotalAmount}",
    "tax": "{taxAmount}",
    "billingAddress": {
        "addressName": "{addressName}",
        "attention": "{attention}",
        "city": "{city}",
        "companyName": "{companyName}",
        "country": {
            "cultureCode": "{cultureCode}",
            "id": "{countryId}",
            "name": "{countryName}"
        },
        "emailAddress": "{email}",
        "firstName": "{firstName}",
        "id": "{id}",
        "lastName": "{lastName}",
        "line1": "{addressLine1}",
        "line2": "{addressLine2}",
        "mobilePhoneNumber": "{mobilePhoneNumber}",
        "phoneNumber": "{phoneNumber}",
        "postalCode": "{postalCode}",
        "state": "{state}"
    },
    "billingCurrency": {
        "id": "{id}",
        "isoCode": "{isoCode}",
        "exchangeRate": "{exchangeRate}"
    },
    "customer": {
        "id": "{id}",
        "firstName": "{firstName}",
        "lastName": "{lastName}",
        "emailAddress": "{emailAddress}",
        "phoneNumber": "{phoneNumber}"
    },
    "store": {
        "id": "{id}",
        "name": "{name}",
        "description": "{description}"
    },
    "discounts": [],
    "orderLines": [
        {
            "id": "{id}",
            "sku": "{sku}",
            "productName": "{productName}",
            "price": "{priceAmount}",
            "quantity": "{quantityNumber}",
            "discount": "{discountAmount}",
            "tax": "{taxAmount}",
            "total": "{totalAmount}",
            "taxRate": "{taxRate}",
            "variantSku": "{variantSku}",
            "unitDiscount": "{unitDiscount}",
            "discounts": "{[discount1, discount2]}"
        }
    ],
    "shipments": [
        {
            "id": "{id}",
            "shipmentDiscount": "{shipmentDiscount}",
            "shipmentName": "{shipmentName}",
            "shipmentPrice": "{shipmentPrice}",
            "tax": "{tax}",
            "shipmentPriceTotal": "{shipmentPriceTotal}",
            "taxRate": "{taxRate}",
            "trackAndTrace": "{trackAndTrace}",
            "deliveryNote": "deliveryNote",
            "shipmentAddress": {
                "addressName": "{addressName}",
                "attention": "{attention}",
                "city": "{city}",
                "companyName": "{companyName}",
                "country": {
                    "cultureCode": "{cultureCode}",
                    "id": "{id}",
                    "name": "{counteryName}"
                },
                "emailAddress": "{email}",
                "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}",
                "eligiblePaymentMethods": [
                    {
                        "displayName": "{displayName}",
                        "feePercent": "{feePercent}",
                        "fees": [
                            {
                                "amount": "{amount}",
                                "priceGroupId": "{priceGroupId}"
                            }
                        ],
                        "id": "{id}",
                        "imageUrl": "{imageUrl}",
                        "name": "{paymentName}"
                    }
                ]
            },
            "orderLines": [
                {
                    "id": "{id}",
                    "sku": "{sku}",
                    "productName": "{productName}",
                    "price": "{price}",
                    "quantity": "{quantity}",
                    "discount": "{discount}",
                    "tax": "{tax}",
                    "total": "{total}",
                    "taxRate": "{taxRate}",
                    "variantSku": "{variantSku}",
                    "unitDiscount": "{unitDiscount}",
                    "discounts": "{[discount1, discount2]}"
                }
            ]
        }
    ],
    "orderAddresses": [
        {
            "addressName": "{addressName}",
            "attention": "{attention}",
            "city": "{city}",
            "companyName": "{companyName}",
            "country": {
                "cultureCode": "{cultureCode}",
                "id": "{id}",
                "name": "{counteryName}"
            },
            "emailAddress": "{email}",
            "firstName": "{firstName}",
            "id": "{id}",
            "lastName": "{lastName}",
            "line1": "{line1}",
            "line2": "{line2}",
            "mobilePhoneNumber": "{mobilePhoneNumber}",
            "phoneNumber": "{phoneNumber}",
            "postalCode": "{postalCode}",
            "state": "{state}"
        },
        {
            "addressName": "{addressName}",
            "attention": "{attention}",
            "city": "{city}",
            "companyName": "{companyName}",
            "country": {
                "cultureCode": "{cultureCode}",
                "id": "{id}",
                "name": "{countryId}"
            },
            "emailAddress": "{email}",
            "firstName": "{firstName}",
            "id": "id",
            "lastName": "{lastName}",
            "line1": "{line1}",
            "line2": "{line2}",
            "mobilePhoneNumber": "{mobilePhoneNumber}",
            "phoneNumber": "{phoneNumber}",
            "postalCode": "{postalCode}",
            "state": "{state}"
        }
    ]
}

Error Handling

Error Response Example

{
"errors": [
        {
            "error-description": "Order with the supplied id orderId was not found",
            "error": "NotFound"
        }
    ]
}

Last updated