Skip to main content

Product API Response

This document provides a detailed breakdown of the JSON structure returned by order-related API endpoints.

1. Create Order API

Request Body Parameters

ParameterTypeRequiredDescription
cartIdStringYesUnique identifier for the cart
customerIdStringYesUnique identifier for the customer
channelTypeenum(DEFAULT)YesChannel through which the order is placed
paymentMethodenum(CVS,COD)YesMethod of payment
buyerInfoBuyerInfoYesCustomer's personal and delivery information
shippingDetailShippingDetailYesShipping information (can be different from buyer info)
addressAddressYesPickup address information
extraDataObjectNoAdditional data for the order (can be empty)

Success Response (200 OK)

FieldTypeDescription
messageStringStatus message indicating the result of the order creation
dataOrderContains all details about the order
sourceStringSource of the order data (e.g., "db")

Create Order Data Object

FieldTypeDescription
idStringUnique identifier for the order
storeIdStringStore ID from where the order was placed
customerIdStringCustomer's unique identifier
channelTypeStringChannel through which the order was placed (e.g., DEFAULT)
statusStringCurrent status of the order (e.g., PENDING)
fulfillmentStatusStringStatus of order fulfillment (e.g., PENDING)
purchaseDateStringDate and time when the purchase was made (ISO format)
paymentMethodStringPayment method used for the order (e.g., COD)
paymentDetailObjectAdditional payment-related details
buyerInfoBuyerInfoInformation about the buyer
shippingDetailShippingDetailShipping address details
addressAddressPickup address details
packageMeasurementObjectPackage measurement details
totalAmountNumberTotal amount for the order (in minor units, e.g., paise)
externalOrderIdStringExternal platform order ID (if applicable)
razorpayOrderIdStringRazorpay order ID (only applicable if user doesn't use COD)
externalOrderStatusStringStatus of the order on the external platform
extraDataObjectAny additional data
createdAtStringTimestamp when the order was created (ISO format)
updatedAtStringTimestamp when the order was last updated (ISO format)

2. List Orders API

Success Response (200 OK)

FieldTypeDescription
messageStringStatus message indicating the result of the operation
dataOrder DataContains the list of orders and pagination details
sourceStringSource of the order data (e.g., "db")

Order List Object Properties

FieldTypeDescription
ordersArray(Order)List of order objects
paginationPaginationPagination metadata

Order Object Properties

FieldTypeDescription
idStringUnique identifier for the order
storeIdStringStore ID associated with the order
customerIdStringCustomer's unique identifier
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")
totalAmountNumberTotal amount of the order
orderItemsArray(OrderItem)List of items in the order

OrderItem Properties

FieldTypeDescription
variantIdStringID of the product variant
titleStringProduct title
descriptionStringProduct description
brandNameStringBrand name of the product
quantityNumberQuantity ordered
priceNumberPrice per unit

Pagination Object Properties

FieldTypeDescription
totalItemsNumberTotal number of items available
currentPageNumberCurrent page number
totalPagesNumberTotal number of pages
pageSizeNumberNumber of items per page

3. Get Order Details

Success Response (200 OK)

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

Get Order Data Object

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

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

Shared Data Object

BuyerInfo Object

ParameterTypeRequiredDescription
firstNameStringYesCustomer's first name
lastNameStringYesCustomer's last name
addressStringYesCustomer's street address
buildingStringYesCustomer's building address
cityStringYesCustomer's city
pincodeNumberYesCustomer's postal/ZIP code
stateStringYesCustomer's state/province
countryStringYesCustomer's country
emailStringYesCustomer's email address
phoneStringYesCustomer's phone number
isShippingSameBooleanYesWhether shipping address is the same as billing address

ShippingDetail Object

ParameterTypeRequiredDescription
firstNameStringYesRecipient's first name
lastNameStringYesRecipient's last name
addressStringYesShipping street address
buildingStringYesShipping building 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
buildingStringYesName or number of the building
cityStringYesCity
pincodeNumberYesPostal/ZIP code
stateStringYesState/province
countryStringYesCountry
emailStringYesEmail address
phoneStringYesPhone number