DepotAPI is tool for managing shop and shipper depots.
- getShippers (public)
- getShipper (public)
- getShipperDepots (public)
- insertShipperDepots (shipper)
- deleteShipperDepot (shipper)
- getShopDepots (shop)
- insertShopDepots (shop)
- deleteShopDepots (shop)
- 2019/07 - Removed required
hash
fields. Dangling fields are ignored for backwards compatibility.
Authentication is required for all non-public methods. DepotAPI uses token based authentication. First you need to get cz login information / sk login information and an API key (to obtain one, write a request to podpora@heureka.cz). Then send your username, password and API key together to login endpoint and you will get back a token, which will be valid for 4 hours. This token has to be send in HTTP header when calling secured methods.
https://api.heureka.cz/depot-api/v1/authenticate/login
{
"depotApiKey" : "string",
"fermiId" : "string",
"password" : "string"
}
POST /depot-api/v1/authenticate/login HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
{
"depotApiKey": "your_unique_api_key",
"fermiId": "example@heureka.cz",
"password": "your_password"
}
{
"code": 200,
"message": "ok",
"token": "random_generated_token"
}
This method is used for getting a list of all shippers
https://api.heureka.cz/depot-api/v1/delivery-places/getShippers
GET /depot-api/v1/delivery-places/getShippers HTTP/1.1
Host: api.heureka.cz
{
"code": 200,
"message": "ok",
"shippers": [
{
"shipperId": 1,
"name": "HeurekaPoint",
"availableDepots": 50
},
{
"shipperId": 2,
"name": "Geis",
"availableDepots": 20
}
]
}
This method is used for obtaining detail information about specific shipper.
https://api.heureka.cz/depot-api/v1/delivery-places/getShipper
{
"shipperId" : "int"
}
POST /depot-api/v1/delivery-places/getShipper HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
{
"shipperId": 1
}
{
"code": 200,
"message": "ok",
"shipper": {
"shipperId": 1,
"name": "HeurekaPoint",
"logo": "url_address_of_logo",
"urlHomepage": "url_of_shipper",
"streetHeadquarter": "street",
"houseNumberHeadquarter": 666,
"cityHeadquarter": "city",
"zipCodeHeadquarter": 46000,
"phone": "+420777777777",
"streetPlaceOfBussiness": "street",
"houseNumberPlaceOfBusiness": 666,
"cityPlaceOfBussiness": "city",
"zipCodePlaceOfBusiness": 46000,
"identificationNumber": "02387727",
"availableDepots": 50
}
}
This method returns detail information about shipper depots. Maximum count of visited depots in one request is 100. Default range is 0 to 100.
https://api.heureka.cz/depot-api/v1/delivery-places/getShipperDepots
{
"shipperId" : "int",
"from" : "int|null",
"to" : "int|null"
}
POST /depot-api/v1/delivery-places/getShipperDepots HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
{
"shipperId": 1,
"from": 0,
"to": 50
}
{
"code": 200,
"message": "ok",
"depots": [
{
"depotId": 1,
"enabled": true,
"shipperId": 1,
"name": "name_of_depot",
"street": "street_of_depot",
"houseNumber": 666,
"city": "city_of_depot",
"zipCode": 46000,
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"originalId": "CZ-1",
"phone": "+420777777777"
},
{
"depotId": 2,
"enabled": false,
"shipperId": 1,
"name": "name_of_depot",
"street": "street_of_depot",
"houseNumber": 666,
"city": "city_of_depot",
"zipCode": 46000,
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"originalId": "CZ-2",
"phone": "+420777777777"
}
]
}
This method is used for inserting and updating shipperDepots. If depot with specific depotId exists, then edit the existing depot.
https://api.heureka.cz/depot-api/v1/delivery-places/insertShipperDepots
{
"depots" : [
{
"depotId" : "int",
"shipperId" : "int",
"name" : "string|null",
"street" : "string",
"houseNumber" : "string",
"city" : "string",
"zipCode" : "string",
"gpsLat" : "string",
"gpsLong" : "string",
"originalId" : "string|null",
"phone" : "string",
"enabled" : "bool|null"
}
]
}
POST /depot-api/v1/delivery-places/insertShipperDepots HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
token: N005NlspOSoOxNX73XUxuhs-t_U
{
"depots": [
{
"depotId": 1,
"shipperId": 1,
"name": "name_of_depot",
"street": "street_of_depot",
"houseNumber": 666,
"city": "city_of_depot",
"zipCode": 46000,
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"originalId": "CZ-1",
"phone": "+420777777777",
"enabled": false
},
{
"depotId": 2,
"shipperId": 1,
"name": "name_of_depot",
"street": "street_of_depot",
"houseNumber": 666,
"city": "city_of_depot",
"zipCode": 46000,
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"originalId": "CZ-2",
"phone": "+420777777777",
"enabled": true
}
]
}
{
"code": 200,
"message": "ok",
"description": "Added or edited 2 depots."
}
This method is used for deleting existing shipper depots based on his id.
https://api.heureka.cz/depot-api/v1/delivery-places/deleteShipperDepot
{
"depotId" : "int",
"shipperId" : "int"
}
POST /depot-api/v1/delivery-places/deleteShipperDepot HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
token: N005NlspOSoOxNX73XUxuhs-t_U
{
"depotId": 1,
"shipperId": 1
}
{
"code": 200,
"message": "ok",
"description": "Depot was successfully deleted"
}
This method is used for obtaining a list of all your depots
https://api.heureka.cz/depot-api/v1/delivery-places/getShopDepots
{
"shopId" : "int"
}
POST /depot-api/v1/delivery-places/getShopDepots HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
token: N005NlspOSoOxNX73XUxuhs-t_U
{
"shopId": 1
}
{
"code": 200,
"message": "ok",
"depots": [
{
"depotId": 1,
"shopId": 1,
"name": "depot_name",
"street": "street_of_depot",
"houseNumber": 666,
"city": "city_of_depot",
"zipCode": 46000,
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"phone": "+420777777777"
},
{
"depotId": 1,
"shopId": 1,
"name": "depot_name",
"street": "street_of_depot",
"houseNumber": 666,
"city": "city_of_depot",
"zipCode": 46000,
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"phone": "+420777777777"
}
]
}
This method is used for inserting new or updating existing shop depots. If you want to insert new depot, set depotId value as null.
https://api.heureka.cz/depot-api/v1/delivery-places/insertShopDepots
{
"depots": [
{
"depotId" : "int|null",
"shopId" : "int",
"name" : "string",
"street" : "string",
"houseNumber" : "string",
"city" : "string",
"zipCode" : "string",
"gpsLat" : "string",
"gpsLong" : "string",
"phone" : "string"
}
]
}
POST /depot-api/v1/delivery-places/InsertShopDepots HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
token: N005NlspOSoOxNX73XUxuhs-t_U
{
"depots": [
{
"depotId": 1,
"shopId": 1,
"name": "depot_name",
"street": "street_of_depot",
"houseNumber": "666",
"city": "city_of_depot",
"zipCode": "46000",
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"phone": "+420773595388"
},
{
"depotId": null,
"shopId": 1,
"name": "depot_name",
"street": "street_of_depot",
"houseNumber": "666",
"city": "city_of_depot",
"zipCode": "46000",
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"phone": "+420773595388"
}
]
}
{
"code": 200,
"message": "ok",
"depots": {
"updated": [
1
],
"unchanged": [],
"inserted": [
{
"depotId": 2,
"shopId": 1,
"name": "depot_name",
"street": "street_of_depot",
"houseNumber": "666",
"city": "city_of_depot",
"zipCode": "46000",
"gpsLat": "1.0000",
"gpsLong": "1.0000",
"phone": "+420773595388"
}
],
"notInserted": []
}
}
This function is used for deleting depots based on their ids
https://api.heureka.cz/depot-api/v1/delivery-places/deleteShopDepots
{
"depots" : [
{
"depotId" : "int",
"shopId" : "int"
}
]
}
POST /depot-api/v1/delivery-places/deleteShopDepots HTTP/1.1
Host: api.heureka.cz
Content-Type: application/json
token: N005NlspOSoOxNX73XUxuhs-t_U
{
"depots": [
{
"depotId": 1,
"shopId": 1
},
{
"depotId": 2,
"shopId": 1
}
]
}
{
"code": 200,
"message": "ok"
}