Update Order
curl --request PATCH \
--url https://app.polygon-one.com/api/orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"deliveryDate": "2023-11-07T05:31:56Z",
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
]
}
'import requests
url = "https://app.polygon-one.com/api/orders/{id}"
payload = {
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"deliveryDate": "2023-11-07T05:31:56Z",
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
]
}
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({
orderNumber: '<string>',
orderDate: '2023-11-07T05:31:56Z',
deliveryDate: '2023-11-07T05:31:56Z',
supplierId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lines: [
{
articleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 1,
pieceCount: 2,
volumeM3: 1,
dryWeight90Kg: 1
}
]
})
};
fetch('https://app.polygon-one.com/api/orders/{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://app.polygon-one.com/api/orders/{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([
'orderNumber' => '<string>',
'orderDate' => '2023-11-07T05:31:56Z',
'deliveryDate' => '2023-11-07T05:31:56Z',
'supplierId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lines' => [
[
'articleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 1,
'pieceCount' => 2,
'volumeM3' => 1,
'dryWeight90Kg' => 1
]
]
]),
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://app.polygon-one.com/api/orders/{id}"
payload := strings.NewReader("{\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\n \"deliveryDate\": \"2023-11-07T05:31:56Z\",\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"articleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 1,\n \"pieceCount\": 2,\n \"volumeM3\": 1,\n \"dryWeight90Kg\": 1\n }\n ]\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://app.polygon-one.com/api/orders/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\n \"deliveryDate\": \"2023-11-07T05:31:56Z\",\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"articleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 1,\n \"pieceCount\": 2,\n \"volumeM3\": 1,\n \"dryWeight90Kg\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/orders/{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 \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\n \"deliveryDate\": \"2023-11-07T05:31:56Z\",\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"articleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 1,\n \"pieceCount\": 2,\n \"volumeM3\": 1,\n \"dryWeight90Kg\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>",
"details": "<unknown>"
}Orders
Update Order
Update order fields (orderNumber, orderDate, supplierId) and/or replace order lines. When lines is provided, all existing lines are replaced.
PATCH
/
api
/
orders
/
{id}
Update Order
curl --request PATCH \
--url https://app.polygon-one.com/api/orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"deliveryDate": "2023-11-07T05:31:56Z",
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
]
}
'import requests
url = "https://app.polygon-one.com/api/orders/{id}"
payload = {
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"deliveryDate": "2023-11-07T05:31:56Z",
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
]
}
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({
orderNumber: '<string>',
orderDate: '2023-11-07T05:31:56Z',
deliveryDate: '2023-11-07T05:31:56Z',
supplierId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lines: [
{
articleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 1,
pieceCount: 2,
volumeM3: 1,
dryWeight90Kg: 1
}
]
})
};
fetch('https://app.polygon-one.com/api/orders/{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://app.polygon-one.com/api/orders/{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([
'orderNumber' => '<string>',
'orderDate' => '2023-11-07T05:31:56Z',
'deliveryDate' => '2023-11-07T05:31:56Z',
'supplierId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lines' => [
[
'articleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 1,
'pieceCount' => 2,
'volumeM3' => 1,
'dryWeight90Kg' => 1
]
]
]),
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://app.polygon-one.com/api/orders/{id}"
payload := strings.NewReader("{\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\n \"deliveryDate\": \"2023-11-07T05:31:56Z\",\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"articleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 1,\n \"pieceCount\": 2,\n \"volumeM3\": 1,\n \"dryWeight90Kg\": 1\n }\n ]\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://app.polygon-one.com/api/orders/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\n \"deliveryDate\": \"2023-11-07T05:31:56Z\",\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"articleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 1,\n \"pieceCount\": 2,\n \"volumeM3\": 1,\n \"dryWeight90Kg\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/orders/{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 \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\n \"deliveryDate\": \"2023-11-07T05:31:56Z\",\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"articleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 1,\n \"pieceCount\": 2,\n \"volumeM3\": 1,\n \"dryWeight90Kg\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>",
"details": "<unknown>"
}Authorizations
API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.
Path Parameters
Body
application/json
Update order fields and/or replace order lines. When lines is provided, all existing lines are deleted and replaced.
Response
Updated successfully
⌘I