Skip to main content

Get Available Products

Retrieve a list of products and variants available for ordering, with pagination support.

Endpoint

GET /v1/products/delivery-partners/{dpID}

Headers

HeaderTypeDescriptionRequired
x-client-idStringYour clientID✅ Yes
x-client-secretStringYour clientSecret✅ Yes

Path Parameters

ParameterTypeDescriptionRequired
dpIDStringYour delivery partner ID✅ Yes

Query Parameters

ParameterTypeDescriptionRequiredDefault
nextCursorStringPagination cursor for next page❌ No-
limitIntegerNumber of records per page❌ No15
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

FieldTypeDescription
productIDStringUnique product identifier
productNameStringInternal product name
productDisplayNameStringDisplay name for customers
descriptionTextStringProduct description
redemptionInstructionsStringHow to redeem the product
termsAndConditionsStringTerms and conditions
attachmentsArrayProduct images and assets
categoriesArrayProduct categories
currencyStringProduct currency
applicableCountriesArrayThe list of countries the product is available in
variantsArrayAvailable product variants

Variant Fields

FieldTypeDescription
variantIDStringUnique variant identifier
variantNameStringInternal variant name
variantDisplayNameStringDisplay name for customers
mrpNumberMaximum retail price in product currency
priceNumberYour cost price in product currency
marginNumberMargin percentage
stockNumberAvailable stock quantity
convertedSellingPriceNumberConverted selling price in DP selected wallet currency

Category Fields

FieldTypeDescription
categoryIDStringCategory identifier
categoryNameStringCategory 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

  1. Cache Product Data: Products don't change frequently, so implement caching
  2. Use Pagination: Fetch products in manageable chunks
  3. Handle Images: Properly display product attachments/images
  4. Filter by Category: Allow users to filter by product categories
  5. 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;
}