POST - CustomerOrder
Post customer order
URL
Verb |
Url |
Json object |
POST - Basic authentication |
/api/CustomerOrder |
APICustomerOrder |
Request Parameters
Parameter |
Description |
Format |
Not applicable |
... |
... |
Json: APICustomer
[
{
"LocationIdentifier":"FL_NL_1",
"ExternalOrderNr":"123",
"InternalOrderNr":1,
"CustomerIdentifier":"RTN_LOY_123",
"CustomerGLN":"1234567890123",
"OrderDate":"yyyy-MM-ddTHH:mm:ss",
"Employee":"Full Name",
"Status":"Order Status", /* For new order leave empty */
"TotalConsumerQuantityOrdered":1.0,
"TotalQuantityOrdered":1.0,
"OrderLines":
[
{
"ProductIdentifier": "LX_NL_123456",
"ProductDescription": "VERZORGINGSDOUCHE",
"QuantityOrdered": 1.00,
"ConsumerQuantityOrdered": 1.00,
"QuantityDelivered": 1.00,
"ConsumerQuantityDelivered": 1.00,
"Amount": 1.00,
"Eancode": "EAN-13",
"VatPercentage": 1.00,
"RetailPrice": 1.00,
"PurchasePrice": 1.00,
"Comments": "{"FrameColor":{"Value":"Rood"},"TopColor":{"Value":"Zwart"},"ThreadColor":{"Value":"Wit"},"Bijzonderheden":{"Value":"Leer"}}",
"stockLocationCode": "L01X5", /* Location of the product in warehouse */
"RowId": 1, /* RowId 0 for new OrderLines */
}
],
"OrderDocuments":
[
{
"Name": "Raaplijst",
"Document": "URL",
"Date": "yyyy-MM-ddTHH:mm:ss",
"RowId": 1 /* RowId 0 for new OrderDocuments */
}
],
"PartialPayments":
[
{
"Date":"yyyy-MM-ddTHH:mm:ss",
"Amount": 1,
"Paid": False,
"RowId": 1, /* RowId 0 for new PartialPayment */
"PaymentDate": "yyyy-MM-ddTHH:mm:ss"
}
],
"Discounts":
[
{
"Description":"Extra information about the Discount",
"Percentage":"The specified discount percentage",
"Amount":"The //////",
"Direct": false
}
],
}
]
Response Elements
Code Samples
C#.net
public async void Post(List<APIObject> APIObjects, string Url, string SourceUser, SourcePassword)
{
using (System.Net.Http.HttpClient client = new System.Net.Http.HttpClient())
{
System.Net.Http.HttpContent content = Newtonsoft.Json.JsonConvert.SerializeObject(APIObjects);
string credentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(SourceUser + ":" + SourcePassword));
content.Headers.Add("Authorization", "Basic " + credentials);
var response = await client.PostAsync(Url, content);
var responseString = await response.Content.ReadAsStringAsync();
}
}