POST - Transaction

Post a new finished Transaction. The system will not handle the Order e.g. like creating packaging labels

URL

Verb Url Json object
POST - Basic authentication /api/Transaction Array of APITransaction

Request Parameters

Parameter Description Format
Not applicable ... ...

Json: Array of APITransaction

        
            [
            {
            "ShopCode":"FL_NL_1", /* As provided */
            "TransactionNumber":1,
            "CashregisterCode":"KAS_1", /* As provided */
            "CashregisterEmployeeName":"Webshop", /* As provided */
            "TransactionDateTime":"yyyy-MM-ddTHH:mm:ssZ",
            "CreateCustomerIfNotExists": false, /* Not mandatory. Will create a new customer and connect it to the Transaction if it does not exist in RetailNxt, based on Surname, Email and/or CustomerNumber. Defaults to false. */
            "Expired": false, /* Not mandatory. If set to true it will save a transaction as being aborted by the customer. */
            "Customer":
            {
            "CustomerNumber":1,
            "Surname":"Lastname",
            "Insertion":"Between Initials and Lastname",
            "Initials":"Initials",
            "PhoneNumber":"0123-456789",
            "DateOfBirth":"yyyy-MM-dd",
            "MobileNumber":"06-12345678",
            "Email":"someone@somewhere.com",
            "Addresses":
            [
            {
            "Street":"streetname",
            "Housenumber": "1",
            "HouseNumberExtension":"a",
            "Residence":"City",
            "ZipCode":"1234AA",
            "Country":"NL",
            "Type":"address type" /* Use Postadres */
            }
            ]
            },
            "Lines":
            [
            {
            "Eancode":"EAN-13", /* With leading zero's when using Ean-8 or EAN-12 */
            "Quantity": 1.00,
            "RetailPrice": 1.00,
            "OrgRetailPrice": 1.00, /* Price of product without discounts subtracted */
            "VATPercentage": 1.00,
            "ValuePaper":false, /* True if sold Product is a 'valuepaper' e.g. VVV bon */
            "ProductDescription": "Description of product as sold",
            "ReturnReason": "Broken", /* Reason the product is returned */
            "BackInStock": false /* Should the return be added back to stock */
            }
            ],
            "Payments":
            [
            {
            "PaymentMethod":"method of payment",
            "Amount":1.00
            }
            ]

            },
            { ... (next transaction) ... }
            ]
        

Response Elements

Name Description Example
TransactionIdentifiers Identifiers of the new Transaction [{"TransactionIdentifier":"VR_1234567890123_1_5"},{"TransactionIdentifier":"VR_1234567890123_1_6"}]

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();
            }
        }