MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

https://verkoper.kinger.nl

Authenticating requests

Authenticate requests to this API's endpoints by sending a query parameter api_token in the request.

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your api token by visiting settings > api tokens in your dashboard.

Products

APIs for managing products.

Get all products

requires authentication

Get a list of products.

Example request:
curl --request GET \
    --get "https://verkoper.kinger.nl/api/v1/products?api_token=your-api-token&status=PUBLISHED&page=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://verkoper.kinger.nl/api/v1/products"
);

const params = {
    "api_token": "your-api-token",
    "status": "PUBLISHED",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://verkoper.kinger.nl/api/v1/products',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'api_token'=> 'your-api-token',
            'status'=> 'PUBLISHED',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
  "current_page": 1,
  "data": [
  {
    "id": 5137,
    "name": "Eurom Convectorkachel 2000 Watt",
    "description": "<p>De Eurom 2000 Watt is een elektrische convectorkachel die uitermate geschikt is als bijverwarming van ruimtes.</p>",
    "ean": "5901234123457",
    "brand": {
        "name": "Eurom"
    },
    "visible": true,
    "pricing": {
      "unit_price": 49.95,
      "shipping_fee_nl": 0,
      "shipping_fee_be": 7.49,
      "tax_level": "HIGH"
    },
    "stock": {
      "amount": 50,
    },
    "fulfilment": {
       "delivery_by": "retailer",
       "delivery": "1-23"
    },
    "delivery_to": {
       "netherlands": true,
       "belgium": true
    },
    "images": [
     {
         "1": "https://cdn.kinger.nl/product_images/first-product-image.jpg"
     },
     {
         "2": "https://cdn.kinger.nl/product_images/second-product-image.jpg"
     }
  ]
  },
  {
    "id": 5138,
    "name": "Eurom Convectorkachel 1500 Watt",
    "description": "<p>De Eurom 1500 Watt is een elektrische convectorkachel die uitermate geschikt is als bijverwarming van ruimtes.</p>",
    "ean": "5901234123458",
    "brand": {
        "name": "Eurom"
    },
    "visible": true,
    "pricing": {
       "unit_price": 22.95,
       "shipping_fee_nl": 5.95,
       "shipping_fee_be": 7.49,
       "tax_level": "HIGH"
    },
    "stock": {
        "amount": 103,
    },
    "fulfilment": {
       "delivery_by": "retailer",
       "delivery": "4-0"
    },
    "delivery_to": {
        "netherlands": true,
        "belgium": true
    },
    "images": [
     {
         "1": "https://cdn.kinger.nl/product_images/first-product-image.jpg"
     },
     {
         "2": "https://cdn.kinger.nl/product_images/second-product-image.jpg"
     }
  ]
  }
],
  "first_page_url": "https://verkoper.kinger.nl/api/v1/products?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "https://verkoper.kinger.nl/api/v1/products?page=1",
  "next_page_url": "https://verkoper.kinger.nl/api/v1/products?page=1",
  "path": "https://verkoper.kinger.nl/api/v1/products",
  "per_page": 20,
  "prev_page_url": null,
  "to": 20,
  "total": 2
 }
}
 

Example response (404):


{
    "error": "Internal server error, could not get any products."
}
 

Request   

GET api/v1/products

Query Parameters

api_token  string  

The api token should be added at the end of the url with ?api_token=your-api-token.

status  string optional  

Product status: "PAUSED", "PUBLISHED" or "ALL".

page  integer optional  

The requested page with a size of 20 items per page.

Get product

requires authentication

Get a product by product id.

Example request:
curl --request GET \
    --get "https://verkoper.kinger.nl/api/v1/product/5137?api_token=your-api-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://verkoper.kinger.nl/api/v1/product/5137"
);

const params = {
    "api_token": "your-api-token",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://verkoper.kinger.nl/api/v1/product/5137',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'api_token'=> 'your-api-token',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
  {
    "id": 5137,
    "name": "Eurom Convectorkachel 2000 Watt",
    "description": "<p>De Eurom 2000 Watt is een elektrische convectorkachel die uitermate geschikt is als bijverwarming van ruimtes.</p>",
    "ean": "5901234123457",
    "brand": {
        "name": "Eurom"
    },
    "visible": true,
    "pricing": {
      "unit_price": 49.95,
      "shipping_fee_nl": 0,
      "shipping_fee_be": 7.49,
      "tax_level": "HIGH"
    },
    "stock": {
      "amount": 50,
    },
    "fulfilment": {
       "delivery_by": "retailer",
       "delivery": "1-23"
    },
    "delivery_to": {
       "netherlands": true,
       "belgium": true
    },
    "images": [
     {
         "1": "https://cdn.kinger.nl/product_images/first-product-image.jpg"
     },
     {
         "2": "https://cdn.kinger.nl/product_images/second-product-image.jpg"
     }
  ]
 }
 

Example response (404):


{
    "error": "Internal server error, could not get product."
}
 

Request   

GET api/v1/product/{id}

URL Parameters

id  integer  

The id of the product.

Query Parameters

api_token  string  

The api token should be added at the end of the url with ?api_token=your-api-token.

Update stock

requires authentication

Update stock by product id.

Example request:
curl --request PUT \
    "https://verkoper.kinger.nl/api/v1/product/5137/stock?api_token=your-api-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"stock\": 40
}"
const url = new URL(
    "https://verkoper.kinger.nl/api/v1/product/5137/stock"
);

const params = {
    "api_token": "your-api-token",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "stock": 40
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://verkoper.kinger.nl/api/v1/product/5137/stock',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'api_token'=> 'your-api-token',
        ],
        'json' => [
            'stock' => 40,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "result": "Stock for product with id: 5137 has been updated.  New stock is: 40."
}
 

Example response (404):


{
    "error": "Internal server error, stock could not be updated."
}
 

Request   

PUT api/v1/product/{id}/stock

URL Parameters

id  integer  

The id of the product.

Query Parameters

api_token  string  

The api token should be added at the end of the url with ?api_token=your-api-token.

Body Parameters

stock  integer  

The amount of stock available for the product.

Update price

requires authentication

Update product price by product id.

Example request:
curl --request PUT \
    "https://verkoper.kinger.nl/api/v1/product/5137/price?api_token=your-api-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"price\": 59.99
}"
const url = new URL(
    "https://verkoper.kinger.nl/api/v1/product/5137/price"
);

const params = {
    "api_token": "your-api-token",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "price": 59.99
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://verkoper.kinger.nl/api/v1/product/5137/price',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'api_token'=> 'your-api-token',
        ],
        'json' => [
            'price' => 59.99,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "result": "Price for 5137 has been updated. New price is: 59.99."
}
 

Example response (404):


{
    "error": "Internal server error, price could not be updated."
}
 

Request   

PUT api/v1/product/{id}/price

URL Parameters

id  integer  

The id of the product.

Query Parameters

api_token  string  

The api token should be added at the end of the url with ?api_token=your-api-token.

Body Parameters

price  number  

The new price for the specified product.

Delete product

requires authentication

Delete product by product id.

Example request:
curl --request DELETE \
    "https://verkoper.kinger.nl/api/v1/product/5137/delete?api_token=your-api-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://verkoper.kinger.nl/api/v1/product/5137/delete"
);

const params = {
    "api_token": "your-api-token",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://verkoper.kinger.nl/api/v1/product/5137/delete',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'api_token'=> 'your-api-token',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "result": "Product with id: 5137 has been deleted."
}
 

Example response (404):


{
    "error": "Internal server error, product could not be deleted."
}
 

Request   

DELETE api/v1/product/{id}/delete

URL Parameters

id  integer  

The id of the product.

Query Parameters

api_token  string  

The api token should be added at the end of the url with ?api_token=your-api-token.