Integration Points
Product Catalogue APIs

📚 Product Index / Catalogue API(s)

Overview: Partners wishing to implement Online Pricing must integrate with three critical APIs that manage the product catalogues effectively. These APIs provide the means to access a comprehensive list of brands, detailed product information by brand and category, and specific product variations such as model and capacity.

getAvailableBrands

Purpose: This API fetches a list of all available brands within the specified category, enabling the frontend systems to present these options to the user.

Response Example:

{
    "success": true,
    "data": {
        "smartphone": [
            "Alcatel",
            "Apple",
            "Asus",
            ...
            "Xiaomi",
            "Zte"
        ]
    },
    "message": ""
}

Usage: This endpoint should be used to populate the brand selection interface on client devices, facilitating user navigation through available trade-in options.

getProductsByBrand

Purpose: Retrieves a list of products based on the selected brand and category. This API is crucial for displaying specific models available for trade-in under a selected brand.

Sample Request:

{
    "brand": "Apple"
}
 

Response Example:

{
    "success": true,
    "data": {
        "products": [
            {
                "name": "Apple iPhone 15 Plus",
                "model": "iPhone 15 Plus",
                "id": "afa7c3dd-54a8-49c2-8739-525c8020428e"
            },
            ...
            {
                "name": "Apple iPhone 8 Plus",
                "model": "iPhone 8 Plus",
                "id": "2e6e599c-5f9d-4acd-a8d4-3983c4acb86e"
            }
        ]
    },
    "message": ""
}

Usage: Utilize this API to fetch and display the specific models of devices available under each brand, aiding users in selecting the exact device they wish to trade in.

getProductVariations

Purpose: Provides detailed variations of a specific product model, including capacity and unique identifiers. This data is essential for accurately pricing based on specific product configurations.

Sample Request:

{
  "productId": "7a8d1e86-78b0-44d4-9208-d638f06d73b4"
}

Response Example:

{
   "success": true,
   "data": [
       {
           "name": "Apple iPhone 15 Pro",
           "model": "iPhone 15 Pro",
           "capacity": "128GB",
           "external_product_id": "GPV00221356",
           "status": "active",
           "category": "smartphone"
       },
       ...
       {
           "name": "Apple iPhone 15 Pro",
           "model": "iPhone 15 Pro",
           "capacity": "512GB",
           "external_product_id": "GPV00221359",
           "status": "active",
           "category": "smartphone"
       }
   ],
   "message": ""
}

Usage: This API should be called when a specific model is selected by the user to provide detailed options such as different storage capacities, enhancing the precision of the pricing and trade-in process.