Create order
An endpoint for creating an API order at Danoffice IT.
Authorization
X-Api-Key X-Api-Key<token>
In: header
Request Body
application/json
The complete order payload for a new API order.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://gateway.cc-test.danofficeit.net/orders/create" \ -H "Content-Type: application/json" \ -d '{ "externalDocumentNumber": "PO-836123", "type": "New", "invoice": { "id": "CUST1234", "vatNumber": "DK99 99 99 99", "companyName": "Danoffice IT Aps", "attentionName": "John Doit", "address1": "Englandsvej 14", "address2": null, "city": "Svendborg", "zipCode": "5700", "stateName": null, "countryIso2": "DK" }, "consignee": null, "sellTo": { "id": null, "companyName": "Danoffice IT Aps", "contact": { "firstName": "John", "lastName": "Doit", "phoneNumber": "+4512345678", "email": "john@doit.com" }, "address1": "Englandsvej 14", "address2": null, "city": "Svendborg", "zipCode": "5700", "stateName": null, "countryIso2": "DK" }, "shipping": { "id": null, "companyName": "Danoffice IT Aps", "deliveryAt": "Office", "contact": { "firstName": "Jane", "lastName": "Doit", "phoneNumber": "+4598765432", "email": "jane@doit.com" }, "address1": "Englandsvej 14", "address2": null, "city": "Svendborg", "zipCode": "5700", "stateName": null, "countryIso2": "DK" }, "orderLines": [ { "itemNumber": "CUST-213KD-941", "quantity": 2, "customerReference": "LINE-1", "comments": null, "lineRef1": null, "lineRef2": null, "lineRef3": null, "lineRef4": null }, { "itemNumber": "CUST-213KD-942", "quantity": 1, "customerReference": "LINE-2", "comments": null, "lineRef1": null, "lineRef2": null, "lineRef3": null, "lineRef4": null } ] }'{
"success": true,
"data": {
"correlationId": "ada0301a-3128-4690-a44b-a268d07e36d3"
},
"error": null,
"meta": {
"timestamp": "2026-03-24T10:30:00+00:00",
"correlationId": "ada0301a-3128-4690-a44b-a268d07e36d3"
}
}{
"success": false,
"data": null,
"error": {
"code": "INVALID_PAYLOAD",
"message": "The request body could not be parsed. Ensure the body is valid JSON.",
"details": null
},
"meta": {
"timestamp": "2026-03-24T10:30:00+00:00",
"correlationId": "ada0301a-3128-4690-a44b-a268d07e36d3"
}
}{
"success": false,
"data": null,
"error": {
"code": "DUPLICATE_ORDER",
"message": "An order with external document number 'PO-836123' already exists.",
"details": null
},
"meta": {
"timestamp": "2026-03-24T10:30:00+00:00",
"correlationId": "ada0301a-3128-4690-a44b-a268d07e36d3"
}
}{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_FAILED",
"message": "One or more validation errors occurred.",
"details": {
"Invoice.Id": [
"'Invoice Id' must not be empty."
],
"Shipping.CountryIso2": [
"'XX' is not a recognised ISO 3166-1 alpha-2 country code."
],
"OrderLines": [
"'Order Lines' must not be empty."
]
}
},
"meta": {
"timestamp": "2026-03-24T10:30:00+00:00",
"correlationId": "ada0301a-3128-4690-a44b-a268d07e36d3"
}
}{
"success": false,
"data": null,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred. Please try again later.",
"details": null
},
"meta": {
"timestamp": "2026-03-24T10:30:00+00:00",
"correlationId": "ada0301a-3128-4690-a44b-a268d07e36d3"
}
}