Skip to main content

Show Product Details

The API endpoint allows users to retrieve detailed about a specific product, including its name, description, price, images, and other relevant data. This endpoint is typically used to display product details on an e-commerce website or mobile app.

  • Endpoint: api/customer/products/{product_slug}/slug

  • Http Method: GET

  • URL Parameters:

    • product_slug (string): The unique identifier for the product. should to be the slug value associated with the variant product you want to retrieve.
  • Success Response:

tip

If an item's discount is not applied to your selected payment method, it means that the discount is not valid or applicable for the chosen payment method. with the payment_methods_discount_name_en and payment_methods_discount_name_ar fields, you can get the name of the payment method discount in English and Arabic.

  • Success Response:
KeyTypeDescription
productsArrayAn array of details of product.
similar_productsArrayAn array of similar products.
Product Details Resource

You can check more details about Products Resource.

{
"code": 200,
"message": "Success",
"data": {
"product": {
"id": 2253,
"brand": {
"id": 37,
"name": "Honor",
"name_ar": "هونر",
"name_en": null,
"image": "https://etisal-storeapi.supercommerce.io/storage/uploads/gn2Ajs-1615981987.png"
},
"parent_id": null,
"sku": "main_Honor_X9a",
"slug": "Honor-X9a",
"name": "Honor X9a",
"name_en": "Honor X9a",
"name_ar": "هونر X9a",
"image": "https://docapi.supercommerce.io/storage/uploads/1-honor-x9a-8gb-256gb-midnight-black-1689769189.webp",
"price": 16777,
"discount_price": 16499,
"direct_discount": true,
"category": {
"id": 1081,
"name": "Mobiles",
"name_ar": "موبايل",
"slug": "mobiles",
"sub_categories": [
{
"id": 1089,
"name": "Honor",
"name_ar": "هونر",
"slug": "honor"
}
]
},
"type": 1,
"product_variants_options": [
{
"option": {
"id": 122,
"name": "Color",
"name_ar": "اللون",
"name_en": "Color",
"description": null,
"type": "4",
"preview_type": 1,
"default": false,
"order": 10
},
"values": [
{
"id": 107,
"name": "Black",
"image": "https://docapi.supercommerce.io/storage/uploads/1-honor-x9a-8gb-256gb-midnight-black-1689769205.webp",
"color_code": "#000000"
},
{
"id": 116,
"name": "Green",
"image": "https://docapi.supercommerce.io/storage/uploads/1-honor-x9a-8gb-256gb-emereld-green-1689773008.webp",
"color_code": "#00FF00"
},

"id": 108,
"name": "Silver",
"image": "https://docapi.supercommerce.io/storage/uploads/1-honor-x9a-8gb-256gb-titanuim-silver-1689773164.webp",
"color_code": "#C0C0C0"
}
]
}
],
"product_variants": [
{
"id": 2254,
"name": "Honor X9a 8GB RAM 256GB - Midnight Black",
"slug": "honor-x9a-black",
"share_link": "https://doc.supercommerce.io/en/honor-x9a-black",
"name_en": "Honor X9a 8GB RAM 256GB - Midnight Black",
"name_ar": "هونر X9a رام 8 جيجا بايت - مساحة 256 جيجا بايت - اسود",
"sku": "5109ANPY",
"barcode": null,
"price": 16777,
"discount_price": 16499,
"stock": 10,
"image": "https://docapi.supercommerce.io/storage/uploads/1-honor-x9a-8gb-256gb-midnight-black-1689769189.webp",
"parent_id": 2253,
}
],
"active": true,
//...
},
"similar_products": [
{
"id": 1064,
"parent_id": 1063,
"sku": "A1611H21",
"name": "Anker 622 Magnetic Battery Wireless portable Charger (MagGo), white",
"name_en": "Anker 622 Magnetic Battery Wireless portable Charger (MagGo), white",
"name_ar": "Anker 622 Magnetic Battery Wireless portable Charger (MagGo), white",
//...
}
]
},
"meta": []
}
  • Failure Response:
{
"code": 400,
"message": "Product not available",
"errors": {
"errorMessage": "Invalid data",
"errorDetails": ""
}
}
info

Check the following section to learn more about the Show Product Details By Slug API Reference

Item Exists

The API endpoint allows users to check if a product exists in the store. This endpoint is typically used to check if a product exists in the store before adding it to the cart.

  • Endpoint: api/customer/item/{slug}/exist

  • Http Method: GET

  • URL Parameters:

    • slug (string): The unique identifier for the product. should to be the slug value associated with the variant product you want to retrieve.
  • Success Response:

KeyTypeDescription
typeIntegerThe type of the item. Types
  • (1): the item is product
item_idIntegerThe ID of the item.
parent_idIntegerThe ID of the parent item.
{
"code": 200,
"message": "Success",
"data": {
"type": 1,
"item_id": 2254,
"parent_id": 2253
},
"meta": []
}
  • Failure Response:
{
"code": 400,
"message": "Product not available",
"errors": {
"errorMessage": "Invalid data",
"errorDetails": ""
}
}
info

Check the following section to learn more about the Item Exists API Reference