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
Create order
Create new order
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cart_id": "<string>",
"payment_gateway": "PAYU",
"payment_gateway_params": {
"payment_gateway": "<any>",
"furl": "<string>",
"surl": "<string>"
}
}'
{
"message": "<string>",
"success": true,
"content": {
"order": {
"order_number": "<string>",
"order_date": "2023-11-07T05:31:56Z",
"status": "draft",
"payment_status": "pending",
"payment_success_date": "2023-11-07T05:31:56Z",
"customer_email": "<string>",
"customer_phone": "<string>",
"customer_note": "<string>",
"is_promotion_applied": true,
"promotion_discount_amount": 123,
"is_coupon_applied": true,
"coupon_code": "<string>",
"coupon_discount_amount": 123,
"on_subscription": true,
"subtotal": 123,
"item_total_tax": 123,
"subtotal_including_tax": 123,
"shipping_amount": 123,
"shipping_total_tax": 123,
"shipping_amount_including_tax": 123,
"total_tax": 123,
"grand_total": 123,
"loyalty_point_redeemed": 123,
"credit_balance_used": 123,
"to_be_paid": 123,
"loyalty_point_earned": 123,
"order_items_count": 123,
"order_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "<string>",
"on_offer": true,
"on_promotion": true,
"on_subscription": true,
"subscription_plan": "<string>",
"subscription_interval": 123,
"subscription_frequency": "<string>",
"quantity": 123,
"free_quantity": 123,
"is_free_item": true,
"selling_price": 123,
"listing_price": 123,
"promotion_discount_amount": 123,
"coupon_discount_amount": 123,
"tax_type": "GST",
"tax_rate": 123,
"tax_amount": 123,
"shipping_additional_cost": 123
}
],
"billing_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>",
"is_phone_verified": true,
"is_email_verified": true
},
"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>",
"is_phone_verified": true,
"is_email_verified": true
},
"currency": {
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"payments": [
{
"transaction_type": "payment",
"request_number": "<string>",
"amount": 123,
"payment_status": "pending",
"payment_date": "2023-11-07T05:31:56Z",
"payment_reference_number": "<string>",
"payment_method": "Credit Card",
"icon_url": "<string>",
"card_number": "<string>",
"card_type": "Visa"
}
],
"is_cancellation_allowed": true,
"cancellation_refund_details": {
"loyalty_point": 123,
"refundable_amount": 123,
"cancellation_charges": 123,
"cancellation_charges_reason": "<string>",
"payment_mode": "original-payment-mode"
},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"payment_required": true,
"payment_info": {
"payment_gateway": "<any>",
"key": "<string>",
"txnid": "<string>",
"amount": 123,
"productinfo": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"phone": "<string>",
"si": "<any>",
"si_details": {
"billingAmount": 123,
"billingCurrency": "<any>",
"billingCycle": "<any>",
"billingInterval": 123,
"paymentStartDate": "2023-12-25",
"paymentEndDate": "2023-12-25"
},
"furl": "<string>",
"surl": "<string>",
"hash": "<string>"
}
}
}
Authorizations
Access token
Body
PAYU
, JUSPAY
Response
draft
, awaiting_approval
, confirmed
, partially_scheduled
, awaiting_shipment
, shipped
, partially_shipped
, undelivered
, partially_undelivered
, return_to_origin
, partially_return_to_origin
, complete
, partially_delivered
, cancelled
pending
, success
, failed
, partially_paid
"GST"
"GST"
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.
"India"
Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
"123456789"
Use in billing & shipping details only.
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.
"India"
Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
"123456789"
Use in billing & shipping details only.
Order Payment
payment
, refund
pending
, success
, failed
, partially_paid
, refund_initiated
Credit Card
, Debit Card
, Netbanking
, UPI
, Wallet
, Loyalty Point
, IMPS
, NEFT
, RTGS
masked card number e.g. ************1111
Visa
, Master Card
, Rupay
order cancellation option should be visible only if this flag is true.
to show refundable details in order cancellation ui.
loyalty point redeemed will be rollbacked and credited to user account.
amount that will be refunded to customer.
amount deducted from paid amount.
reason for cancellation charges.
payment mode for refund.
original-payment-mode
, bank-transfer
To be used in case we want to take consent for subscription payment. To create consent for subscription, value of this parameter must be 1.
Send this json object for creating subscription consent.
Maximum amount that can be charged in recurring payment.
Subscription frequency.
Billing Interval is closely coupled with the billingCycle field and denotes at what frequency, the subscription plan needs to be executed. For monthly subscriptions, parameter values need to be sent in the request are: billingCycle = MONTHLY billingInterval = 1 Similarly, by keeping the following values, customer will be charged once in every 3 days: billingCycle = DAILY billingInterval = 3
subscription start date
subscription end date
return url in case of payment failure.
return url in case of payment success.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cart_id": "<string>",
"payment_gateway": "PAYU",
"payment_gateway_params": {
"payment_gateway": "<any>",
"furl": "<string>",
"surl": "<string>"
}
}'
{
"message": "<string>",
"success": true,
"content": {
"order": {
"order_number": "<string>",
"order_date": "2023-11-07T05:31:56Z",
"status": "draft",
"payment_status": "pending",
"payment_success_date": "2023-11-07T05:31:56Z",
"customer_email": "<string>",
"customer_phone": "<string>",
"customer_note": "<string>",
"is_promotion_applied": true,
"promotion_discount_amount": 123,
"is_coupon_applied": true,
"coupon_code": "<string>",
"coupon_discount_amount": 123,
"on_subscription": true,
"subtotal": 123,
"item_total_tax": 123,
"subtotal_including_tax": 123,
"shipping_amount": 123,
"shipping_total_tax": 123,
"shipping_amount_including_tax": 123,
"total_tax": 123,
"grand_total": 123,
"loyalty_point_redeemed": 123,
"credit_balance_used": 123,
"to_be_paid": 123,
"loyalty_point_earned": 123,
"order_items_count": 123,
"order_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "<string>",
"on_offer": true,
"on_promotion": true,
"on_subscription": true,
"subscription_plan": "<string>",
"subscription_interval": 123,
"subscription_frequency": "<string>",
"quantity": 123,
"free_quantity": 123,
"is_free_item": true,
"selling_price": 123,
"listing_price": 123,
"promotion_discount_amount": 123,
"coupon_discount_amount": 123,
"tax_type": "GST",
"tax_rate": 123,
"tax_amount": 123,
"shipping_additional_cost": 123
}
],
"billing_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>",
"is_phone_verified": true,
"is_email_verified": true
},
"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>",
"is_phone_verified": true,
"is_email_verified": true
},
"currency": {
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"payments": [
{
"transaction_type": "payment",
"request_number": "<string>",
"amount": 123,
"payment_status": "pending",
"payment_date": "2023-11-07T05:31:56Z",
"payment_reference_number": "<string>",
"payment_method": "Credit Card",
"icon_url": "<string>",
"card_number": "<string>",
"card_type": "Visa"
}
],
"is_cancellation_allowed": true,
"cancellation_refund_details": {
"loyalty_point": 123,
"refundable_amount": 123,
"cancellation_charges": 123,
"cancellation_charges_reason": "<string>",
"payment_mode": "original-payment-mode"
},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"payment_required": true,
"payment_info": {
"payment_gateway": "<any>",
"key": "<string>",
"txnid": "<string>",
"amount": 123,
"productinfo": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"phone": "<string>",
"si": "<any>",
"si_details": {
"billingAmount": 123,
"billingCurrency": "<any>",
"billingCycle": "<any>",
"billingInterval": 123,
"paymentStartDate": "2023-12-25",
"paymentEndDate": "2023-12-25"
},
"furl": "<string>",
"surl": "<string>",
"hash": "<string>"
}
}
}