Skip to main content
POST
/
api
/
orders
Create Order
curl --request POST \
  --url https://app.polygonone.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",
  "orderType": "purchase",
  "lines": [
    {
      "articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 2
    }
  ]
}
'
{
  "imported": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "orderNumber": "<string>"
    }
  ],
  "failed": [
    {
      "orderNumber": "<string>",
      "error": "<string>"
    }
  ],
  "skipped": 123
}

Authorizations

Authorization
string
header
required

API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.

Body

application/json
supplierId
string<uuid>
required
orderNumber
string
required
orderDate
string<date-time>
required

ISO 8601 date string

orderType
enum<string>
required

purchase = inbound order from a supplier, sale = outbound order to a customer

Available options:
purchase,
sale
lines
object[]
required
Minimum array length: 1

Response

Batch import result

imported
object[]
failed
object[]
skipped
integer