Skip to main content

Version: v1

Get Order Details

Retrieve detailed information for a specific order using its ID.


HTTP Method & Endpoint

GET | /order/{orderId}


Request

Path Parameters

ParameterTypeRequiredDescription
orderIdStringYesUnique identifier of the order

Headers

HeaderValueDescription
Content-Typeapplication/jsonSpecifies that the response will be in JSON format
AuthorizationBearer {token}Authentication token (replace {token} with your actual token)
x-store-id{storeId}StoreId (replace {storeId} with your actual storeId)

Response Format

Success Response (200 OK)

FieldTypeDescription
messageStringStatus message indicating the result of the operation
dataDataContains all details about the order
sourceStringSource of the order data (e.g., "unisouk")

Data Object Properties

FieldTypeDescription
idStringUnique identifier for the order
storeIdStringStore ID associated with the order
customerIdStringCustomer's unique identifier
channelTypeEnum(DEFAULT,ONDC)Channel through which order was placed
statusStringOrder status (e.g., "PENDING")
fulfillmentStatusStringFulfillment status (e.g., "PENDING")
purchaseDateStringISO timestamp of when order was placed
paymentMethodEnum(COD,CVS)Payment method used (e.g., "COD")
paymentDetailPaymentDetailDetailed payment information
buyerInfoBuyerInfoBuyer's contact and address information
shippingDetailShippingDetailShipping address details
addressAddressPrimary address associated with the order
packageMeasurementObjectPackage dimensions and weight (if available)
totalAmountNumberTotal amount of the order
externalOrderIdStringExternal reference ID for the order
externalOrderStatusStringStatus from external system (if applicable)
extraDataObjectAdditional custom data
orderItemsArray(OrderItem)List of items in the order

PaymentDetail Properties

FieldTypeDescription
subTotalAmountNumberOrder subtotal before charges
chargesChargesBreakdown of additional charges
totalAmountNumberFinal amount after all charges

Charges Properties

FieldTypeDescription
deliveryNumberDelivery charges
taxNumberTax amount
packingNumberPacking charges

BuyerInfo Properties

FieldTypeDescription
firstNameStringBuyer's first name
lastNameStringBuyer's last name
buildingStringBuilding/street address
addressStringAdditional address information
cityStringCity name
pincodeNumberPostal/ZIP code
stateStringState/province
countryStringCountry
emailStringContact email
phoneStringContact phone number
isShippingSameBooleanWhether shipping address matches billing

ShippingDetail Object

ParameterTypeRequiredDescription
firstNameStringYesRecipient's first name
lastNameStringYesRecipient's last name
addressStringYesShipping street address
cityStringYesShipping city
pincodeNumberYesShipping postal/ZIP code
stateStringYesShipping state/province
countryStringYesShipping country
emailStringYesRecipient's email address
phoneStringYesRecipient's phone number

Address Object

ParameterTypeRequiredDescription
nameStringYesFull name
addressStringYesStreet address
cityStringYesCity
pincodeNumberYesPostal/ZIP code
stateStringYesState/province
countryStringYesCountry
emailStringYesEmail address
phoneStringYesPhone number

OrderItem Properties

FieldTypeDescription
variantIdStringID of the product variant
productIdStringID of the parent product
titleStringProduct title
descriptionStringProduct description
brandNameStringBrand name of the product
skuStringStock keeping unit
quantityNumberQuantity ordered
priceNumberPrice per unit
imagesArray(Image)Product images

Image Properties

FieldTypeDescription
positionNumberDisplay order of image
urlStringURL of the image

Examples

cURL

curl -X GET "https://dev-sfapi.unisouk.com/order/30256970401565696" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-H "x-store-id: <STORE_ID>"

Javascript (React)

import axios from "axios";

const fetchOrderDetails = async (orderId) => {
try {
const response = await axios.get(`https://dev-sfapi.unisouk.com/order/${orderId}`, {
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <TOKEN>",
"x-store-id": "<STORE_ID>",
},
});

console.log("Order details:", response.data);
} catch (error) {
console.error("Error fetching order:", error.response?.data || error.message);
}
};

Sample Response

Click to view Sample Response
{
"message": "Order fetched successfully",
"data": {
"id": "30256970401565696",
"storeId": "30182834660443136",
"customerId": "30182834660443136",
"channelType": "DEFAULT",
"status": "PENDING",
"fulfillmentStatus": "PENDING",
"purchaseDate": "2025-03-25T11:50:23.888Z",
"paymentMethod": "COD",
"paymentDetail": {
"subTotalAmount": 0,
"charges": {
"delivery": 0,
"tax": 0,
"packing": 0
},
"totalAmount": 0
},
"buyerInfo": {
"firstName": "Aman",
"lastName": "Tiwari",
"building": "22 shiv nagar",
"address": "katargam",
"city": "surat",
"pincode": 395004,
"state": "gujarat",
"country": "india",
"email": "abc@gmail.com",
"phone": "9876543210",
"isShippingSame": false
},
"shippingDetail": {
"firstName": "Aman",
"lastName": "Tiwari",
"building": "22 shiv nagar",
"address": "katargam",
"city": "surat",
"pincode": 395004,
"state": "gujarat",
"country": "india",
"email": "abc@gmail.com",
"phone": "9876543210"
},
"address": {
"name": "Aman",
"building": "22 shiv nagar",
"address": "katargam",
"city": "surat",
"pincode": 395004,
"state": "gujarat",
"country": "india",
"email": "abc@gmail.com",
"phone": "9876543210"
},
"packageMeasurement": {},
"totalAmount": 50000,
"externalOrderId": "123",
"externalOrderStatus": "PENDING",
"extraData": {},
"orderItems": [
{
"variantId": "12",
"productId": "21",
"title": "test",
"description": "tesing",
"brandName": "test",
"sku": "SH-01",
"quantity": 1,
"price": 1,
"images": [
{
"position": 1,
"url": "http://test.com"
}
]
}
]
},
"source": "unisouk"
}

Error Responses

Status CodeDescription
400Bad Request - Invalid order ID
401Unauthorized - Authentication token is missing or invalid
403Forbidden - Insufficient permissions
404Not Found - Order with specified ID was not found
500Internal Server Error - Something went wrong on the server