Zum Hauptinhalt springen
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",
  "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
}

Autorisierungen

Authorization
string
header
erforderlich

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

Body

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

ISO 8601 date string

orderType
enum<string>
erforderlich

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

Verfügbare Optionen:
purchase,
sale
lines
object[]
erforderlich
Minimum array length: 1

Antwort

Batch import result

imported
object[]
failed
object[]
skipped
integer