Private API
With Shoptet Premium, your e-shop can access data through the Shoptet API, a RESTful interface.
To access the API, you need a private token (32 alphanumeric characters), which you can generate in your administration panel under Connections » Private API – see Private tokens maintenance for more details. You can create and use up to 10 tokens.
To call API, add the following headers to you request:
Shoptet-Private-API-Token: one-of-your-private-API-tokens
Content-Type: application/json
The API host (URL) is https://api.myshoptet.com/api/
An example call:
curl --location --request GET 'https://api.myshoptet.com/api/eshop' \
--header 'Shoptet-Private-API-Token: <one-of-your-private-API-tokens>' \
--header 'Content-Type: application/json'
It will return a JSON response like:
{
"data": {
"contactInformation": {
"eshopId": 123456,
"eshopName": "www.domena-eshopu.cz",
"url": "https://www.domena-eshopu.cz/",
"eshopTitle": "My eshop",
"eshopSubtitle": "We sell it at best...",
"contactPerson": "Jára Cimrman",
"email": "info@shoptetnamiru.cz",
"phone": "123 456 789",
}
}
}
Detailed reference documentation is available.