001_Snipon_API_11.PDF
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
The <strong>Snipon</strong> Api is the programming interface to the <strong>Snipon</strong> web portal. You can use the <strong>API</strong> to get<br />
data from the <strong>Snipon</strong> web service to integrate it in your app or website.<br />
<strong>API</strong> Calls<br />
The <strong>Snipon</strong> <strong>API</strong> follows a RESTful <strong>API</strong> design. You use standard HTTP methods to retrieve resources.<br />
You can pass the type parameter to every <strong>API</strong> Call. Currently this parameter supports only the value<br />
xml. You can also use the HTTP request-header field Accept for this function and set it to<br />
Accept: text/xml<br />
Paging<br />
All resources support paging. To use this you need to pass the two parameters limit and offset to the<br />
<strong>API</strong> Call. The value of limit describes the maximum of objects delivered through the <strong>API</strong> Call. The<br />
value of offset describes how much objects already been delivered. Usually offset should be 0 for the<br />
first call. If you use paging all resources contains a link to the next elements of the resource if there<br />
any. The property name which contains the URL is . For the previous elements the URL is<br />
the value of the property named .<br />
Example:<br />
GET http://snipon.de/api/Tradingcompany/?type=xml&apikey=&limit=100&offset=0
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
You can retrieve the following resources through <strong>API</strong> Calls:<br />
Tradingcompany:<br />
Tradingcompany is a list of Tradingcompanies. The Tradingcompany methods enable your application to get<br />
all Tradingcompanies as a list or a Tradingcompany. Each Tradingcompany has an uniquely identifying ID.<br />
GET http://snipon.de/api/Tradingcompany/?type=xml&apikey=<br />
Example:<br />
<br />
<br />
akzenta<br />
http://snipon.de/logo/Akzenta-logo.png <br />
Supermärkte<br />
http://snipon.de/api/Store/tradingcompanyid/2/<br />
<br />
<br />
Aldi-Nord<br />
http://snipon.de/logo/Aldi-Nord-logo.png<br />
Discounter<br />
http://snipon.de/api/Store/tradingcompanyid/2/<br />
<br />
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
Property Name Value Description<br />
id string The ID of this Company<br />
companyname string Name of the Company<br />
companylogo string URL of the logo<br />
companyclassification string The Companyclassification currently<br />
with the following<br />
classifications:<br />
Autowerkstätten<br />
Baumärkte<br />
Biomärkte<br />
Coupons<br />
Discounter<br />
Drogerien<br />
Einrichtungsmärkte<br />
Getränkemärkte<br />
Kaufhäuser<br />
Motorradausstatter<br />
Non-Food-Discounter<br />
Schuhmärkte<br />
Sportgeschäfte<br />
Supermärkte<br />
Technikmärkte<br />
Textilmärkte<br />
Tiernahrung<br />
Verlag<br />
Versicherung<br />
stores_url string <strong>API</strong> Call URL for the stores of<br />
this company<br />
GET http://snipon.de/api/Tradingcompany/1/?type=xml&apikey=<br />
This gives your Application the representation of the tradingcompany with the id = 1.
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
Stores:<br />
Store is a list of Stores. The Store methods enable your application to get all Stores as a list, a<br />
specific store or all Stores of a specific company. Each Store has a uniquely identifying ID.<br />
Example:<br />
GET http://snipon.de/api/Store/?type=xml&apikey=<br />
<br />
<br />
1<br />
Überregional<br />
51.2565483<br />
7.1483858<br />
Hans Löbbert GmbH & Co. KG<br />
Alte Freiheit <br />
9<br />
42103<br />
Wuppertal<br />
<br />
0202-45966-0<br />
0202-45966-22<br />
1<br />
<br />
<br />
1<br />
Überregional<br />
51.2509921<br />
7.1371319<br />
Hans Löbbert GmbH & Co. KG<br />
Tannenbergstr. <br />
58<br />
42103<br />
Wuppertal<br />
<br />
0202-37132-0<br />
0202-37132-22<br />
1<br />
<br />
…<br />
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
Property Name Value Description<br />
id string The ID of this Store<br />
districtnameid string The ID of the Districtname of the<br />
Store- this is important for the Relation<br />
between Store and a Flyer<br />
districtnamename string The Name of the Districtname<br />
storelat string lat-Coordinate for the store<br />
storelng string lng-Coordinate for the store<br />
storename string The name of the store<br />
storeadress string The Address (Street) of the store<br />
storenum string The street number of the store<br />
storezip string The Zip code of the store<br />
storecity string The City of the store<br />
storebusinesshours string The business hours of the store<br />
storetel string The phone number of the store<br />
storefax string The fax number of the store<br />
tradingcompanyid string The id of the tradingcompany running<br />
this store<br />
GET http://snipon.de/api/Store/34038/?type=xml&apikey=<br />
With this call you get the store with the id = 34038<br />
GET http://snipon.de/api/Store/Tradingcompanyid/1/?type=xml&apikey=<br />
With this call you get all stores of the tradingcompany with the id=1.
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
Flyer:<br />
Flyer is a list of current Flyer. The Flyer methods enable your application to get all current Flyers<br />
as a list, a specific Flyer or all Flyers of a specific company. Each Flyer has a uniquely identifying<br />
ID.<br />
GET http://snipon.de/api/Flyer/?type=xml&apikey=<br />
Property Name Value Description<br />
id string The ID of this Flyer<br />
companyname string The Companyname which published the Flyer<br />
tradingcompanyid string The ID of the Company which published the Flyer<br />
flyerdatefrom string Start date of the Flyer. On this date the offers<br />
should be available in the stores.<br />
flyerdateto string End date of the Flyer. Till this date the offers<br />
should be available in the stores.<br />
flyersizex string Width of the flyer in pixel taken from the first page.<br />
flyersizey string Height of the flyer in pixel taken from the first<br />
page.<br />
flyerpagecount string Count of the pages of the flyer.<br />
districtnameid string The ID of the districtname. For the relation between<br />
a Store and a Flyer.<br />
flyername string The Name of the Flyer<br />
flyerpages object List of Flyerpages<br />
GET http://snipon.de/api/Flyer/ 30249/?type=xml&apikey=<br />
With this call you get the Flyer with the id = 30249<br />
GET http://snipon.de/api/Flyer/Tradingcompanyid/1/?type=xml&apikey=<br />
With this call you get all flyers from the tradingcompany with the id = 1
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
FlyerPage<br />
The resource FlyerPage usually gets used with the <strong>API</strong> call of the Flyer resource. It is a list with flyer<br />
pages for a specific flyer or a specific flyer page.<br />
Property Name Value Description<br />
id string The ID of this FlyerPage<br />
flyerpagetext string The Text of the FlyerPage. Most of the time, this text is delivered<br />
through the text in PDF-files. Sometimes the text<br />
comes from an OCR-Software.<br />
flyerpagenr string Page number of the Page<br />
flyerpagedatefrom string Start date of the FlyerPage. On this date the offers on this<br />
Page should be available in the stores.<br />
flyerpagedateto string End date of the FlyerPage. Till this date the offers should be<br />
available in the stores.<br />
flyersizefullx string Width of the FlyerPage for the full view in pixel.<br />
flyersizefully string Height of the FlyerPage for the full view in pixel.<br />
flyersizenormalx string Width of the FlyerPage for the normal view in pixel.<br />
flyersizenormaly string Height of the FlyerPage for the normal view in pixel.<br />
flyersizethumbx string Width of the FlyerPage for the thumb view in pixel.<br />
flyersizethumby string Height of the FlyerPage for the thumb view in pixel.<br />
image_full string URL to the image of the FlyerPage for the full view.<br />
image_normal string URL to the image of the FlyerPage for the normal view.<br />
image_thumb string URL to the image of the FlyerPage for the thumb view.<br />
Used during the <strong>API</strong> call of Flyer.
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
FlyerItem:<br />
FlyerItem is a list of all current offers in the current flyers. The FlyerItem methods enable your application<br />
to get all current FlyerItems as a list, a specific FlyerItem or all FlyerItems of a specific Flyer. Each FlyerItem<br />
has a uniquely identifying ID.<br />
GET http://snipon.de/api/FlyerItem/?type=xml&apikey=<br />
Property Name Value Description<br />
id string The ID of this FlyerItem<br />
flyerpageid<br />
The ID of the FlyerPage<br />
flyeritemprice<br />
Price of the FlyerItem<br />
flyeritemdesc<br />
The description text of the FlyerItem<br />
flyeritemx<br />
XPosition of the FlyerItem-Picture on the FlyerPage<br />
flyeritemy<br />
YPosition of the FlyerItem-Picture on the FlyerPage<br />
flyeritemh<br />
Height of the FlyerItem-Picture on the FlyerPage<br />
flyeritemw<br />
Width of the FlyerItem-Picture on the FlyerPage<br />
productname<br />
string The Productname<br />
productbrand<br />
The Brand of the Product<br />
productmanufacturer The Manufacturer of the Product<br />
flyerpagenr<br />
The Pagenumber<br />
flyerid<br />
The flyerid<br />
districtnameid<br />
The ID of the Districtname of the Store- this is important for the Relation<br />
between Store and a FlyerItem / Flyer<br />
tradingcompanyid<br />
The ID of the Tradingcompany<br />
subcategoryid<br />
subcategoryname<br />
categoryid<br />
categoryname<br />
sectionid<br />
sectionname<br />
flyeritemcount<br />
flyeritemsize<br />
flyeritemunit<br />
The packaging size of the FlyerItem. To use with the property flyeritemunit.<br />
For example:<br />
flyeritemsize = 1<br />
flyeritemunit = kg<br />
The packaging unit of the FlyerItem. For example:<br />
St – Stück<br />
kg - Kilogramm<br />
flyeritemimage<br />
URL of the Image of the FlyerItem
Dokumentation <strong>API</strong> <strong>Snipon</strong> Version 2.0<br />
GET http://snipon.de/api/FlyerItem/234567/?type=xml&apikey=<br />
With this call you get the FlyerItem with the id = 234567<br />
GET http://snipon.de/api/FlyerItem/flyereid/123456/?type=xml&apikey=<br />
With this call you get all flyeritems from the flyer with the id = 123456<br />
GET http://snipon.de/api/FlyerItem/flyerpageid/1212/?type=xml&apikey=<br />
With this call you get all flyeritems from the flyerpage with the id = 1212