Commerce Engine is now in beta. We're working hard to make it better for you.
Auth
- POSTAnonymous user
- POSTLogin with phone
- POSTLogin with email
- POSTLogin with whatsapp
- POSTLogin with password
- POSTVerify OTP
- POSTRegister with phone
- POSTRegister with email
- POSTRegister with whatsapp
- POSTRegister with password
- GETRetrieve a user
- PUTUpdate a user
- GETRetrieve a profile image
- PUTUpdate profile image
- POSTAdd profile image
- DELDelete profile image
- PUTDeactivate account
- POSTRefresh access token
- POSTChange password
- POSTForgot password
- POSTReset password
- GETRetrieve user notification preferences
- PUTUpdate user notification preferences
- POSTCreate user notification preferences
- POSTGenerate OTP
- POSTLogout user
- POSTCheck email/phone verification status
Catalog
Carts
- POSTCreate cart
- GETRetrieve cart detail
- DELDelete cart
- GETRetrieve cart using user id
- DELDelete cart using user id
- POSTAdd/delete cart item
- POSTUpdate cart address
- POSTApply coupon
- DELRemove coupon
- POSTRedeem loyalty points
- DELRemove loyalty points
- POSTUse credit balance
- DELRemove credit balance
- POSTRedeem gift card
- DELRemove gift card
- GETRetrieve wishlist
- POSTAdd product to wishlist
- DELDelete product from wishlist
Coupons & promotions
Customers
Orders
Shipping
Analytics
Campaigns
Commerce Engine is now in beta. We're working hard to make it better for you.
Orders
Create order return
Orders
Create order return
Create order return
POST
/
orders
/
{order_number}
/
return
Copy
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/orders/{order_number}/return \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"return_items": [
{
"product_id": "<string>",
"sku": "<string>",
"quantity": 123,
"resolution": "refund",
"return_reason": "<string>"
}
],
"shipping_address": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"tax_identification_number": "123456789",
"business_name": "<string>"
}
}'
Copy
{
"message": "order details",
"success": true,
"content": {
"order_return": {
"request_number": "<string>",
"status": "<string>",
"return_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "<string>",
"selling_price": 123,
"tax_type": "<string>",
"tax_rate": 123,
"quantity": 123,
"resolution": "refund",
"return_reason": "<string>"
}
],
"subtotal": 123,
"shipping_amount": 123,
"total_tax": 123,
"grand_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z",
"original_order_number": "<string>",
"original_order_delivered_at": "2023-11-07T05:31:56Z",
"replacement_order_number": "<string>",
"replacement_order_date": "2023-11-07T05:31:56Z",
"replacement_order_amount": 123,
"refund": [
{
"request_number": "<string>",
"refund_amount": 123,
"refund_date": "2023-11-07T05:31:56Z",
"status": "pending",
"payment_mode": "PaymentGateway",
"payment_method": "<string>",
"payment_reference_number": "<string>",
"bank_account_number": "<string>",
"bank_name": "<string>",
"refund_remarks": "<string>"
}
]
}
}
}
Authorizations
Access token
Path Parameters
order number
Body
application/json
null value for guest checkout.
Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
10 digit phone number without country code.
Allowed value:
"India"
Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
Example:
"123456789"
Use in billing & shipping details only.
Response
200
application/json
OK
Available options:
refund
, replacement
Allowed value:
"GST"
Order refund model
Available options:
pending
, approved
, success
, failed
Available options:
PaymentGateway
, ClubAI
, BankTransfer
Copy
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/orders/{order_number}/return \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"return_items": [
{
"product_id": "<string>",
"sku": "<string>",
"quantity": 123,
"resolution": "refund",
"return_reason": "<string>"
}
],
"shipping_address": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"tax_identification_number": "123456789",
"business_name": "<string>"
}
}'
Copy
{
"message": "order details",
"success": true,
"content": {
"order_return": {
"request_number": "<string>",
"status": "<string>",
"return_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "<string>",
"selling_price": 123,
"tax_type": "<string>",
"tax_rate": 123,
"quantity": 123,
"resolution": "refund",
"return_reason": "<string>"
}
],
"subtotal": 123,
"shipping_amount": 123,
"total_tax": 123,
"grand_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z",
"original_order_number": "<string>",
"original_order_delivered_at": "2023-11-07T05:31:56Z",
"replacement_order_number": "<string>",
"replacement_order_date": "2023-11-07T05:31:56Z",
"replacement_order_amount": 123,
"refund": [
{
"request_number": "<string>",
"refund_amount": 123,
"refund_date": "2023-11-07T05:31:56Z",
"status": "pending",
"payment_mode": "PaymentGateway",
"payment_method": "<string>",
"payment_reference_number": "<string>",
"bank_account_number": "<string>",
"bank_name": "<string>",
"refund_remarks": "<string>"
}
]
}
}
}