This is a documentation on how to use Sniffie product feeds v2. It's aimed at people doing integrations.

Sniffie product feed specifications were updated as Sniffie exited beta. The change allows to use Sniffie's new product filtering system to get more meaningful data out of the API.

Should you not understand how to use this documentation or have any questions/feedback regarding the documentation features, please contact Sniffie support.

Should you need lots of data (especially history data) fast and often, direct SQL access is available as an extra feature. Please contact your Sniffie contact person for details. If you already have SQL access and are wondering about the credentials, please contact your organization’s account owner (“superuser”) for details. If your SQL credentials are missing, Sniffie support can create new credentials upon the account owner’s verified authorization to do so.

How it works:

  1. You need to create a v2 product feed link. You can do this by navigating to Outputs > Product feeds.
  2. Click "Add new product feed" button at the bottom of the table. A modal opens.
  3. Use Sniffie's advanced filtering system to create some filters and give your product feed a name. You can also create a description.
  4. When you are satisfied, click "Save".
  5. Should you need to edit the link, you can just select the link normally and then click the edit button. Should you want to revoke the feed, just click "Delete" and the link will no longer work.

All returned fields for basic product data:

* productName, i.e. the name of the product in question
* EAN
* SKU
* brand
* website
* store
* productCode, i.e. the product code field for the product in question
* custom1, i.e. custom column 1
* custom2, i.e. custom column 2
* custom3, i.e. custom column 3
* custom4, i.e. custom column 4
* custom5, i.e. custom column 5
* custom6, i.e. custom column 6
* custom7, i.e. custom column 7
* custom8, i.e. custom column 8
* custom9, i.e. custom column 9
* marginTarget
* marginTargetPercentage
* purchasePrice
* RRP
* internalRRP
* mfgCode
* subCat1
* subCat2
* subCat3
* subCat4
* color
* variant
* manufacturer
* weight
* measures
* salesVolume
* conversionFormula
* productImage
* priceText
* priceFloat
* priceEur
* currency
* availability
* description
* rating
* sniffId
* sniffieId
* sniffieMatchId
* sniffieProductUrl

Formatting product API results

Sniffie product feeds accept requests as either GET or POST requests. The link in the url is a GET request to the Sniffie product feed API v2. You can parse the parameters from get to POST should you desire to do so.

Unique API identifier is required. Parameters can be added to the request (either POST of GET). If you use GET-requests, you can add parameters with

&{{parameter name}}={{parameter value}}

where {{parameter name}} is the name of the parameter and {{parameter value}} is the value of the parameter. Consult the parameter list below for options that you can pass to the product feed.

Accepted parameters

k

Unique API identifier key for this product feed, 128 characters long. The key is generated at the time of API link creation. Each API identifier is unique. This is a required parameter.

format

Specifies the data format, defaults to JSON. Currently supports JSON, CSV, XML, HTML.

limitC

limits the number of rows processed from product catalogue. Minimum value 1, 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.

from

specifies the starting date in UTC. Format YYYY-MM-DD HH:mm:ss. No default value, gets either the latest data up to the request time or whatever API link filters specify. If you use a date filter in your API link, may result in conflicting date filtering and then no results are returned.

to

specifies the ending date in UTC. Format YYYY-MM-DD HH:mm:ss. No default value, gets either the latest data up to the request time or whatever API link filters specify. If you use a date filter in your API link, may result in conflicting date filtering and then no results are returned.

Examples (for GET requests)

https://api.sniffie.fi/v2/?k=123&format=html

returns product catalogue data for identifier key 123 in html table format.

https://api.sniffie.fi/v2/?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/v2/?k=123&format=xml&limitC=5000&offsetC=10&from=2017-08-20

returns 5000 rows of product catalogue data for identifier key 123 in xml format since 2017-08-20, offsets the results by 10 (i.e. starts from the 10th item).

Possible errors:

200 - No data to be fetched.

There is no longer any data that satisfies the conditions of the filter and associated parameters. Could be cause e.g. having too high limit or offset parameters or if the products in your product catalogue have been removed.

404 - Error. API key is missing in the request.

API identifier was not specified in the request.

404 - No such file or link found. Check your api key.

No such active API identifier found in our system.

404 - Limit exceeded

API limit exceeded. Wait one 1h before trying again. Limit timer will reset after each requests made during limit exceeding. If you exceed the limit on a regular basis, your API access may be automatically revoked by Sniffie.

404 - Error processing match names. Contact Sniffie support!

Match names could not be processed. This kind of an error should be reported to Sniffie support.

404 - Product list could not be fetched.

Product list could not be processed. This kind of an error should be reported to Sniffie support.

Did this answer your question?