By changes in headcount and webshop software, the status of the API is currently 'uncertain'. o
By changes in headcount and webshop software, the status of the API is currently 'uncertain'. o
If you want to use the Petdiscount API in your PHP app, you can use our PHP Client library.
The client library is available on Github or you can download it below.
You need an activated account at Petdiscount and you need to request an API-Key by e-mail or phone.
Petdiscount uses HTTP Basic Auth to authenticate, you use your e-mail as the username and your API-Key as the password.
There is a rate limit per user. In normal cases the limit is at 100 requests per hour, but can be adjusted depending on serverload.
If you hit the rate limit, we will respond with a 429 Too Many Requests HTTP Status Code and your request will be ignored.
If you want to use the Petdiscount API in your PHP app, you can use our PHP Client library.
The client library is available on Github or you can download it below.
Products are the core of our businesses. You can only sell items that exists as a product in your catalog.
With our API you can easily add products to your online shop and keep the stock synced.
This is not realtime, we generate this JSON every 60 minutes.
At the moment we only offer a Dutch (NL) feed, we try to add new languages very soon.
You can check the progress of our feed by appending ?lang={lang} to it. We support 'en' (English), 'de' (German), 'fr' (French).
Currently looking for translators in English, German and French. If you are a translator in another language, you can contact us with a proposal.
Name | Type | Optional | Description |
---|---|---|---|
productid | integer | No | Unique Petdiscount reference |
sku | string | no | Product code of product |
name | string | no | Name of product |
description | string | yes | Product description, with /n as newline. |
brandid | integer | yes | Brand id |
brand | string | yes | Brand name |
image | integer | no | Number of images |
variants.id | integer | no | Unique id of the child |
variants.sku | string | no | SKU of child |
variants.ean | int | yes | EAN13 barcode of child |
variants.type | string | yes | Child type (size / color) |
variants.stock | integer | no | Remaining stock |
variants.b2b | float | no | Purchase price excluding VAT |
variants.b2c | float | no | Suggested price including VAT |
variants.onlynl | int | no | Product only shipped in the Netherlands |
Disclaimer
At the moment the stock indication is worthless, please keep in mind. We are aiming at Q3 for accurate stocklevels.
Our apologies in advance!
{
"productid": "274",
"sku": "02-01891-05",
"name": "Draadkooi Hondenbench Onderzetters (5 st.)",
"description": "Met deze beschermvoetjes zorgt u dat een metalen bench geen krassen meer kan geven op een gladde ondergrond, zoals een tegel-, laminaat- of houtvloer.\r\n\r\nDe ronde rubber hulsjes worden heel eenvoudig op de vier hoeken van de bench om het metaal geschoven. Zo is uw mooie vloer meteen beschermd tegen krassen van het metaal en staat de bench bovendien direct nog steviger.\r\n\r\nNatuurlijk kunt u de rubber hulsjes ook om de spijlen aan de zijkant bevestigen, bijvoorbeeld omdat de bench anders de muur of een meubelstuk zou beschadigen.\r\n\r\nDe beschermvoetjes worden per vijf stuks geleverd. Deze universele maat past om de spijlen van elke metalen bench die we op onze website verkopen.",
"brandid": "267",
"brand": "Petdiscount",
"images": [
"02-01891-05.jpg"
],
"category": {
"main": "Honden",
"mainid": "311",
"sub": "Hondenbench",
"subid": "327"
},
"variants": [
{
"id": "274",
"sku": "02-01891-05",
"ean": "7081251554934",
"type": "",
"stock": 50,
"b2b": "0.99",
"b2c": "2.95"
}
]
}
You can find all the product pictures in the following ZIP files. You need to save these ZIP files on your own server. The file names match the names given in the feed. We update the photos at 17:30 every day.
There is a limit of 4 downloads per 24 hours.
You can also download the photos from the following URLs. Deep linking is not permitted.
At the moment we only offer 1 photo per product, in the near future we'll add more photos.
We'll add future photos like {sku}_2.jpg, {sku}_3.jpg.
Make sure your script is future-proof and can handle this.
Note: The use of these photos is at your own risk. Petdiscount does not accept any liability for damage caused by the use of images.
You can top up your prepaid balance at your API dashboard.
At the moment, only API orders can use the prepaid balance. Orders you place in our website can't use it unfortunately.
Getting the balance is easy! Note: Balance is always in euro's.
GET https://api.petdiscount.nl/v1/prepaid
{
"balance": "9.25"
}
If you want push notifications from us, you can subscribe to our webhooks. You can register your webhook by entering the endpoint in your settings.
If an order is changed, we will POST data to your server. You will recieve the following updates at your endpoint:
<?php
// Get the data we send you
$json = file_get_contents('php://input');
// Convert to array
$data = json_decode($json);
echo $data['orderid']
// Let us know that you recieved the data
header('HTTP/1.1 200 OK');
We offer a "proof of concept" Magento importer, you can view it at Github.
Ask your web developer to install it or change it to your needs.
At the moment we don't offer any plugins. We are searching for partners who can build plugins for Prestashop & WooCommerce. If you are a developer and make a plugin, we will list you at this page. Feel free to make an appointment for a cup of coffee!