This is a web API for Sniffie. It accepts requests in GET or POST formats and returns data in the specified format. All requests are logged and are available for viewing at your account page.

Sniffie web API returns up to 10.000 rows at a time. Results are always delivered in the order from the earliest to the latest unless otherwise specified.

Allowed poll rate - 60 requests per minute. All requests are logged and history is available for viewing in your Sniffie account settings. If you have restricted IP address to you API, requests from any other IP will not be allowed.

An up-to-date documentation is available at: https://support.sniffie.fi/product-api-product-feed/

## Common parameters: ##

* products - fetches the latest matched product information
* k - unique API identifier key, 128 characters long. The key is generated at the time of API link creation. Each API identifier is unique.
* format - specifies the data format, defaults to json. currently supports json, html, xml
* type - specifies data output type. Accepts list and matrix, defaults to list.
* limitC - limits the number of rows processed from product catalogue. Minimum value 0, maximum value 10000. Defaults to 1000.
* offsetC - specifies the starting index of product catalogue results. Minimum value 0. No maximum value (if over the number of possible results, no rows are returned). Defaults to 0.
* limitH - limits the number of rows processed from product history. Minimum value 0, maximum value 10000. Defaults to 1000.
* offsetH - specifies the starting index of product history results. Minimum value 0. No maximum value (if over the number of possible results, no rows are returned). Defaults to 0.
* from - specifies the starting date. Defaults to none (gets the latest data up to the request time). Format YYYY-MM-DD.
* to - specifies the ending date. Defaults to none (gets the latest data up to the request time). Format YYYY-MM-DD.
* history - fetches history data for data, needs to be set (value doesn't matter)



## Examples: ##

* https://api.sniffie.fi/v1/api?products&k=123&format=html
returns product catalogue data for identifier key 123 in html table format.

* https://api.sniffie.fi/v1/api?products&k=123&format=json&limitC=60
returns product catalogue data for identifier key 123 in json format, limits results to 60 rows.

* https://api.sniffie.fi/v1/api?products&k=123&format=html&limitC=60&offsetC=100&history=1
returns product distory data for identifier key 123 in html format, limits results to 60 rows and offsets the results from 100 (i.e. starts from the 100th item)

* https://api.sniffie.fi/v1/api?products&k=123&format=xml&offsetH=100&from&2017-08-20history=1
returns 1000 rows product distory data for identifier key 123 in html format since 2017-08-20, offsets the history results by 100 (i.e. starts from the 100th item).

* https://api.sniffie.fi/v1/api?products&k=123&format=csv&to&2017-08-20history=1
returns 1000 rows product distory data for identifier key 123 in csv fromat up to the date 2017-08-20



## Questions? ##

Contact us by e-mail: *support at sniffie dot fi*.