cURL
curl --request PATCH \
--url https://take.app/api/v2/orders/{order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_method": "<string>",
"remark": "<string>",
"internal_note": "<string>"
}
'import requests
url = "https://take.app/api/v2/orders/{order_id}"
payload = {
"payment_method": "<string>",
"remark": "<string>",
"internal_note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payment_method: '<string>', remark: '<string>', internal_note: '<string>'})
};
fetch('https://take.app/api/v2/orders/{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://take.app/api/v2/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payment_method' => '<string>',
'remark' => '<string>',
'internal_note' => '<string>'
]),
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/{order_id}"
payload := strings.NewReader("{\n \"payment_method\": \"<string>\",\n \"remark\": \"<string>\",\n \"internal_note\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://take.app/api/v2/orders/{order_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method\": \"<string>\",\n \"remark\": \"<string>\",\n \"internal_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://take.app/api/v2/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_method\": \"<string>\",\n \"remark\": \"<string>\",\n \"internal_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "order",
"number": "<string>",
"name": "<string>",
"store": {
"id": "<string>",
"name": "<string>",
"alias": "<string>"
},
"order_status": "draft",
"payment_status": "pending",
"payment_method": "<string>",
"fulfillment_status": "unfulfilled",
"remark": "<string>",
"internal_note": "<string>",
"attribution": {
"channel": "meta_ctwa",
"ctwa_clid": "<string>",
"source_id": "<string>",
"source_type": "<string>",
"source_url": "<string>",
"headline": "<string>",
"conversation_id": "<string>",
"referred_at": "2023-11-07T05:31:56Z"
},
"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>",
"question_type": "QUESTION_TEXT",
"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>"
},
"table": {
"id": "<string>",
"name": "<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,
"amount_paid": 123,
"amount_due": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Orders
Update order
PATCH
/
api
/
v2
/
orders
/
{order_id}
cURL
curl --request PATCH \
--url https://take.app/api/v2/orders/{order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_method": "<string>",
"remark": "<string>",
"internal_note": "<string>"
}
'import requests
url = "https://take.app/api/v2/orders/{order_id}"
payload = {
"payment_method": "<string>",
"remark": "<string>",
"internal_note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payment_method: '<string>', remark: '<string>', internal_note: '<string>'})
};
fetch('https://take.app/api/v2/orders/{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://take.app/api/v2/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payment_method' => '<string>',
'remark' => '<string>',
'internal_note' => '<string>'
]),
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/{order_id}"
payload := strings.NewReader("{\n \"payment_method\": \"<string>\",\n \"remark\": \"<string>\",\n \"internal_note\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://take.app/api/v2/orders/{order_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method\": \"<string>\",\n \"remark\": \"<string>\",\n \"internal_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://take.app/api/v2/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_method\": \"<string>\",\n \"remark\": \"<string>\",\n \"internal_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "order",
"number": "<string>",
"name": "<string>",
"store": {
"id": "<string>",
"name": "<string>",
"alias": "<string>"
},
"order_status": "draft",
"payment_status": "pending",
"payment_method": "<string>",
"fulfillment_status": "unfulfilled",
"remark": "<string>",
"internal_note": "<string>",
"attribution": {
"channel": "meta_ctwa",
"ctwa_clid": "<string>",
"source_id": "<string>",
"source_type": "<string>",
"source_url": "<string>",
"headline": "<string>",
"conversation_id": "<string>",
"referred_at": "2023-11-07T05:31:56Z"
},
"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>",
"question_type": "QUESTION_TEXT",
"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>"
},
"table": {
"id": "<string>",
"name": "<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,
"amount_paid": 123,
"amount_due": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Body
application/json
Response
Order
Set by the merchant or by PATCH /orders/{order_id}, and can be changed without recording a payment, so it can read paid while amount_paid is 0. For reconciliation, use amount_paid and amount_due. Recording a payment with POST /orders/{order_id}/payments sets this from the balance.
Available options:
pending, confirming, partial, paid, refunded, voided