Get Order Information
Get all detailed information related to a specific order, including recipient data, products, box used, tracking guides, and current status.
Endpointβ
GET /v1/client/shipment/data/:unique_order_number
Descriptionβ
This endpoint returns all information related to a specific order. To request the information, it is necessary to specify the unique_order_number in the URL and add the Bearer authentication token in the request Headers.
Headersβ
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | β | Bearer token obtained from /token/generate endpoint |
| Content-Type | string | β | Must be application/json |
| Accept | string | β | Must be application/json |
Examplesβ
cURLβ
curl -X GET https://apisandbox.eonwms.com/v1/client/shipment/data/COD00000Test \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
JavaScriptβ
const uniqueOrderNumber = 'COD00000Test';
const response = await fetch(
`https://apisandbox.eonwms.com/v1/client/shipment/data/${uniqueOrderNumber}`,
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
}
);
const orderInfo = await response.json();
// Access specific information
const trackingNumber = orderInfo.data.attributes.masterTracking;
const currentStatus = orderInfo.data.attributes.lastStatus.data.attributes.status;
const products = orderInfo.data.attributes.products;
Pythonβ
import requests
unique_order_number = 'COD00000Test'
response = requests.get(
f'https://apisandbox.eonwms.com/v1/client/shipment/data/{unique_order_number}',
headers={
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
)
order_info = response.json()
# Access specific information
tracking_number = order_info['data']['attributes']['masterTracking']
current_status = order_info['data']['attributes']['lastStatus']['data']['attributes']['status']
products = order_info['data']['attributes']['products']
# Print order summary
print(f"Order: {unique_order_number}")
print(f"Tracking: {tracking_number}")
print(f"Status: {current_status}")
print(f"Total: ${order_info['data']['attributes']['totalPrice']}")
Responsesβ
200 - Successβ
{
"data": {
"id": "24",
"type": "shipment",
"attributes": {
"uniqueOrderNumber": "COD00000Test",
"invoice": "invoice test",
"masterTracking": "394222208340",
"totalPrice": 200,
"shippingService": {
"shippingServiceName": "FEDEX",
"specialServices": {
"cashOnDelivery": true
}
},
"consignee": {
"id": "24",
"type": "consignee",
"attributes": {
"id": 24,
"name": "Buyer 01",
"country": "Mexico",
"state": "San Luis PotosΓ",
"municipality": "San Luis PotosΓ",
"neighborhood": "Lomas 4ta sec",
"street": "Av Sierra Leona",
"externalNumber": "418",
"internalNumber": "A",
"zipcode": "78200",
"email": "test@email.com",
"phone": "5555555555",
"comments": "comments"
}
},
"products": [
{
"id": "25",
"type": "shipmentDetail",
"attributes": {
"quantity": 2,
"isKit": false,
"unitPrice": 100,
"subtotal": 200,
"product": {
"id": 2,
"sku": "THISISSKU2",
"description": "WINGSPAN OCEANIA EXPANTION"
}
}
}
],
"box": {
"id": "1",
"type": "box",
"attributes": {
"id": 1,
"name": "COD Default Box",
"length": 25,
"width": 20,
"height": 6,
"units": "CM"
}
},
"trackingGuides": [
{
"id": "1",
"type": "trackingGuide",
"attributes": {
"trackingNumber": "394222208340",
"charges": 0,
"currencyCode": "NMP"
}
}
],
"lastStatus": {
"data": {
"id": "25",
"type": "status",
"attributes": {
"status": "READY",
"current": true,
"date": null,
"time": null,
"createdAt": "2023-02-03T17:24:05.845-06:00"
}
}
}
}
}
}
401 - Unauthorizedβ
{
"code": 401,
"fault": {
"arguments": {
"Authorization": "invalid"
},
"type": "InvalidAuthorizationException",
"message": "The request is unauthorized, the access token is invalid."
}
}
404 - Not Foundβ
{
"code": 404,
"fault": {
"arguments": {
"unique_order_number": "invalid"
},
"type": "shipmentNotFound",
"message": "Shipment not found."
}
}
Response Structureβ
The response follows the JSON:API format and includes complete order information:
Main Information (attributes)β
- uniqueOrderNumber: Unique order number
- invoice: Invoice number
- masterTracking: Master tracking number
- totalPrice: Total order price
- shippingService: Shipping service information
- shippingServiceName: Carrier name
- specialServices: Special services (e.g., COD)
Recipient Information (consignee)β
Contains all delivery data:
- Personal data (name, email, phone)
- Complete address
- Special comments
Products (products)β
Array with details for each product:
- quantity: Quantity
- isKit: Whether it's a product kit
- unitPrice: Unit price
- subtotal: Subtotal per product
- product: Product information (SKU and description)
Packaging Information (box)β
- name: Box name/type
- length, width, height: Dimensions
- units: Unit of measurement (CM)
Tracking Guides (trackingGuides)β
- trackingNumber: Guide number
- charges: Additional charges
- currencyCode: Currency code
Last Status (lastStatus)β
- status: Current status
- current: Always
truefor the last status - date and time: Status date and time
- createdAt: Creation timestamp
Use Casesβ
1. Display Order Summaryβ
function displayOrderSummary(orderData) {
const attrs = orderData.data.attributes;
console.log(`
Order #${attrs.uniqueOrderNumber}
Status: ${attrs.lastStatus.data.attributes.status}
Total: $${attrs.totalPrice}
Tracking: ${attrs.masterTracking}
Customer: ${attrs.consignee.attributes.name}
`);
}
2. Verify Order Productsβ
function verifyInventory(orderData) {
const products = orderData.data.attributes.products;
products.forEach(item => {
const prod = item.attributes;
console.log(`
SKU: ${prod.product.sku}
Quantity: ${prod.quantity}
Price: $${prod.unitPrice}
Subtotal: $${prod.subtotal}
`);
});
}
3. Generate Address Labelβ
function generateAddressLabel(orderData) {
const dest = orderData.data.attributes.consignee.attributes;
return `
${dest.name}
${dest.street} ${dest.externalNumber}${dest.internalNumber ? ' ' + dest.internalNumber : ''}
${dest.neighborhood}
${dest.municipality}, ${dest.state}
ZIP: ${dest.zipcode}
Phone: ${dest.phone}
`;
}
Differences with Order Status
This endpoint provides complete order information, while /order-status only shows the status history. Use this endpoint when you need:
- Customer data
- Product details
- Packaging information
- Tracking numbers
Query Limits
- This endpoint contains more data and may be slower
- Use it only when you need complete information
- To just check the status, use
/order-status