Get Product by ID
Get detailed information about a specific product and all its variants.
Endpoint
GET /v1/products/delivery-partners/{dpID}/{productID}
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 |
productID | String | Product identifier | ✅ Yes |
Product IDs follow the pattern: PROD-{UUID} (e.g., PROD-cd250a2a-2b27-40e0)
Example Request
curl --location 'https://stage-platform-exlr8.exlr8now.com/v1/products/delivery-partners/YOUR_DP_ID/PROD-cd250a2a-2b27-40e0' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-client-secret: YOUR_CLIENT_SECRET'
Response
Successful Response
{
"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
}
]
}
In the example above, the 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. If the product currency matches your selected wallet currency, no FX conversion is applied, and convertedSellingPrice equals the price.
Response Fields
Product Information
| 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 Details Usage
This endpoint is ideal for:
1. Product Detail Pages
Show comprehensive product information to customers before purchase.
2. Variant Selection
Display all available denominations/variants for a product.
3. Pricing Information
Get current pricing for specific products.
Integration Example
// Example: Create product detail page
async function getProductDetails(productID) {
try {
const response = await fetch(
`${baseUrl}/products/delivery-partners/${dpID}/${productID}`,
{
headers: {
"x-client-id": clientId,
"x-client-secret": clientSecret,
},
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(`${error.errCode}: ${error.error}`);
}
const product = await response.json();
// Format for display
return {
...product,
formattedVariants: product.variants.map((variant) => ({
...variant,
displayPrice: `₹${variant.price.toLocaleString()}`,
originalPrice:
variant.mrp > 0 ? `₹${variant.mrp.toLocaleString()}` : null,
discount:
variant.mrp > variant.price
? Math.round(((variant.mrp - variant.price) / variant.mrp) * 100)
: 0,
})),
categoryNames: product.categories
.map((cat) => cat.categoryName)
.join(", "),
};
} catch (error) {
console.error("Error fetching product details:", error);
throw error;
}
}
Error Responses
Product Not Found
{
"error": "product not found for dpID: YOUR_DP_ID, productID: PRODUCT_ID",
"errCode": "RECORD_NOT_FOUND"
}
Unauthorized Access
{
"error": "unauthenticated",
"errCode": "UNAUTHORIZED"
}
Access Denied
{
"error": "forbidden: param: admin user does not have access to DP: INVALID_DP_ID",
"errCode": "FORBIDDEN"
}
Best Practices
- Cache Product Details: Product information changes infrequently
- Handle Missing Images: Gracefully handle products without attachments
- Display Variants Clearly: Show all available denominations/options
- Format Pricing: Present pricing in user-friendly formats
- Show Redemption Info: Clearly display how customers can use the product
Use Cases
1. Product Comparison
Compare different variants of the same product.
2. Customer Education
Show detailed product information and redemption instructions.
3. Inventory Planning
Understand available variants for inventory planning.
Related Endpoints
- Get Available Products - Browse all products
- Place Order - Order specific variants