curl --request POST \
--url https://app.polygon-one.com/api/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
],
"deliveryDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.polygon-one.com/api/orders"
payload = {
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
],
"deliveryDate": "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({
supplierId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
orderNumber: '<string>',
orderDate: '2023-11-07T05:31:56Z',
lines: [
{
articleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 1,
pieceCount: 2,
volumeM3: 1,
dryWeight90Kg: 1
}
],
deliveryDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.polygon-one.com/api/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://app.polygon-one.com/api/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([
'supplierId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'orderNumber' => '<string>',
'orderDate' => '2023-11-07T05:31:56Z',
'lines' => [
[
'articleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 1,
'pieceCount' => 2,
'volumeM3' => 1,
'dryWeight90Kg' => 1
]
],
'deliveryDate' => '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://app.polygon-one.com/api/orders"
payload := strings.NewReader("{\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\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 \"deliveryDate\": \"2023-11-07T05:31:56Z\"\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://app.polygon-one.com/api/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\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 \"deliveryDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/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 \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\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 \"deliveryDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"orderType": "purchase",
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"contactName": "<string>",
"country": "<string>",
"externalSupplierId": "<string>",
"address": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"additional": "<string>",
"validated": true,
"latitude": 123,
"longitude": 123
},
"status": "data_incomplete",
"isCompanySelf": true,
"articles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"internalArticleNr": "<string>",
"externalArticleNr": "<string>",
"hsCode": "<string>",
"ean": "<string>",
"shortDescription": "<string>",
"eudrRelevant": true,
"articleType": "purchase",
"commodityGroup": "cattle",
"suppliers": "<array>",
"complianceResults": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supplierArticleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"overallStatus": "compliant",
"geoStatus": "compliant",
"legalStatus": "compliant",
"generatedReportUrl": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"countryOfProduction": "<string>"
}
]
},
"totalVolume": 123,
"lines": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"article": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"internalArticleNr": "<string>",
"externalArticleNr": "<string>",
"hsCode": "<string>",
"ean": "<string>",
"shortDescription": "<string>",
"eudrRelevant": true,
"articleType": "purchase",
"commodityGroup": "cattle",
"suppliers": "<array>",
"complianceResults": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supplierArticleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"overallStatus": "compliant",
"geoStatus": "compliant",
"legalStatus": "compliant",
"generatedReportUrl": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"countryOfProduction": "<string>"
},
"quantity": 123,
"pieceCount": 123,
"volumeM3": 123,
"dryWeight90Kg": 123
}
],
"ddsReferences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referenceNumber": "<string>",
"verificationNumber": "<string>"
}
]
}
}{
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"statusUrl": "/api/import-jobs/6f7a…"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "batchTooLarge",
"maxBatchSize": 5000
}{
"error": "<string>",
"details": "<unknown>"
}Create Order
Create a single order (synchronous), or bulk-import orders (asynchronous). Batch imports use a flat structure — each row is one order line, grouped by orderNumber; supplier/article are resolved by name/number; orders upsert idempotently on orderNumber. After import, the system automatically attempts to assign each order to a matching DDS statement if auto-assignment is enabled. A batch that names an order must carry ALL of that order’s lines — a batch that would delete stored lines fails with lineReplacementRequired unless the envelope sets "replaceLines": true. Batch form (array, or {"rows": […]} envelope, max 5000 rows) is asynchronous: it stages an import job and returns 202 with a jobId — poll GET /api/import-jobs/{jobId} for progress and the final result. A single object stays synchronous (201). See the Batch Import guide.
curl --request POST \
--url https://app.polygon-one.com/api/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
],
"deliveryDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.polygon-one.com/api/orders"
payload = {
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"lines": [
{
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"pieceCount": 2,
"volumeM3": 1,
"dryWeight90Kg": 1
}
],
"deliveryDate": "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({
supplierId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
orderNumber: '<string>',
orderDate: '2023-11-07T05:31:56Z',
lines: [
{
articleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 1,
pieceCount: 2,
volumeM3: 1,
dryWeight90Kg: 1
}
],
deliveryDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.polygon-one.com/api/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://app.polygon-one.com/api/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([
'supplierId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'orderNumber' => '<string>',
'orderDate' => '2023-11-07T05:31:56Z',
'lines' => [
[
'articleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 1,
'pieceCount' => 2,
'volumeM3' => 1,
'dryWeight90Kg' => 1
]
],
'deliveryDate' => '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://app.polygon-one.com/api/orders"
payload := strings.NewReader("{\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\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 \"deliveryDate\": \"2023-11-07T05:31:56Z\"\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://app.polygon-one.com/api/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\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 \"deliveryDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/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 \"supplierId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"orderNumber\": \"<string>\",\n \"orderDate\": \"2023-11-07T05:31:56Z\",\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 \"deliveryDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"orderDate": "2023-11-07T05:31:56Z",
"orderType": "purchase",
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"contactName": "<string>",
"country": "<string>",
"externalSupplierId": "<string>",
"address": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"additional": "<string>",
"validated": true,
"latitude": 123,
"longitude": 123
},
"status": "data_incomplete",
"isCompanySelf": true,
"articles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"internalArticleNr": "<string>",
"externalArticleNr": "<string>",
"hsCode": "<string>",
"ean": "<string>",
"shortDescription": "<string>",
"eudrRelevant": true,
"articleType": "purchase",
"commodityGroup": "cattle",
"suppliers": "<array>",
"complianceResults": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supplierArticleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"overallStatus": "compliant",
"geoStatus": "compliant",
"legalStatus": "compliant",
"generatedReportUrl": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"countryOfProduction": "<string>"
}
]
},
"totalVolume": 123,
"lines": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"article": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"internalArticleNr": "<string>",
"externalArticleNr": "<string>",
"hsCode": "<string>",
"ean": "<string>",
"shortDescription": "<string>",
"eudrRelevant": true,
"articleType": "purchase",
"commodityGroup": "cattle",
"suppliers": "<array>",
"complianceResults": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supplierArticleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"overallStatus": "compliant",
"geoStatus": "compliant",
"legalStatus": "compliant",
"generatedReportUrl": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"countryOfProduction": "<string>"
},
"quantity": 123,
"pieceCount": 123,
"volumeM3": 123,
"dryWeight90Kg": 123
}
],
"ddsReferences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referenceNumber": "<string>",
"verificationNumber": "<string>"
}
]
}
}{
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"statusUrl": "/api/import-jobs/6f7a…"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "batchTooLarge",
"maxBatchSize": 5000
}{
"error": "<string>",
"details": "<unknown>"
}Authorizations
API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.
Body
- Option 1 · object
- Option 2 · object[]
- Option 3 · object
ISO 8601 date string
purchase = inbound order from a supplier, sale = outbound order to a customer
purchase, sale 1Show child attributes
Show child attributes
Optional ISO 8601 delivery date. Often unknown at order time.
Response
Order created successfully (single)
Show child attributes
Show child attributes