انتقل إلى المحتوى الرئيسي

Compare

The My Compare Items API allows users to compare multiple products within your application. This endpoint enables users to add, remove, or retrieve the products they have added for comparison. By utilizing this API, users can easily analyze and compare different features or attributes of the products they are interested in.

Get My Compare Products

Retrieve My Compare API allows users to retrieve their compare products.

  • Endpoint: api/customer/products/comparisons

  • Http Method: GET

  • Success Response:

Products Resource

You can check more details about Products Resource.

{
"code": 200,
"message": "Success",
"data": [
{
"id": 90396,
"parent_id": 90395,
"sku": "OF 2004_Brown",
"name": "Omknee 2 Brown",
"name_en": "Omknee 2 Brown",
"name_ar": "أومني 2 بني",
// ...
}
]
}
معلومات

Check the following section to learn more about the Get My Compare Products API Reference

Add Product to My Compare

Add My Compare API allows users to add their compare products.

  • Endpoint: api/customer/products/set_compare/{product_id}

  • Http Method: POST

  • Url Parameters:

    • product_id (required): The unique identifier of the product.
  • Success Response:

Products Resource

You can check more details about Products Resource.

{
"code": 200,
"message": "Success",
"data": [
{
"id": 90396,
"parent_id": 90395,
"sku": "OF 2004_Brown",
"name": "Omknee 2 Brown",
"name_en": "Omknee 2 Brown",
"name_ar": "أومني 2 بني",
// ...
}
]
}
معلومات

Check the following section to learn more about the Add item to Compare API Reference

Add Bulk Product to Compare

Add My Compare API allows users to add their compare multiple products.

  • Endpoint: api/customer/products/set_products_compare

  • Http Method: POST

  • Request Body:

    • product_ids: An array of product ids.
{
"product_ids": [90396, 90397, 90398]
}
  • Success Response:
Products Resource

You can check more details about Products Resource.

{
"code": 200,
"message": "Success",
"data": [
{
"id": 90396,
"parent_id": 90395,
"sku": "OF 2004_Brown",
"name": "Omknee 2 Brown",
"name_en": "Omknee 2 Brown",
"name_ar": "أومني 2 بني",
// ...
}
]
}
معلومات

Check the following section to learn more about the Add Bulk Product to Compare API Reference

Remove Product From Compare

This endpoint enables users to remove specific products from their compare list.

  • Endpoint: api/customer/products/remove_compare/{product_id}

  • Http Method: POST

  • Url Parameters:

    • product_id (required): The unique identifier of the product.
  • Success Response:

Products Resource

You can check more details about Products Resource.

{
"code": 200,
"message": "Success",
"data": [
{
"id": 90396,
"parent_id": 90395,
"sku": "OF 2004_Brown",
"name": "Omknee 2 Brown",
"name_en": "Omknee 2 Brown",
"name_ar": "أومني 2 بني",
// ...
}
]
}
معلومات

Check the following section to learn more about the Remove Product From Compare API Reference

Remove bulk Product from compare list

This endpoint enables users to remove specific products from their compare list.

  • Endpoint: api/customer/products/remove_products_compare

  • Http Method: POST

  • Success Response:

Products Resource

You can check more details about Products Resource.

{
"code": 200,
"message": "Success",
"data": null,
"meta": []
}
معلومات

Check the following section to learn more about the Remove bulk Product from compare API Reference