API Endpoints
Complete reference for O2VEND Storefront API endpoints. All endpoints require authentication via X-O2VEND-SHOPFRONT-API-KEY header.
Base URL
All API requests are made to:
{protocol}://{hostname}/shopfront/api/v2
Core Endpoints
Store Information
Get Store Info
GET /shopfront/api/v2/storeinfo
Returns store information including settings, countries, and configuration.
Response:
{
"id": "string",
"name": "string",
"settings": {
"currencySymbol": "string",
"currencyFormat": "string"
}
}
Get Settings
GET /shopfront/api/v2/settings
Returns store settings.
Authentication Endpoints
Phone Authentication
Send Phone OTP
POST /shopfront/api/v2/login/phone/sendotp
Content-Type: application/json
{
"userGUID": "string",
"phoneNumber": "string"
}
Verify Phone OTP
POST /shopfront/api/v2/login/phone/verifyotp
Content-Type: application/json
{
"userGUID": "string",
"phoneNumber": "string",
"otp": "string"
}
Verify Phone OTP and Generate Token
POST /shopfront/api/v2/login/phone/verifyotp/generatetoken
Content-Type: application/json
{
"userGUID": "string",
"phoneNumber": "string",
"otp": "string",
"includeRefreshToken": true
}
Response:
{
"token": "string",
"refreshToken": "string",
"userGUID": "string"
}
Email Authentication
Send Email OTP
POST /shopfront/api/v2/login/email/sendotp
Content-Type: application/json
{
"userGUID": "string",
"email": "string"
}
Verify Email OTP
POST /shopfront/api/v2/login/email/verifyotp
Content-Type: application/json
{
"userGUID": "string",
"email": "string",
"otp": "string"
}
Verify Email OTP and Generate Token
POST /shopfront/api/v2/login/email/verifyotp/generatetoken
Content-Type: application/json
{
"userGUID": "string",
"email": "string",
"otp": "string",
"includeRefreshToken": true
}
Login with Email
POST /shopfront/api/v2/login/email
Content-Type: application/json
{
"email": "string",
"password": "string",
"userGUID": "string"
}
Login with Email and Generate Token
POST /shopfront/api/v2/login/email/generatetoken
Content-Type: application/json
{
"email": "string",
"password": "string",
"userGUID": "string",
"rememberMe": true,
"includeRefreshToken": true
}
User Registration
Register User
POST /shopfront/api/v2/user/register
Content-Type: application/json
{
"email": "string",
"password": "string",
"fullName": "string",
"phoneNumber": "string"
}
Token Management
Refresh Token
POST /shopfront/api/v1/token/refresh
Content-Type: application/json
{
"token": "string",
"refreshToken": "string"
}
Response:
{
"token": "string",
"refreshToken": "string"
}
Product Endpoints
Get Products
POST /shopfront/api/v2/products
Content-Type: application/json
{
"page": 1,
"limit": 20,
"filter": {
"category": "string",
"brand": "string",
"zones": [],
"price": {
"gte": 0,
"lte": 1000
}
},
"sort": {
"field": "price-desc"
}
}
Response:
{
"products": [
{
"productId": 123,
"name": "Product Name",
"prices": {
"price": 1000,
"mrp": 1200
},
"images": [],
"variations": []
}
],
"total": 100
}
Search Products
POST /shopfront/api/v2/products/search
Content-Type: application/json
{
"searchText": "search term",
"zoneIds": []
}
Get Product by ID
GET /shopfront/api/v2/products/{id}
Returns full product details.
Category Endpoints
Get Categories
POST /shopfront/api/v2/categories
Content-Type: application/json
{
"query": "string",
"categoryIds": []
}
Response:
[
{
"categoryId": 123,
"name": "Category Name",
"slug": "category-slug",
"description": "Category description"
}
]
Get Category Menus
GET /shopfront/api/v2/categories/menus?pincode={pincode}
Returns category menu structure.
Get Category by ID
GET /shopfront/api/v2/categories/{id}
Brand Endpoints
Get Brands
POST /shopfront/api/v2/brands
Content-Type: application/json
{}
Response:
[
{
"id": 123,
"name": "Brand Name",
"slug": "brand-slug"
}
]
Get Brand by ID
GET /shopfront/api/v2/brands/{id}
Cart Endpoints
Create Cart
POST /shopfront/api/v2/carts
Content-Type: application/json
Authorization: Bearer {token}
{
"zones": []
}
Response:
{
"cartId": "string"
}
Get Cart
GET /shopfront/api/v2/carts/{cartId}
Authorization: Bearer {token}
Delete Cart
DELETE /shopfront/api/v2/carts/{cartId}
Get Cart Quantity
GET /shopfront/api/v2/carts/{cartId}/quantity
Authorization: Bearer {token}
Get Cart Quantity by User
GET /shopfront/api/v2/carts/quantity/{userGUID}
Add to Cart
POST /shopfront/api/v2/carts/{cartId}/items
Content-Type: application/json
Authorization: Bearer {token}
{
"productId": 123,
"variantId": 456,
"quantity": 1
}
Update Cart Item
PUT /shopfront/api/v2/carts/{cartId}/items/{itemId}
Content-Type: application/json
Authorization: Bearer {token}
{
"quantity": 3
}
Remove from Cart
DELETE /shopfront/api/v2/carts/{cartId}/items/{itemId}
Authorization: Bearer {token}
Apply Coupon
POST /shopfront/api/v2/carts/{cartId}/coupon
Content-Type: application/json
{
"couponCode": "string"
}
Remove Coupon
DELETE /shopfront/api/v2/carts/{cartId}/coupon
Checkout Endpoints
Create Checkout
POST /shopfront/api/v2/checkouts
Content-Type: application/json
Authorization: Bearer {token}
{
"cartId": "string"
}
Response:
{
"checkoutId": "string",
"checkoutToken": "string"
}
Get Checkout
GET /shopfront/api/v2/checkouts/{checkoutToken}
Authorization: Bearer {token}
Update Shipping Address
PUT /shopfront/api/v2/checkouts/{checkoutToken}/shipping-address
Content-Type: application/json
Authorization: Bearer {token}
{
"firstName": "string",
"lastName": "string",
"address1": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string",
"phone": "string"
}
Update Billing Address
PUT /shopfront/api/v2/checkouts/{checkoutToken}/billing-address
Content-Type: application/json
Authorization: Bearer {token}
{
"firstName": "string",
"lastName": "string",
"address1": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string",
"phone": "string"
}
Update Shipping Method
PUT /shopfront/api/v2/checkouts/{checkoutToken}/shipping-method
Content-Type: application/json
Authorization: Bearer {token}
{
"shippingMethodId": 123
}
Get Shipping Methods
GET /shopfront/api/v2/checkouts/{checkoutToken}/shipping-methods
Authorization: Bearer {token}
Get Payment Methods
GET /shopfront/api/v2/checkouts/{checkoutToken}/payment-methods
Authorization: Bearer {token}
Response:
[
{
"id": 123,
"name": "Payment Method",
"type": "cod",
"isAvailable": true,
"configuration": "{}"
}
]
Update Payment Method
PUT /shopfront/api/v2/checkouts/{checkoutToken}/payment-method
Content-Type: application/json
Authorization: Bearer {token}
{
"paymentMethodId": 123
}
Get Discount Codes
GET /shopfront/api/v2/checkouts/{checkoutToken}/discount-codes
Content-Type: application/json
Authorization: Bearer {token}
{
"userId": "string"
}
Apply Discount Code
POST /shopfront/api/v2/checkouts/{checkoutToken}/discount-codes
Content-Type: application/json
Authorization: Bearer {token}
{
"discountCode": "string"
}
Remove Discount Code
DELETE /shopfront/api/v2/checkouts/{checkoutToken}/discount-codes
Authorization: Bearer {token}
Update Checkout Note
PUT /shopfront/api/v2/checkouts/{checkoutToken}/note
Content-Type: application/json
Authorization: Bearer {token}
{
"note": "string"
}
Complete Checkout
POST /shopfront/api/v2/checkouts/{checkoutToken}/complete
Content-Type: application/json
X-CHECKOUT-SIGNATURE: {hmac-signature}
Authorization: Bearer {token}
{
"paymentId": "string",
"paymentSignature": "string"
}
Response:
{
"orderId": 123,
"orderNumber": "ORD-001"
}
Coupon Endpoints
Query Coupons
POST /shopfront/api/v2/coupons
Content-Type: application/json
{
"query": "string"
}
Widget Endpoints
Get Widgets
POST /shopfront/api/v2/widgets?section={section}&status={status}&type={type}
Content-Type: application/json
{}
Response:
{
"widgets": [
{
"id": "string",
"type": "string",
"section": "string",
"settings": {},
"data": {}
}
]
}
Get Widget by ID
GET /shopfront/api/v2/widgets/{id}
Get Page Widgets
POST /shopfront/api/v2/pages/{pageId}/widgets
Content-Type: application/json
{}
Get Page Section Widgets
POST /shopfront/api/v2/pages/{pageId}/sections/{section}/widgets
Content-Type: application/json
{}
Menu Endpoints
Get All Menus
GET /shopfront/api/v2/menus
Response:
[
{
"id": 123,
"name": "Main Menu",
"items": []
}
]
Get Menu by ID
POST /shopfront/api/v2/menus/{id}
Content-Type: application/json
{
"zones": []
}
Delivery Zone Endpoints
Get Delivery Zone Cities
GET /shopfront/api/v2/deliveryzones/cities
Get Zone by Zipcode
GET /shopfront/api/v2/deliveryzones/zipcodes/{zipcode}
Search Zipcodes
GET /shopfront/api/v2/deliveryzones/zipcodes/search/{query}
Get Zone by ID
GET /shopfront/api/v2/deliveryzones/{zoneId}
Account Endpoints
All account endpoints require Authorization: Bearer {token} header.
Profile
Get Profile
GET /shopfront/api/v2/account/profile
Authorization: Bearer {token}
Update Profile
PUT /shopfront/api/v2/account/profile
Content-Type: application/json
Authorization: Bearer {token}
{
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string"
}
Addresses
Get Addresses
GET /shopfront/api/v2/account/addresses
Authorization: Bearer {token}
Create Address
POST /shopfront/api/v2/account/addresses
Content-Type: application/json
Authorization: Bearer {token}
{
"firstName": "string",
"lastName": "string",
"address1": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string",
"phone": "string"
}
Update Address
PUT /shopfront/api/v2/account/addresses/{addressId}
Content-Type: application/json
Authorization: Bearer {token}
{
"firstName": "string",
"lastName": "string",
"address1": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string",
"phone": "string"
}
Delete Address
DELETE /shopfront/api/v2/account/addresses/{addressId}
Authorization: Bearer {token}
Set Default Address
PUT /shopfront/api/v2/account/addresses/{addressId}/set-default?addressType={type}
Authorization: Bearer {token}
Orders
Get Orders
GET /shopfront/api/v2/account/orders?pageNumber={page}&pageSize={size}
Authorization: Bearer {token}
Get Order by ID
GET /shopfront/api/v2/account/orders/{orderId}
Authorization: Bearer {token}
Track Order
GET /shopfront/api/v2/account/orders/{orderId}/track
Authorization: Bearer {token}
Get Return Orders
GET /shopfront/api/v2/account/returns?pageNumber={page}&pageSize={size}
Authorization: Bearer {token}
Loyalty Points
Get Loyalty Points
GET /shopfront/api/v2/account/loyalty-points
Authorization: Bearer {token}
Get Loyalty Points History
GET /shopfront/api/v2/account/loyalty-points/history?pageNumber={page}&pageSize={size}
Authorization: Bearer {token}
Get Loyalty Points Redemption History
GET /shopfront/api/v2/account/loyalty-points/redemption-history?pageNumber={page}&pageSize={size}
Authorization: Bearer {token}
Store Credit
Get Store Credit
GET /shopfront/api/v2/account/store-credit
Authorization: Bearer {token}
Wishlist
Get Wishlist
GET /shopfront/api/v2/account/wishlist?pageNumber={page}&pageSize={size}
Authorization: Bearer {token}
Add to Wishlist
POST /shopfront/api/v2/account/wishlist/items
Content-Type: application/json
Authorization: Bearer {token}
{
"productId": 123,
"quantity": 1,
"description": "string"
}
Update Wishlist Item
PUT /shopfront/api/v2/account/wishlist/items/{itemId}
Content-Type: application/json
Authorization: Bearer {token}
{
"quantity": 2
}
Delete Wishlist Item
DELETE /shopfront/api/v2/account/wishlist/items/{itemId}
Authorization: Bearer {token}
Subscriptions
Get Subscriptions
GET /shopfront/api/v2/account/subscriptions?pageNumber={page}&pageSize={size}
Authorization: Bearer {token}
Get Subscription by ID
GET /shopfront/api/v2/account/subscriptions/{subscriptionId}
Authorization: Bearer {token}
Pause Subscription
PUT /shopfront/api/v2/account/subscriptions/{subscriptionId}/pause
Authorization: Bearer {token}
Resume Subscription
PUT /shopfront/api/v2/account/subscriptions/{subscriptionId}/resume
Authorization: Bearer {token}
Account Management
Request Account Deletion
POST /shopfront/api/v2/account/delete-request
Content-Type: application/json
Authorization: Bearer {token}
{
"reason": "string"
}
Utility Endpoints
Resolve Slug
GET /shopfront/api/v1/resolve-slug/{slug}
Returns slug type and ID:
{
"type": "product|category|brand|page|newsitem|newscategory|vendor|notfound",
"id": "string",
"slug": "string"
}
News Items
Get News Items
POST /shopfront/api/v2/news/items
Content-Type: application/json
{
"categoryId": 123,
"numberOfProducts": 10,
"orderBy": "string",
"featuredOnly": true
}
Get News Item by ID
GET /shopfront/api/v2/news/items/{id}
Get News Category by ID
GET /shopfront/api/v2/news/categories/{id}
Push Notifications
Save Push Token
POST /shopfront/api/v2/push/token
Content-Type: application/json
{
"token": "string",
"userGUID": "string",
"provider": "string"
}
Error Responses
All endpoints return standard error format:
{
"error": "Error message",
"code": "ERROR_CODE",
"details": {}
}
Common Status Codes
- 200 OK: Request successful
- 400 Bad Request: Invalid request
- 401 Unauthorized: Authentication required
- 403 Forbidden: Access denied
- 404 Not Found: Resource not found
- 429 Too Many Requests: Rate limit exceeded
- 500 Server Error: Internal server error
Pagination
List endpoints support pagination:
{
"page": 1,
"pageSize": 20,
"total": 100,
"totalPages": 5
}
Filtering
Product endpoints support filtering:
{
"filter": {
"category": "string",
"brand": "string",
"zones": [],
"price": {
"gte": 100,
"lte": 1000
}
}
}
Sorting
Product endpoints support sorting:
{
"sort": {
"field": "price-desc|new-desc|best-selling|featured|avg-rating|popularity|default"
}
}
Next Steps
- Authentication - Learn authentication
- Examples - See usage examples
- Overview - API overview