Get Available Products
Retrieve a list of products and variants available for ordering, with pagination support.
Endpoint
GET /v1/products/delivery-partners/{dpID}
Headers
| Header | Type | Description | Required |
|---|---|---|---|
x-client-id | String | Your clientID | ✅ Yes |
x-client-secret | String | Your clientSecret | ✅ Yes |
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
dpID | String | Your delivery partner ID | ✅ Yes |
Query Parameters
| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
nextCursor | String | Pagination cursor for next page | ❌ No | - |
limit | Integer | Number of records per page | ❌ No | 15 |
Pagination Limits
- Default limit: 15 records per page
- Maximum limit: 100 records per page
Example Request
Get All Products (First Page)
curl --location 'https://stage-platform-exlr8.exlr8now.com/v1/products/delivery-partners/YOUR_DP_ID' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-client-secret: YOUR_CLIENT_SECRET'
Get Products with Pagination
curl --location 'https://stage-platform-exlr8.exlr8now.com/v1/products/delivery-partners/YOUR_DP_ID' \
--data-urlencode 'limit={limit}' \
--data-urlencode 'nextCursor={nextCursor}' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-client-secret: YOUR_CLIENT_SECRET'
Response
Successful Response
{
"products": [
{
"productID": "PROD-cd250a2a-2b27-40e0",
"attachments": [
"https://storage.googleapis.com/stage-platform-exlr8-public/assets/exlr8/products/0e6fffdd-67e7-41f1-bf87-12adc597d4cb/images/products/default_voucher.jpg"
],
"currency": "AED",
"applicableCountries": ["AE"],
"categories": [
{
"categoryID": "CAT-e0bc01c8-a9b2-4d3a",
"categoryName": "Gaming"
}
],
"descriptionText": "Get this voucher for instant savings on your next purchase. Simply redeem it at the time of checkout to apply the discount. It's the perfect way to make your money go further",
"productDisplayName": "TEST_PRODUCT_1_DP_APIS",
"productName": "TEST_PRODUCT_1_DP_APIS",
"redemptionInstructions": "To redeem your voucher, follow these steps:\n\nClick on the unique redemption URL provided in your email or on the voucher page.\n\nAdd your desired products to the cart on the partner's website.\n\nThe discount will be automatically applied at checkout, or you may need to enter a unique code found on your voucher.\n\nComplete your purchase and enjoy your savings!",
"termsAndConditions": "This voucher is valid for one-time use only. 2. It cannot be combined with any other offers, discounts, or promotions. 3. This voucher is non-refundable and cannot be exchanged for cash. 4. The voucher is valid until its stated expiration date. 5. Lost, stolen, or damaged vouchers will not be replaced. 6. The merchant reserves the right to modify these terms and conditions at any time without prior notice",
"variants": [
{
"variantID": "VAR-23c2a475-06cb-4118",
"variantName": "TEST_PRODUCT_1_DP_APIS INR 100",
"variantDisplayName": "₹ 100",
"mrp": 100,
"price": 99,
"margin": 1,
"stock": 10000,
"convertedSellingPrice": 2423.9556
}
]
},
{
"productID": "PROD-cf51c24f-425a-463b",
"attachments": [
"https://storage.googleapis.com/stage-platform-exlr8-public/assets/exlr8/products/0e6fffdd-67e7-41f1-bf87-12adc597d4cb/images/products/default_voucher.jpg"
],
"currency": "INR",
"applicableCountries": ["IN", "SG", "US", "AE"],
"categories": [
{
"categoryID": "CAT-e0bc01c8-a9b2-4d3a",
"categoryName": "Gaming"
}
],
"descriptionText": "Get this voucher for instant savings on your next purchase. Simply redeem it at the time of checkout to apply the discount. It's the perfect way to make your money go further",
"productDisplayName": "TEST_PRODUCT_2_DP_APIS",
"productName": "TEST_PRODUCT_2_DP_APIS",
"redemptionInstructions": "To redeem your voucher, follow these steps:\n\nClick on the unique redemption URL provided in your email or on the voucher page.\n\nAdd your desired products to the cart on the partner's website.\n\nThe discount will be automatically applied at checkout, or you may need to enter a unique code found on your voucher.\n\nComplete your purchase and enjoy your savings!",
"termsAndConditions": "This voucher is valid for one-time use only. 2. It cannot be combined with any other offers, discounts, or promotions. 3. This voucher is non-refundable and cannot be exchanged for cash. 4. The voucher is valid until its stated expiration date. 5. Lost, stolen, or damaged vouchers will not be replaced. 6. The merchant reserves the right to modify these terms and conditions at any time without prior notice",
"variants": [
{
"variantID": "VAR-3455a0e1-47c8-4e6f",
"variantName": "TEST_PRODUCT_2_DP_APIS INR 100",
"variantDisplayName": "₹ 100",
"mrp": 100,
"price": 99,
"margin": 1,
"stock": 10000,
"convertedSellingPrice": 99
}
]
}
],
"paginationInfo": {
"nextCursor": "",
"hasMore": false
}
}
Currency Conversion
In the example above, the first product is in AED currency, so its convertedSellingPrice (2423.9556) is calculated using the current FX rate from AED to INR (your selected wallet currency), including any applicable markup percentage and amount. The second product is already in INR, so no FX conversion is applied, and convertedSellingPrice equals the price (99).
Response Fields
Product Fields
| Field | Type | Description |
|---|---|---|
productID | String | Unique product identifier |
productName | String | Internal product name |
productDisplayName | String | Display name for customers |
descriptionText | String | Product description |
redemptionInstructions | String | How to redeem the product |
termsAndConditions | String | Terms and conditions |
attachments | Array | Product images and assets |
categories | Array | Product categories |
currency | String | Product currency |
applicableCountries | Array | The list of countries the product is available in |
variants | Array | Available product variants |
Variant Fields
| Field | Type | Description |
|---|---|---|
variantID | String | Unique variant identifier |
variantName | String | Internal variant name |
variantDisplayName | String | Display name for customers |
mrp | Number | Maximum retail price in product currency |
price | Number | Your cost price in product currency |
margin | Number | Margin percentage |
stock | Number | Available stock quantity |
convertedSellingPrice | Number | Converted selling price in DP selected wallet currency |
Category Fields
| Field | Type | Description |
|---|---|---|
categoryID | String | Category identifier |
categoryName | String | Category display name |
Product Categories
Common product categories include:
- Entertainment & Gaming
- Software & Technology
- E-commerce & Retail
- Food & Beverage
- Travel & Transportation
- Telecommunications
Pagination Example
// Example: Fetch all products
async function getAllProducts() {
let allProducts = [];
let nextCursor = null;
do {
const url = nextCursor
? `${baseUrl}/products/delivery-partners/${dpID}?nextCursor=${nextCursor}&limit=100`
: `${baseUrl}/products/delivery-partners/${dpID}?limit=100`;
const response = await fetch(url, {
headers: {
"x-client-id": clientId,
"x-client-secret": clientSecret,
},
});
const data = await response.json();
allProducts.push(...data.products);
nextCursor = data.paginationInfo.hasMore
? data.paginationInfo.nextCursor
: null;
} while (nextCursor);
return allProducts;
}
Error Responses
Unauthorized Access
{
"error": "unauthenticated",
"errCode": "UNAUTHORIZED"
}
Invalid DP ID
{
"error": "forbidden: param: admin user does not have access to DP: INVALID_DP_ID",
"errCode": "FORBIDDEN"
}
Use Cases
1. Product Catalog Display
Show available products to your customers with pricing and descriptions.
2. Inventory Management
Track which products and variants are available for ordering.
3. Price Comparison
Compare pricing across different variants and products.
4. Category Browsing
Allow customers to browse products by category.
Best Practices
- Cache Product Data: Products don't change frequently, so implement caching
- Use Pagination: Fetch products in manageable chunks
- Handle Images: Properly display product attachments/images
- Filter by Category: Allow users to filter by product categories
- Show Availability: Display real-time availability information
Integration Example
// Example: Build product catalog
async function buildProductCatalog() {
const products = await getAllProducts();
// Group by categories
const catalog = {};
products.forEach((product) => {
product.categories.forEach((category) => {
if (!catalog[category.categoryName]) {
catalog[category.categoryName] = [];
}
catalog[category.categoryName].push({
...product,
variants: product.variants.map((variant) => ({
...variant,
displayPrice: `₹${variant.price}`,
savings:
variant.mrp > variant.price ? variant.mrp - variant.price : 0,
})),
});
});
});
return catalog;
}
Related Endpoints
- Get Product by ID - Get specific product details
- Place Order - Order products using variant IDs