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
| Parameter | Type | Required | Description |
|---|---|---|---|
cartId | String | Yes | Unique identifier for the cart |
customerId | String | Yes | Unique identifier for the customer |
channelType | enum(DEFAULT) | Yes | Channel through which the order is placed |
paymentMethod | enum(CVS,COD) | Yes | Method of payment |
buyerInfo | BuyerInfo | Yes | Customer's personal and delivery information |
shippingDetail | ShippingDetail | Yes | Shipping information (can be different from buyer info) |
address | Address | Yes | Pickup address information |
extraData | Object | No | Additional data for the order (can be empty) |
Success Response (200 OK)
| Field | Type | Description |
|---|---|---|
message | String | Status message indicating the result of the order creation |
data | Order | Contains all details about the order |
source | String | Source of the order data (e.g., "db") |
Create Order Data Object
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the order |
storeId | String | Store ID from where the order was placed |
customerId | String | Customer's unique identifier |
channelType | String | Channel through which the order was placed (e.g., DEFAULT) |
status | String | Current status of the order (e.g., PENDING) |
fulfillmentStatus | String | Status of order fulfillment (e.g., PENDING) |
purchaseDate | String | Date and time when the purchase was made (ISO format) |
paymentMethod | String | Payment method used for the order (e.g., COD) |
paymentDetail | Object | Additional payment-related details |
buyerInfo | BuyerInfo | Information about the buyer |
shippingDetail | ShippingDetail | Shipping address details |
address | Address | Pickup address details |
packageMeasurement | Object | Package measurement details |
totalAmount | Number | Total amount for the order (in minor units, e.g., paise) |
externalOrderId | String | External platform order ID (if applicable) |
razorpayOrderId | String | Razorpay order ID (only applicable if user doesn't use COD) |
externalOrderStatus | String | Status of the order on the external platform |
extraData | Object | Any additional data |
createdAt | String | Timestamp when the order was created (ISO format) |
updatedAt | String | Timestamp when the order was last updated (ISO format) |
2. List Orders API
Success Response (200 OK)
| Field | Type | Description |
|---|---|---|
message | String | Status message indicating the result of the operation |
data | Order Data | Contains the list of orders and pagination details |
source | String | Source of the order data (e.g., "db") |
Order List Object Properties
| Field | Type | Description |
|---|---|---|
orders | Array(Order) | List of order objects |
pagination | Pagination | Pagination metadata |
Order Object Properties
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the order |
storeId | String | Store ID associated with the order |
customerId | String | Customer's unique identifier |
status | String | Order status (e.g., "PENDING") |
fulfillmentStatus | String | Fulfillment status (e.g., "PENDING") |
purchaseDate | String | ISO timestamp of when order was placed |
paymentMethod | enum(COD,CVS) | Payment method used (e.g., "COD") |
totalAmount | Number | Total amount of the order |
orderItems | Array(OrderItem) | List of items in the order |
OrderItem Properties
| Field | Type | Description |
|---|---|---|
variantId | String | ID of the product variant |
title | String | Product title |
description | String | Product description |
brandName | String | Brand name of the product |
quantity | Number | Quantity ordered |
price | Number | Price per unit |
Pagination Object Properties
| Field | Type | Description |
|---|---|---|
totalItems | Number | Total number of items available |
currentPage | Number | Current page number |
totalPages | Number | Total number of pages |
pageSize | Number | Number of items per page |
3. Get Order Details
Success Response (200 OK)
| Field | Type | Description |
|---|---|---|
message | String | Status message indicating the result of the operation |
data | Order Data | Contains all details about the order |
source | String | Source of the order data (e.g., "unisouk") |
Get Order Data Object
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the order |
storeId | String | Store ID associated with the order |
customerId | String | Customer's unique identifier |
channelType | Enum(DEFAULT,ONDC) | Channel through which order was placed |
status | String | Order status (e.g., "PENDING") |
fulfillmentStatus | String | Fulfillment status (e.g., "PENDING") |
purchaseDate | String | ISO timestamp of when order was placed |
paymentMethod | Enum(COD,CVS) | Payment method used (e.g., "COD") |
paymentDetail | PaymentDetail | Detailed payment information |
buyerInfo | BuyerInfo | Buyer's contact and address information |
shippingDetail | ShippingDetail | Shipping address details |
address | Address | Primary address associated with the order |
packageMeasurement | Object | Package dimensions and weight (if available) |
totalAmount | Number | Total amount of the order |
externalOrderId | String | External reference ID for the order |
externalOrderStatus | String | Status from external system (if applicable) |
extraData | Object | Additional custom data |
orderItems | Array(OrderItem) | List of items in the order |
PaymentDetail Properties
| Field | Type | Description |
|---|---|---|
subTotalAmount | Number | Order subtotal before charges |
charges | Charges | Breakdown of additional charges |
totalAmount | Number | Final amount after all charges |
Charges Properties
| Field | Type | Description |
|---|---|---|
delivery | Number | Delivery charges |
tax | Number | Tax amount |
packing | Number | Packing charges |
OrderItem Properties
| Field | Type | Description |
|---|---|---|
variantId | String | ID of the product variant |
productId | String | ID of the parent product |
title | String | Product title |
description | String | Product description |
brandName | String | Brand name of the product |
sku | String | Stock keeping unit |
quantity | Number | Quantity ordered |
price | Number | Price per unit |
images | Array(Image) | Product images |
Image Properties
| Field | Type | Description |
|---|---|---|
position | Number | Display order of image |
url | String | URL of the image |
Shared Data Object
BuyerInfo Object
| Parameter | Type | Required | Description |
|---|---|---|---|
firstName | String | Yes | Customer's first name |
lastName | String | Yes | Customer's last name |
address | String | Yes | Customer's street address |
building | String | Yes | Customer's building address |
city | String | Yes | Customer's city |
pincode | Number | Yes | Customer's postal/ZIP code |
state | String | Yes | Customer's state/province |
country | String | Yes | Customer's country |
email | String | Yes | Customer's email address |
phone | String | Yes | Customer's phone number |
isShippingSame | Boolean | Yes | Whether shipping address is the same as billing address |
ShippingDetail Object
| Parameter | Type | Required | Description |
|---|---|---|---|
firstName | String | Yes | Recipient's first name |
lastName | String | Yes | Recipient's last name |
address | String | Yes | Shipping street address |
building | String | Yes | Shipping building address |
city | String | Yes | Shipping city |
pincode | Number | Yes | Shipping postal/ZIP code |
state | String | Yes | Shipping state/province |
country | String | Yes | Shipping country |
email | String | Yes | Recipient's email address |
phone | String | Yes | Recipient's phone number |
Address Object
| Parameter | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Full name |
address | String | Yes | Street address |
building | String | Yes | Name or number of the building |
city | String | Yes | City |
pincode | Number | Yes | Postal/ZIP code |
state | String | Yes | State/province |
country | String | Yes | Country |
email | String | Yes | Email address |
phone | String | Yes | Phone number |