Accept Order
curl --request PUT \
--url https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id} \
--header 'Access-Token: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"preparing_time": 123
}
'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}"
payload = { "preparing_time": 123 }
headers = {
"Access-Token": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Access-Token': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({preparing_time: 123})
};
fetch('https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'preparing_time' => 123
]),
CURLOPT_HTTPHEADER => [
"Access-Token: <api-key>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}"
payload := strings.NewReader("{\n \"preparing_time\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Access-Token", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}")
.header("Access-Token", "<api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"preparing_time\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Access-Token"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"preparing_time\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": false,
"error": "eksik alan",
"message": "preparing_time is required"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "sipariş bulunamadı"
}
{
"status": false,
"error": "yetkisiz erişim"
}
Orders
Accept Order
Accept a new order and set preparation time
PUT
/
orders
/
accept
/
{order_id}
Accept Order
curl --request PUT \
--url https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id} \
--header 'Access-Token: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"preparing_time": 123
}
'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}"
payload = { "preparing_time": 123 }
headers = {
"Access-Token": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Access-Token': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({preparing_time: 123})
};
fetch('https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'preparing_time' => 123
]),
CURLOPT_HTTPHEADER => [
"Access-Token: <api-key>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}"
payload := strings.NewReader("{\n \"preparing_time\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Access-Token", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}")
.header("Access-Token", "<api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"preparing_time\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Access-Token"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"preparing_time\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": false,
"error": "eksik alan",
"message": "preparing_time is required"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "sipariş bulunamadı"
}
{
"status": false,
"error": "yetkisiz erişim"
}
Overview
Accepts an order that’s inRECEIVED status and changes it to CONFIRMED. You must provide the estimated preparation time in minutes.
Path Parameters
string
required
Order’s
payment_key (UUID) from the /get-current responseHeaders
string
required
Your API access token
string
required
Must be
application/jsonBody Parameters
integer
required
Estimated preparation time in minutes (e.g., 30)
Response
boolean
true if successfulstring
"OK" on successExamples
curl -X PUT https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/3e9caf87-5cb7-4c4e-adcb-fc2ec54cf24e \
-H 'Access-Token: your-access-token' \
-H 'Content-Type: application/json' \
-d '{"preparing_time": 30}'
const response = await fetch(
'https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/3e9caf87-5cb7-4c4e-adcb-fc2ec54cf24e',
{
method: 'PUT',
headers: {
'Access-Token': 'your-access-token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
preparing_time: 30
})
}
);
const data = await response.json();
import requests
response = requests.put(
'https://www.xn--dkkango-n2a.com/api/integrations/orders/accept/3e9caf87-5cb7-4c4e-adcb-fc2ec54cf24e',
headers={
'Access-Token': 'your-access-token',
'Content-Type': 'application/json'
},
json={'preparing_time': 30}
)
data = response.json()
Success Response (200)
{
"status": true,
"data": "OK"
}
Error Responses
{
"status": false,
"error": "eksik alan",
"message": "preparing_time is required"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "sipariş bulunamadı"
}
{
"status": false,
"error": "yetkisiz erişim"
}
Status Transition
RECEIVED (status_id: 1)
↓
[/orders/accept called]
↓
CONFIRMED (status_id: 2)
After accepting, the order status history is automatically updated by the database trigger.
Integration Flow
1
Receive Order
Get order from
/orders/get-current with status_id: 12
Acknowledge
Call
/orders/success/{payment_key} to acknowledge receipt3
Review
Staff reviews order details and decides to accept/reject
4
Accept
Call
/orders/accept/{payment_key} with estimated prep time5
Prepare
Kitchen prepares the order
Preparation Time Guidelines
How to Calculate
How to Calculate
Consider:
- Current kitchen load
- Order complexity (number of items, modifiers)
- Time of day
- Staff availability
Recommended Values
Recommended Values
- Simple orders: 15-20 minutes
- Medium orders: 25-35 minutes
- Complex orders: 35-45 minutes
- Peak hours: Add 10-15 minutes buffer
Impact on Customer
Impact on Customer
The preparation time is communicated to the customer and affects:
- Estimated delivery time
- Courier dispatch timing
- Customer satisfaction
Always use the
payment_key (UUID) from the order object, not the id (integer).Related Endpoints
Get Current Orders
Fetch orders to accept
Cancel Order
Reject/cancel order instead
Mark On The Way
Next step after preparation
Order Lifecycle
Complete order flow