thelia/product-api-module

An API to get thelia product from reference.

Installs: 251

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 7

Forks: 1

Open Issues: 0

Type:thelia-module

2.0.1 2023-08-01 07:24 UTC

This package is auto-updated.

Last update: 2024-10-30 01:31:57 UTC


README

An API to get product from thelia based website with only the product's reference.

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is ProductAPI.
  • Activate it in your thelia administration panel

Usage

You can get product's information in JSON by calling the url : /api/product.

You have to add hash (in SHA1) of the parameters and the api key, to your request.

Generate your hash like this : [parameters][API KEY].

Exemple

To get a product that has a reference of '130010' and your API key is 'ExRtVQjUCCBApuN4s4fPEQ6i5yggYvm2', you have to generate your hash like this :

  • 130010ExRtVQjUCCBApuN4s4fPEQ6i5yggYvm2 => 11dff8469f6f751b03c0e20c0c132c20fd3141f3

Then you call the API like this :

  • /api/product?ref=130010&hash=11dff8469f6f751b03c0e20c0c132c20fd3141f3

If a product with this ref exists and your hash is correct, the API should give you all product's informations in JSON

Input arguments

Arguments in bold are required. Arguments in italic are optionals.