Skip to main content

Get Order

The GET endpoint retrieves details of an order specified by the orderId.

Endpoint

  • URL: /orders/{orderId}
  • Method: GET

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Path Parameters

ParameterTypeDescription
orderIdstringThe unique identifier of the order.

Request Headers

HeaderTypeDescription
accessTokenstringAccess token for authentication.

Request Body

  • None

Response

  • Status Code: 200 OK

Sample Response Body

{
"success": true,
"data": {
"entityId": "100",
"checkout": "664f2308d5775459152d6d2e",
"company": "664dec6cd5775459152d4922",
"customer": "664dec6cd5775459152d4926",
"customerDetails": {
"firstName": "riya",
"lastName": " c",
"email": "riya@gmail.com",
"phoneNumber": "23243244"
},
"companyDetails": {
"name": "Axim",
"email": "riya@gmail.com",
"phoneNumber": "23243244"
},
"guestOrder": false,
"orderedAt": "2024-05-23T11:05:52.545Z",
"shippingAddress": {
"shippingAddressId": "664dec6cd5775459152d4924",
"firstName": "riya",
"lastName": " c",
"address1": "23",
"address2": "",
"phoneNumber": "23243244",
"city": "texas",
"state": {
"name": "Alabama",
"code": "AL"
},
"country": {
"name": "United States",
"code": "US"
},
"zipcode": "23323444",
"id": "664dec6cd5775459152d4924"
},
"billingAddress": {
"billingAddressId": "664dec6cd5775459152d4923",
"firstName": "riya",
"lastName": " c",
"address1": "23",
"address2": "",
"phoneNumber": "23243244",
"city": "texas",
"state": {
"name": "Alabama",
"code": "AL"
},
"country": {
"name": "United States",
"code": "US"
},
"zipcode": "23323444",
"id": "664f2308d5775459152d6d2f"
},
"lineItems": [
{
"productId": "664f225659d877d2f49557b5",
"variantId": null,
"name": "groupproduct233",
"image": null,
"sku": "grp32434",
"bundledProducts": null,
"groupedProducts": [
{
"productId": "663a0cbe516313e5bc94ab30",
"name": "Safety Glasses",
"image": "https://assets.mydckapcommerce.com/645dd1e15e18e9b58c2e97a8/images/Frame86_2023_05_13_09_42_57.webp",
"sku": "sfty-4006",
"quantity": 12,
"price": 45,
"extendedTotalPrice": 540,
"_id": "664f2310d5775459152d6ddc"
},
{
"productId": "663a0cbe516313e5bc94ab2c",
"name": "Safety Work Gloves Green",
"image": "https://assets.mydckapcommerce.com/645dd1e15e18e9b58c2e97a8/images/Frame83_2023_05_13_09_39_47.webp",
"sku": "sfty-4005",
"quantity": 12,
"price": 30,
"extendedTotalPrice": 360,
"_id": "664f2310d5775459152d6ddd"
}
],
"quantity": 1,
"options": null,
"discounts": [],
"price": 900,
"extendedTotalPrice": 900,
"fulfilledQuantity": 0,
"returned": false,
"id": "664f2310d5775459152d6ddb"
}
],
"currency": {
"currency": "USD",
"symbol": "$"
},
"shipmentDetails": {
"shippingMethod": {
"name": "freeShipping",
"label": "Free Shipping",
"shippingMethodId": "663a0afe4587085935a4fa0d",
"type": {
"name": null,
"value": null,
"_id": "664f2310d5775459152d6de0"
},
"_id": "664f2310d5775459152d6ddf"
},
"_id": "664f2310d5775459152d6dde"
},
"paymentDetails": [
{
"paymentMethodId": "664f2310d5775459152d6dde",
"paymentType": "offline",
"paymentMethodType": "cash",
"paymentGateway": "Pay Later",
"paymentStatus": null,
"amount": 900,
"paymentCharge": null,
"paymentAdditionalDetails": {
"paymentId": null
}
}
],
"paymentStatus": "refunded",
"orderStatus": "partially fulfilled",
"shippingMethod": "663a0afe4587085935a4fa0d",
"shippingZone": "663a0afe4587085935a4fb84",
"paymentMethod": "663a0afe4587085935a4fa0b",
"shippingCost": 0,
"taxAmount": 0,
"total": 900,
"subTotal": 900,
"approved": true,
"approvalBy": {
"name": "riya c",
"user": "664dec6cd5775459152d4926",
"type": "customer"
},
"createdBy": {
"id": "664dec6cd5775459152d4926",
"name": "riya c",
"type": "store"
},
"timeline": [
{
"comment": null,
"type": "event",
"event": {
"subject": "{{name}} placed an order",
"description": "{{name}} created a new order for total $900.00"
},
"isCustomer": true,
"customer": "664dec6cd5775459152d4926",
"user": null,
"id": "664f2310d5775459152d6de1",
"createdAt": "2024-05-23T11:05:52.550Z",
"updatedAt": "2024-05-23T11:05:52.550Z"
}
// Additional timeline events here...
],
"fulfilledItems": [],
"payments": [],
"refunds": [],
"createdAt": "2024-05-23T11:05:52.550Z",
"updatedAt": "2024-08-29T09:13:33.301Z",
"isCompanyDeleted": true,
"id": "664f2310d5775459152d6dd8"
}
}

Success Response Fields

FieldTypeDescription
successbooleanIndicates the success status of the request, typically true.
dataobjectContains detailed order information.

Data Object

FieldTypeDescription
idstringUnique identifier for the order within the response.
entityIdstringThe unique identifier for the order.
checkoutstringIdentifier for the checkout process.
companystringIdentifier for the company.
customerstringIdentifier for the customer.
customerDetailsobjectObject containing customer information, such as firstName, lastName, email, and phoneNumber.
paymentTermsobjectObject containing payments details information, such as paymentTerm, depositRequired, depositPercentage
companyDetailsobjectObject containing company information, such as name, email, and phoneNumber.
guestOrderbooleanIndicates if the order was placed as a guest (no account).
orderedAtstringThe date and time when the order was placed.
shippingAddressobjectObject containing details of the shipping address, such as companyName, companyEmail, firstName, lastName, address, phoneNumber, and city.
billingAddressobjectObject containing details of the billing address, similar to shippingAddress.
lineItemsarrayArray of items that were ordered, each with details such as productId, name, sku, quantity, price, and groupedProducts.
currencyobjectObject containing currency information, like currency and symbol.
shipmentDetailsobjectDetails of the shipment, including shippingMethod which contains name, label, and shippingMethodId.
paymentDetailsobjectDetails of the payment, including paymentGateway, paymentType, and amount.
paymentStatusstringStatus of the payment.
orderStatusstringCurrent status of the order.
shippingCostnumberCost of shipping for the order.
taxAmountnumberTax amount applied to the order.
totalnumberTotal amount for the order.
subTotalnumberSubtotal amount for the order, before tax and shipping.
approvedbooleanIndicates if the order has been approved.
approvalByobjectInformation about the approver, including name and user.
createdByobjectObject indicating who created the order, including id and name.
metaFieldsarrayAdditional metadata for the order (currently empty).
fulfilledItemsarrayArray of items that have been fulfilled (currently empty).
paymentsarrayArray of payment records, if any (currently empty).
refundsarrayArray of refund records, if any (currently empty).
createdAtstringTimestamp of when the order was created.
updatedAtstringTimestamp of the last update to the order.
isCompanyDeletedbooleanIndicates if the company has been deleted.

Error Responses

Status CodeDescription
400Bad Request: Invalid input data or missing parameters.
401Unauthorized: Access token is invalid or missing.
500Internal Server Error: An error occurred on the server.

Notes

  • Ensure you replace {orderId} in the URL with the actual unique identifier of the order you wish to retrieve.
  • Provide a valid and active access token in the request header to authenticate your request.