POST api/Orders
Add an order.
Request Information
URI Parameters
None.
Body Parameters
OrderHeadRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Note | string |
Max length: 4000 |
|
| CustomerNumber | integer |
None. |
|
| DeliveryAddress | DeliveryAddress |
None. |
|
| TimebookReservationId | globally unique identifier |
None. |
|
| CalendarEventId | integer |
None. |
|
| PaymentTransactionProviderId | string |
Max length: 56 |
|
| AgreementNo | integer |
None. |
|
| RetailPriceListId | globally unique identifier |
None. |
|
| SplitId | globally unique identifier |
None. |
|
| OrderLines | Collection of OrderLineRequest |
Required |
|
| OrderType | OrderType |
None. |
|
| SellerBranchId | integer |
Required |
|
| OrderDate | date |
Required |
|
| LicensePlate | string |
Max length: 15 |
|
| Odometer | integer |
None. |
|
| WorkOrderNumber | string |
Max length: 40 |
|
| SalesPerson | string |
Required Max length: 50 |
|
| CurrencyId | integer |
Required |
|
| CurrencyRate | decimal number |
Required |
|
| DeliveryDate | date |
None. |
|
| RequisitionOrderNumber | string |
Max length: 40 |
|
| TotalAmountIncludingVat | decimal number |
None. |
|
| TotalAmountExcludingVat | decimal number |
None. |
|
| RoundingAmount | decimal number |
None. |
|
| CustomerReference | string |
Max length: 40 |
|
| ContactId | globally unique identifier |
None. |
Remarks
None.
Example
//To get the order that is added, use following action:
//Gets the order with id 1 on branch 75
http://localhost/api/orders/1/75
Request Formats
application/json, text/json
Sample:
{
"Note": "sample string 1",
"CustomerNumber": 1,
"DeliveryAddress": {
"Name": "sample string 1",
"Address1": "sample string 2",
"Address2": "sample string 3",
"Address3": "sample string 4",
"PostalCode": "sample string 5",
"Town": "sample string 6",
"Country": "sample string 7",
"CountryCode": "sample string 8"
},
"TimebookReservationId": "a90dc33d-35fb-428a-b4c8-ce9b1ccd846d",
"CalendarEventId": 1,
"PaymentTransactionProviderId": "sample string 2",
"AgreementNo": 1,
"RetailPriceListId": "37ce66c3-4e1d-4842-9e52-fefecc2352d2",
"SplitId": "9d822083-4581-4cca-9d5f-b1d14e26895e",
"OrderLines": [
{
"OrderLineArticle": {
"SalesAccount": 1,
"StockNumber": 1,
"CostPrice": 2.0,
"IsExportWithinEU": true,
"OrderType": 0,
"ArticleNumber": 4,
"Quantity": 5.0,
"Description": "sample string 6",
"Price": 7.0,
"DiscountFactor": 8.0,
"Amount": 9.0,
"VatPercent": 10.0,
"VatAmount": 11.0,
"HasVat": true,
"IsExport": true
},
"OrderLineText": {
"Text": "sample string 1"
},
"LineNumber": 1,
"ParentLineNumber": 1,
"IsArticlePackageLine": true,
"HasFixedQuantity": true
},
{
"OrderLineArticle": {
"SalesAccount": 1,
"StockNumber": 1,
"CostPrice": 2.0,
"IsExportWithinEU": true,
"OrderType": 0,
"ArticleNumber": 4,
"Quantity": 5.0,
"Description": "sample string 6",
"Price": 7.0,
"DiscountFactor": 8.0,
"Amount": 9.0,
"VatPercent": 10.0,
"VatAmount": 11.0,
"HasVat": true,
"IsExport": true
},
"OrderLineText": {
"Text": "sample string 1"
},
"LineNumber": 1,
"ParentLineNumber": 1,
"IsArticlePackageLine": true,
"HasFixedQuantity": true
}
],
"OrderType": 1,
"SellerBranchId": 3,
"OrderDate": "2026-01-21 22:50:35",
"LicensePlate": "sample string 5",
"Odometer": 1,
"WorkOrderNumber": "sample string 6",
"SalesPerson": "sample string 7",
"CurrencyId": 8,
"CurrencyRate": 9.0,
"DeliveryDate": "2026-01-21 22:50:35",
"RequisitionOrderNumber": "sample string 10",
"TotalAmountIncludingVat": 1.0,
"TotalAmountExcludingVat": 1.0,
"RoundingAmount": 1.0,
"CustomerReference": "sample string 11",
"ContactId": "fc7f433b-e85f-47b7-bcb1-da1ab9bc009a"
}
application/xml, text/xml
Sample:
<OrderHeadRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Order">
<ContactId>fc7f433b-e85f-47b7-bcb1-da1ab9bc009a</ContactId>
<CurrencyId>8</CurrencyId>
<CurrencyRate>9</CurrencyRate>
<CustomerNumber>1</CustomerNumber>
<CustomerReference>sample string 11</CustomerReference>
<DeliveryDate>2026-01-21T22:50:35.2275114+01:00</DeliveryDate>
<LicensePlate>sample string 5</LicensePlate>
<Odometer>1</Odometer>
<OrderDate>2026-01-21T22:50:35.2275114+01:00</OrderDate>
<OrderType>NormalOrder</OrderType>
<RequisitionOrderNumber>sample string 10</RequisitionOrderNumber>
<RoundingAmount>1</RoundingAmount>
<SalesPerson>sample string 7</SalesPerson>
<SellerBranchId>3</SellerBranchId>
<TotalAmountExcludingVat>1</TotalAmountExcludingVat>
<TotalAmountIncludingVat>1</TotalAmountIncludingVat>
<WorkOrderNumber>sample string 6</WorkOrderNumber>
<AgreementNo>1</AgreementNo>
<CalendarEventId>1</CalendarEventId>
<DeliveryAddress>
<Address1>sample string 2</Address1>
<Address2>sample string 3</Address2>
<Address3>sample string 4</Address3>
<Country>sample string 7</Country>
<CountryCode>sample string 8</CountryCode>
<Name>sample string 1</Name>
<PostalCode>sample string 5</PostalCode>
<Town>sample string 6</Town>
</DeliveryAddress>
<Note>sample string 1</Note>
<OrderLines>
<OrderLineRequest>
<HasFixedQuantity>true</HasFixedQuantity>
<IsArticlePackageLine>true</IsArticlePackageLine>
<LineNumber>1</LineNumber>
<ParentLineNumber>1</ParentLineNumber>
<OrderLineArticle>
<Amount>9</Amount>
<ArticleNumber>4</ArticleNumber>
<Description>sample string 6</Description>
<DiscountFactor>8</DiscountFactor>
<HasVat>true</HasVat>
<IsExport>true</IsExport>
<Price>7</Price>
<Quantity>5</Quantity>
<VatAmount>11</VatAmount>
<VatPercent>10</VatPercent>
<CostPrice>2</CostPrice>
<IsExportWithinEU>true</IsExportWithinEU>
<OrderType>UnAffected</OrderType>
<SalesAccount>1</SalesAccount>
<StockNumber>1</StockNumber>
</OrderLineArticle>
<OrderLineText>
<Text>sample string 1</Text>
</OrderLineText>
</OrderLineRequest>
<OrderLineRequest>
<HasFixedQuantity>true</HasFixedQuantity>
<IsArticlePackageLine>true</IsArticlePackageLine>
<LineNumber>1</LineNumber>
<ParentLineNumber>1</ParentLineNumber>
<OrderLineArticle>
<Amount>9</Amount>
<ArticleNumber>4</ArticleNumber>
<Description>sample string 6</Description>
<DiscountFactor>8</DiscountFactor>
<HasVat>true</HasVat>
<IsExport>true</IsExport>
<Price>7</Price>
<Quantity>5</Quantity>
<VatAmount>11</VatAmount>
<VatPercent>10</VatPercent>
<CostPrice>2</CostPrice>
<IsExportWithinEU>true</IsExportWithinEU>
<OrderType>UnAffected</OrderType>
<SalesAccount>1</SalesAccount>
<StockNumber>1</StockNumber>
</OrderLineArticle>
<OrderLineText>
<Text>sample string 1</Text>
</OrderLineText>
</OrderLineRequest>
</OrderLines>
<PaymentTransactionProviderId>sample string 2</PaymentTransactionProviderId>
<RetailPriceListId>37ce66c3-4e1d-4842-9e52-fefecc2352d2</RetailPriceListId>
<SplitId>9d822083-4581-4cca-9d5f-b1d14e26895e</SplitId>
<TimebookReservationId>a90dc33d-35fb-428a-b4c8-ce9b1ccd846d</TimebookReservationId>
</OrderHeadRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
OrderId
integerResponse Formats
application/json, text/json
Sample:
1
application/xml, text/xml
Sample:
<long xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</long>