Partner API
From your own system, get quotes, create shipments, list them, check their status and cancel them. Five endpoints, one key, the same envelope in every response.
Authentication and base URL
Every request carries your company's API key in the X-Api-Key header. Admins of approved business accounts create keys themselves in the sender panel (up to 5 active keys); the plain text is shown only once and we store only its hash. Keep the key on your server; never embed it in an app or a browser.
Base URL https://dronkargom.com/api/partner/v1
Headers X-Api-Key: dkp_<prefix>.<secret>
Content-Type: application/json
Accept: application/json- Every response uses the same envelope: {"ok": true, "data": …} on success, {"ok": false, "error": …} otherwise.
- Amounts are integers in kuruş (VAT included); durations are in seconds, distances in metres.
- Shipments are charged to the company account; a single invoice is issued at the end of the month.
Rate limit
120 requests per minute per API key, and 600 requests per minute in total for all keys from the same IP address. Above the limit you get 429; wait a moment and try again.
/quotes
Gets Standard and Express quotes for two points and a parcel size. A quote is valid for 5 minutes; a shipment can only be created with a quote ID, so the amount is fixed on the server. If you have a contract discount, it is applied to the quote automatically.
tier- zarf · kucuk · orta · buyuk
from.label / to.label- optional, up to 255 characters
curl -X POST "https://dronkargom.com/api/partner/v1/quotes" \
-H "X-Api-Key: $DK_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"from":{"lat":<lat>,"lng":<lng>,"label":"Depo"},"to":{"lat":<lat>,"lng":<lng>,"label":"Mağaza"},"tier":"kucuk"}'$http = new \GuzzleHttp\Client(['base_uri' => 'https://dronkargom.com/api/partner/v1/', 'http_errors' => false]);
$res = $http->request('POST', 'quotes', [
'headers' => ['X-Api-Key' => getenv('DK_API_KEY'), 'Accept' => 'application/json'],
'json' => [
'from' => [
'lat' => <lat>,
'lng' => <lng>,
'label' => 'Depo'
],
'to' => [
'lat' => <lat>,
'lng' => <lng>,
'label' => 'Mağaza'
],
'tier' => 'kucuk'
],
]);
$out = json_decode((string) $res->getBody(), true); // ['ok' => true, 'data' => …]const res = await fetch('https://dronkargom.com/api/partner/v1/quotes', {
method: 'POST',
headers: { 'X-Api-Key': process.env.DK_API_KEY, 'Accept': 'application/json', 'Content-Type': 'application/json' },
body: JSON.stringify({
"from": {
"lat": <lat>,
"lng": <lng>,
"label": "Depo"
},
"to": {
"lat": <lat>,
"lng": <lng>,
"label": "Mağaza"
},
"tier": "kucuk"
}),
});
const { ok, data, error } = await res.json();{
"ok": true,
"data": {
"id": "<quote_id>",
"tier": "kucuk",
"distance_m": <m>,
"options": [
{ "service": "standard", "price_kurus": <kuruş>, "vat_kurus": <kuruş>, "eta_seconds": <s>, "available": true, "breakdown": [ … ] },
{ "service": "express", … }
],
"expires_at": "<ISO 8601>"
}
}/shipments
Turns a quote into a shipment. tracking_url in the response is the tracking link to pass to the recipient; delivery_pin is the 4-digit code the recipient enters on delivery, share it only with the recipient. You can put your own order number in reference.
service- standard · express
recipient_name- required, 2–120 characters
recipient_phone · to_note · reference · cost_center- optional
curl -X POST "https://dronkargom.com/api/partner/v1/shipments" \
-H "X-Api-Key: $DK_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"quote_id":"<quote_id>","service":"standard","recipient_name":"<recipient_name>","recipient_phone":"<phone>","reference":"<order_no>"}'$http = new \GuzzleHttp\Client(['base_uri' => 'https://dronkargom.com/api/partner/v1/', 'http_errors' => false]);
$res = $http->request('POST', 'shipments', [
'headers' => ['X-Api-Key' => getenv('DK_API_KEY'), 'Accept' => 'application/json'],
'json' => [
'quote_id' => '<quote_id>',
'service' => 'standard',
'recipient_name' => '<recipient_name>',
'recipient_phone' => '<phone>',
'reference' => '<order_no>'
],
]);
$out = json_decode((string) $res->getBody(), true); // ['ok' => true, 'data' => …]const res = await fetch('https://dronkargom.com/api/partner/v1/shipments', {
method: 'POST',
headers: { 'X-Api-Key': process.env.DK_API_KEY, 'Accept': 'application/json', 'Content-Type': 'application/json' },
body: JSON.stringify({
"quote_id": "<quote_id>",
"service": "standard",
"recipient_name": "<recipient_name>",
"recipient_phone": "<phone>",
"reference": "<order_no>"
}),
});
const { ok, data, error } = await res.json();{
"ok": true,
"data": {
"code": "DK<8>",
"status": "confirmed",
"tracking_url": "<url>",
"delivery_pin": "<4>",
"price_kurus": <kuruş>,
"eta_at": "<ISO 8601>"
}
}/shipments
All of the company's shipments (whether created in the panel, the app or the API), newest first. Pagination uses a cursor: send the next_cursor value from the response as cursor in the next request.
limit- 1–100 (default 50)
status- active · delivered · closed · or a single status name
reference · cursor- optional
curl -X GET "https://dronkargom.com/api/partner/v1/shipments?limit=50&status=delivered" \
-H "X-Api-Key: $DK_API_KEY" \
-H "Accept: application/json"$http = new \GuzzleHttp\Client(['base_uri' => 'https://dronkargom.com/api/partner/v1/', 'http_errors' => false]);
$res = $http->request('GET', 'shipments?limit=50&status=delivered', [
'headers' => ['X-Api-Key' => getenv('DK_API_KEY'), 'Accept' => 'application/json'],
]);
$out = json_decode((string) $res->getBody(), true); // ['ok' => true, 'data' => …]const res = await fetch('https://dronkargom.com/api/partner/v1/shipments?limit=50&status=delivered', {
method: 'GET',
headers: { 'X-Api-Key': process.env.DK_API_KEY, 'Accept': 'application/json' },
});
const { ok, data, error } = await res.json();{
"ok": true,
"data": {
"items": [ { "code": "<code>", "status": "delivered", "reference": "<order_no>", "price_kurus": <kuruş>, … } ],
"next_cursor": <int|null>
}
}/shipments/{kod}
Returns the status and event history of a shipment that belongs to your company. You can only see your own shipments.
status- confirmed → assigned → to_pickup → at_pickup → in_flight → arriving → at_dropoff → delivered
- weather_hold · returning · cancelled · failed · returned
curl -X GET "https://dronkargom.com/api/partner/v1/shipments/<code>" \
-H "X-Api-Key: $DK_API_KEY" \
-H "Accept: application/json"$http = new \GuzzleHttp\Client(['base_uri' => 'https://dronkargom.com/api/partner/v1/', 'http_errors' => false]);
$res = $http->request('GET', 'shipments/<code>', [
'headers' => ['X-Api-Key' => getenv('DK_API_KEY'), 'Accept' => 'application/json'],
]);
$out = json_decode((string) $res->getBody(), true); // ['ok' => true, 'data' => …]const res = await fetch('https://dronkargom.com/api/partner/v1/shipments/<code>', {
method: 'GET',
headers: { 'X-Api-Key': process.env.DK_API_KEY, 'Accept': 'application/json' },
});
const { ok, data, error } = await res.json();{
"ok": true,
"data": {
"code": "<code>",
"status": "in_flight",
"status_label": "<label>",
"eta_at": "<ISO 8601>",
"events": [ { "type": "status", "to": "assigned", "label": "<label>", "at": "<ISO 8601>" }, … ]
}
}/shipments/{kod}/cancel
Cancels the shipment; the rules are the same as in the app: free before a drone is assigned, a cancellation fee after assignment, and no cancellation while the parcel is on the drone (DK_CANCEL_NOT_ALLOWED).
reason- optional, up to 255 characters
curl -X POST "https://dronkargom.com/api/partner/v1/shipments/<code>/cancel" \
-H "X-Api-Key: $DK_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"reason":"<reason>"}'$http = new \GuzzleHttp\Client(['base_uri' => 'https://dronkargom.com/api/partner/v1/', 'http_errors' => false]);
$res = $http->request('POST', 'shipments/<code>/cancel', [
'headers' => ['X-Api-Key' => getenv('DK_API_KEY'), 'Accept' => 'application/json'],
'json' => [
'reason' => '<reason>'
],
]);
$out = json_decode((string) $res->getBody(), true); // ['ok' => true, 'data' => …]const res = await fetch('https://dronkargom.com/api/partner/v1/shipments/<code>/cancel', {
method: 'POST',
headers: { 'X-Api-Key': process.env.DK_API_KEY, 'Accept': 'application/json', 'Content-Type': 'application/json' },
body: JSON.stringify({
"reason": "<reason>"
}),
});
const { ok, data, error } = await res.json();{
"ok": true,
"data": { "code": "<code>", "status": "cancelled", "cancel_reason": "<reason>", … }
}Tracking status changes
This version has no webhook notifications. You can query a shipment's status with GET /shipments/{kod}, and for bulk tracking read the GET /shipments list with the status and cursor filters. The recipient follows the flight live via the tracking_url link in the response.
If you need webhooks, bulk shipment endpoints or an integration tailored to your system, the details are shared in a business meeting. Business application
Error envelope
Errors always come back in the same shape; code is for machines, message can be shown to users.
{
"ok": false,
"error": { "code": "DK_QUOTE_EXPIRED", "message": "<message>", "details": null }
}| Code | HTTP | When |
|---|---|---|
AUTH_PARTNER | 401 | Key missing, wrong or revoked; or the company account is not active. |
VALIDATION | 422 | Missing or invalid field; details in details.errors. |
DK_OUT_OF_SERVICE_AREA | 422 | The address is outside the planning area (details.side: from / to). |
DK_NO_FLY_ENDPOINT | 422 | An endpoint is inside a no-fly area. |
DK_OUT_OF_RANGE | 422 | The route is beyond a single flight's range. |
DK_WEATHER_CLOSED | 409 | No flights can start right now because of the weather. |
DK_QUOTE_EXPIRED | 409 | The quote has expired; get a new quote. |
DK_NO_DRONE_AVAILABLE | 409 | No drone is free for Express; try Standard. |
DK_CREDIT_LIMIT_EXCEEDED | 409 | The company's monthly account limit has been reached. |
DK_CANCEL_NOT_ALLOWED | 409 | Cannot be cancelled at this stage (the parcel is on the drone). |
NOT_FOUND | 404 | Quote or shipment not found (another company's shipment also returns this code). |
— | 429 | Rate limit exceeded; wait a moment and try again. |
For bulk shipments you can use the CSV upload in the sender panel.
Need a key?
Admins of approved business accounts create the key themselves in the panel. If you do not have an account yet, submit your business application first.