Retrieve
Get information about the webshop.
GET /1.0/webshop.json
Query parameters
They should be passed as query parameters to the URL. (ex.: ?id=1&code=abc)
id  int   (required)
The unique webshop ID.
code  string   (required)
Your personal API code.
Example response
{
    "status": "success",
    "message": "Webshop details successfully retrieved!",
    "data": {
        "name": "Webshop.com",
        "address": {
            "street": "Stationsweg",
            "housenumber": "1A",
            "postalcode": "1234AB",
            "city": "Amsterdam",
            "country": "Netherlands"
        },
        "logo": "https://dashboard.webwinkelkeur.nl/img/logos/1.png",
        "languages": [
            {
                "name": "Dutch",
                "url": "https://www.webwinkelkeur.nl/nl/webshop/Webshop-name-1",
                "iso": "nl",
                "all": true,
                "main": true
            },
            {
                "name": "English",
                "url": "https://www.webwinkelkeur.nl/webshop/Webshop-name-1",
                "iso": "en",
                "all": false,
                "main": false
            }
        ]
    }
}
Response statuses
| status | message | Explanation | 
|---|---|---|
| success | Webshop details successfully retrieved! | |
| error | Not all obligated variables are set. | One or more of the required variables ( id,code) has/have not been set. | 
| error | Incorrect authentication credentials. | The combination idandcodeis invalid. | 
| error | Unexpected error while processing. Please contact WebwinkelKeur. | An unexpected error has occurred. This will probably only be solvable by the WebwinkelKeur team. | 
Example code
<?php
$id = 1;
$code = '123456789abc123456789';
$curl = curl_init(
    sprintf(
        'https://dashboard.webwinkelkeur.nl/api/1.0/webshop.json?id=%s&code=%s',
        $id,
        $code,
    ),
);
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
]);
$response = curl_exec($curl);
if ($response !== false) {
    $data = json_decode($response, true);
    /*
    $data will look similar to the format below:
    $data = [
        "status" => "success",
        "message" => "Ratings summary successfully retrieved!",
        "data" => See example
    ];
    */
} else {
    // An error occurred
}