curl --request POST \
--url https://take.app/api/v2/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com"
},
"total_amount": 1,
"line_items": [],
"answers": [
{
"question_id": "<string>",
"text": "<string>",
"answers": [
"<string>"
],
"option_ids": [
"<string>"
],
"prices": [
123
]
}
],
"remark": "<string>",
"schedule": {
"date": "2023-11-07T05:31:56Z",
"time": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://take.app/api/v2/orders"
payload = {
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com"
},
"total_amount": 1,
"line_items": [],
"answers": [
{
"question_id": "<string>",
"text": "<string>",
"answers": ["<string>"],
"option_ids": ["<string>"],
"prices": [123]
}
],
"remark": "<string>",
"schedule": {
"date": "2023-11-07T05:31:56Z",
"time": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer: {name: '<string>', phone: '<string>', email: 'jsmith@example.com'},
total_amount: 1,
line_items: [],
answers: [
{
question_id: '<string>',
text: '<string>',
answers: ['<string>'],
option_ids: ['<string>'],
prices: [123]
}
],
remark: '<string>',
schedule: {date: '2023-11-07T05:31:56Z', time: '2023-11-07T05:31:56Z'}
})
};
fetch('https://take.app/api/v2/orders', 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://take.app/api/v2/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer' => [
'name' => '<string>',
'phone' => '<string>',
'email' => 'jsmith@example.com'
],
'total_amount' => 1,
'line_items' => [
],
'answers' => [
[
'question_id' => '<string>',
'text' => '<string>',
'answers' => [
'<string>'
],
'option_ids' => [
'<string>'
],
'prices' => [
123
]
]
],
'remark' => '<string>',
'schedule' => [
'date' => '2023-11-07T05:31:56Z',
'time' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://take.app/api/v2/orders"
payload := strings.NewReader("{\n \"customer\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"total_amount\": 1,\n \"line_items\": [],\n \"answers\": [\n {\n \"question_id\": \"<string>\",\n \"text\": \"<string>\",\n \"answers\": [\n \"<string>\"\n ],\n \"option_ids\": [\n \"<string>\"\n ],\n \"prices\": [\n 123\n ]\n }\n ],\n \"remark\": \"<string>\",\n \"schedule\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"time\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://take.app/api/v2/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"total_amount\": 1,\n \"line_items\": [],\n \"answers\": [\n {\n \"question_id\": \"<string>\",\n \"text\": \"<string>\",\n \"answers\": [\n \"<string>\"\n ],\n \"option_ids\": [\n \"<string>\"\n ],\n \"prices\": [\n 123\n ]\n }\n ],\n \"remark\": \"<string>\",\n \"schedule\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"time\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://take.app/api/v2/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"total_amount\": 1,\n \"line_items\": [],\n \"answers\": [\n {\n \"question_id\": \"<string>\",\n \"text\": \"<string>\",\n \"answers\": [\n \"<string>\"\n ],\n \"option_ids\": [\n \"<string>\"\n ],\n \"prices\": [\n 123\n ]\n }\n ],\n \"remark\": \"<string>\",\n \"schedule\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"time\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "order",
"number": "<string>",
"name": "<string>",
"store": {
"id": "<string>",
"name": "<string>",
"alias": "<string>"
},
"payment_method": "<string>",
"remark": "<string>",
"internal_note": "<string>",
"customer": {
"id": "<string>",
"object": "customer",
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address": {
"address1": "<string>",
"address2": "<string>",
"district": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"line_items": [
{
"id": "<string>",
"object": "order_line_item",
"product_id": "<string>",
"variant_id": "<string>",
"name": "<string>",
"sku": "<string>",
"quantity": 123,
"quantity_float": 123,
"unit": "<string>",
"unit_value": 123,
"price": 123,
"total_amount": 123,
"options": [
{
"question_id": "<string>",
"question_text": "<string>",
"question_type": "<string>",
"answers": [
"<string>"
],
"prices": [
123
],
"quantities": [
123
],
"option_ids": [
"<string>"
],
"text": "<string>",
"image_urls": [
"<string>"
]
}
],
"image_urls": [
"<string>"
]
}
],
"answers": [
{
"id": "<string>",
"object": "order_answer",
"question_id": "<string>",
"question_text": "<string>",
"answers": [
"<string>"
],
"prices": [
123
],
"option_ids": [
"<string>"
],
"image_urls": [
"<string>"
]
}
],
"discounts": [
{
"id": "<string>",
"name": "<string>",
"amount": 123,
"type": "<string>"
}
],
"service": {
"title": "<string>",
"name": "<string>",
"price": 123,
"distance": 123,
"distance_unit": "<string>",
"location": {
"address1": "<string>",
"address2": "<string>",
"district": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
}
},
"schedule": {
"date": "2023-11-07T05:31:56Z",
"time": "2023-11-07T05:31:56Z",
"time_end": "2023-11-07T05:31:56Z",
"timezone": "<string>"
},
"items_quantity": 123,
"items_amount": 123,
"answers_amount": 123,
"discounts_amount": 123,
"service_amount": 123,
"service_charge_amount": 123,
"tip_amount": 123,
"adjustment_amount": 123,
"total_before_tax": 123,
"tax_amount": 123,
"total_amount": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Create order
curl --request POST \
--url https://take.app/api/v2/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com"
},
"total_amount": 1,
"line_items": [],
"answers": [
{
"question_id": "<string>",
"text": "<string>",
"answers": [
"<string>"
],
"option_ids": [
"<string>"
],
"prices": [
123
]
}
],
"remark": "<string>",
"schedule": {
"date": "2023-11-07T05:31:56Z",
"time": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://take.app/api/v2/orders"
payload = {
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com"
},
"total_amount": 1,
"line_items": [],
"answers": [
{
"question_id": "<string>",
"text": "<string>",
"answers": ["<string>"],
"option_ids": ["<string>"],
"prices": [123]
}
],
"remark": "<string>",
"schedule": {
"date": "2023-11-07T05:31:56Z",
"time": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer: {name: '<string>', phone: '<string>', email: 'jsmith@example.com'},
total_amount: 1,
line_items: [],
answers: [
{
question_id: '<string>',
text: '<string>',
answers: ['<string>'],
option_ids: ['<string>'],
prices: [123]
}
],
remark: '<string>',
schedule: {date: '2023-11-07T05:31:56Z', time: '2023-11-07T05:31:56Z'}
})
};
fetch('https://take.app/api/v2/orders', 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://take.app/api/v2/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer' => [
'name' => '<string>',
'phone' => '<string>',
'email' => 'jsmith@example.com'
],
'total_amount' => 1,
'line_items' => [
],
'answers' => [
[
'question_id' => '<string>',
'text' => '<string>',
'answers' => [
'<string>'
],
'option_ids' => [
'<string>'
],
'prices' => [
123
]
]
],
'remark' => '<string>',
'schedule' => [
'date' => '2023-11-07T05:31:56Z',
'time' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://take.app/api/v2/orders"
payload := strings.NewReader("{\n \"customer\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"total_amount\": 1,\n \"line_items\": [],\n \"answers\": [\n {\n \"question_id\": \"<string>\",\n \"text\": \"<string>\",\n \"answers\": [\n \"<string>\"\n ],\n \"option_ids\": [\n \"<string>\"\n ],\n \"prices\": [\n 123\n ]\n }\n ],\n \"remark\": \"<string>\",\n \"schedule\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"time\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://take.app/api/v2/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"total_amount\": 1,\n \"line_items\": [],\n \"answers\": [\n {\n \"question_id\": \"<string>\",\n \"text\": \"<string>\",\n \"answers\": [\n \"<string>\"\n ],\n \"option_ids\": [\n \"<string>\"\n ],\n \"prices\": [\n 123\n ]\n }\n ],\n \"remark\": \"<string>\",\n \"schedule\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"time\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://take.app/api/v2/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"total_amount\": 1,\n \"line_items\": [],\n \"answers\": [\n {\n \"question_id\": \"<string>\",\n \"text\": \"<string>\",\n \"answers\": [\n \"<string>\"\n ],\n \"option_ids\": [\n \"<string>\"\n ],\n \"prices\": [\n 123\n ]\n }\n ],\n \"remark\": \"<string>\",\n \"schedule\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"time\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "order",
"number": "<string>",
"name": "<string>",
"store": {
"id": "<string>",
"name": "<string>",
"alias": "<string>"
},
"payment_method": "<string>",
"remark": "<string>",
"internal_note": "<string>",
"customer": {
"id": "<string>",
"object": "customer",
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address": {
"address1": "<string>",
"address2": "<string>",
"district": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"line_items": [
{
"id": "<string>",
"object": "order_line_item",
"product_id": "<string>",
"variant_id": "<string>",
"name": "<string>",
"sku": "<string>",
"quantity": 123,
"quantity_float": 123,
"unit": "<string>",
"unit_value": 123,
"price": 123,
"total_amount": 123,
"options": [
{
"question_id": "<string>",
"question_text": "<string>",
"question_type": "<string>",
"answers": [
"<string>"
],
"prices": [
123
],
"quantities": [
123
],
"option_ids": [
"<string>"
],
"text": "<string>",
"image_urls": [
"<string>"
]
}
],
"image_urls": [
"<string>"
]
}
],
"answers": [
{
"id": "<string>",
"object": "order_answer",
"question_id": "<string>",
"question_text": "<string>",
"answers": [
"<string>"
],
"prices": [
123
],
"option_ids": [
"<string>"
],
"image_urls": [
"<string>"
]
}
],
"discounts": [
{
"id": "<string>",
"name": "<string>",
"amount": 123,
"type": "<string>"
}
],
"service": {
"title": "<string>",
"name": "<string>",
"price": 123,
"distance": 123,
"distance_unit": "<string>",
"location": {
"address1": "<string>",
"address2": "<string>",
"district": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
}
},
"schedule": {
"date": "2023-11-07T05:31:56Z",
"time": "2023-11-07T05:31:56Z",
"time_end": "2023-11-07T05:31:56Z",
"timezone": "<string>"
},
"items_quantity": 123,
"items_amount": 123,
"answers_amount": 123,
"discounts_amount": 123,
"service_amount": 123,
"service_charge_amount": 123,
"tip_amount": 123,
"adjustment_amount": 123,
"total_before_tax": 123,
"tax_amount": 123,
"total_amount": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Merchant API V2 token. Pass as Authorization: Bearer <token>.
Body
Response
Order
order Show child attributes
Show child attributes
draft, pending, confirmed, completed, cancelled pending, confirming, partial, paid, refunded, voided unfulfilled, ready, in_transit, out_for_delivery, fulfilled, partially_fulfilled Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).
Integer amount in the smallest unit of the store currency (e.g. cents).