Overview Edit the file on GitHub

Deprecated Resource

The API v2 is deprecated. If you wish to use our API please visit the API v3.

Note

No new keys are issued for APIv2 if you need help migrating to APIv3 contact api@skroutz.gr.

Table of Contents

Schema

All API access is over HTTP, and accessed from the apiv2.skroutz.gr domain. All calls should be in the form

  http://apiv2.skroutz.gr/:format/

where :format is json or xml, depending the format of data you want to receive. Henceforth, this part will be omitted since it's the same for every call.

Response schema

An API response consists of the following three elements:

  • type
  • result
  • error
Example
<?xml version="1.0" encoding="UTF-8"?>
<SkroutzApi>
    <type>categories</type>
    <error nil="true"></error>
    <result>
    ...
    </result>
</SkroutzApi>

The result element is the result of the API call. It is safe to be parsed, only if the error node is null. Every successful response includes a type element with a code name for value.

Error handling

In case of an error, the error element is consisted of three elements:

code
The error code
number
The error number
text
A short description of the error

Skroutz Partner key

An Skroutz Partner key is required to use the API. Request it at api@skroutz.gr.

Authentication

Note

Every call to Skroutz API must have an access_token parameter.

Use the the /authenticate api call to get access tokens.

$ curl -F 'access_token=36c57b67...' http://apiv2.skroutz.gr/xml/subcats/769/
Example
<?xml version="1.0" encoding="UTF-8"?>
<SkroutzApi>
  <type>categories</type>
  <error nil="true"></error>
  <result>
    <categories>
      <category>
        <children_count>0</children_count>
        <id>290</id>
        <name>
          <![CDATA[Διάφορα Αξεσουάρ Laptop]]>
        </name>
      </category>
      <category>
        <children_count>0</children_count>
        <id>712</id>
        <name>Docking stations</name>
      </category>
      <category>
        <children_count>0</children_count>
        <id>713</id>
        <name>
          <![CDATA[Βάση Laptop]]>
        </name>
      </category>
    </categories>
  </result>
</SkroutzApi>

Access Tokens

There are two kind of access tokens, the basic and the full. A full access token is related with a user and therefore it allows additional API calls related with that user (e.g. bookmarks).

Authenticate

access_token generation. Only "https"

Parameters
api_key
Your API key
username
User name, in case of full access token
password
User password, in case of full access token
Example
# basic token
/authenticate api_key=your_api-key

# full token
/authenticate api_key=your_api-key username=Skroutz password=donald
Returns
access_token
The access token to use for API calls
access_token_expiry
Expiration date of the access token
access_token_type
User password, in case of full access token
Errors
wrong_auth
Wrong credentials
access_denied
Wrong API key
Example
$ curl -F 'access_token=36c57b67...' -F username=Skroutz -F password=donald \
       http://apiv2.skroutz.gr/xml/authenticate/
<?xml version="1.0" encoding="UTF-8"?>
<SkroutzApi>
  <type>authenticate</type>
  <result>
    <user>
      <username>Skroutz</username>
      <avatar_url>http://skroutz.gr/avatars/skroutz.jpg</avatar_url>
    </user>
    <access_token_expiry>2010-10-12T16:43:08+03:00</access_token_expiry>
    <access_token>54c1446bd299ee758956f42241ae18db</access_token>
    <access_token_type>full</access_token>
  </result>
  <error nil="true"></error>
</SkroutzApi>

Logout

Logout

Return
success
true