Skip to content

Instantly share code, notes, and snippets.

@radimvaculik
Created January 22, 2018 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radimvaculik/e60e4146b37b75bd238cad3260eea465 to your computer and use it in GitHub Desktop.
Save radimvaculik/e60e4146b37b75bd238cad3260eea465 to your computer and use it in GitHub Desktop.
------ Request ------
POST /api/global/Transaction HTTP/1.1
Authorization: Basic OUVLVFNMODJZRVU3REtYTU5TUzBXUFI0ME5YSzIzWVk6TVA1NDZRWksyV1hNMEg5M0pMQVpMQ1pVV1AyRlhYQTU=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1
Content-Type: application/json; charset=utf-8
Host: api.eposnowhq.com
Connection: close
Content-Length: 439
{
"CustomerId": 1916755,
"DateTime": "2018-01-22T11:57:44+00:00",
"StatusId": 1,
"ServiceType": 2,
"ReferenceCode": "ABC123",
"IsTransactionIncTax": true,
"TransactionItems": [
{
"ProductId": "14944172",
"Quantity": 1,
"UnitPrice": 9.59,
"MultipleChoiceItems": [
{
"ProductId": "14944081",
"Quantity": 1,
"UnitPrice": 1.8
}
]
}
],
"Tenders": [
{
"TenderTypeId": 46244,
"Amount": 11.39
}
],
"TransactionDetails": [
{
"Name": "Test 1",
"Value": "Test 2"
},
{
"Name": "Test 3",
"Value": "Test 4"
}
]
}
------ Response ------
{
"Id": 205968687,
"CustomerId": 1916755,
"StaffId": 139448,
"TableId": null,
"DeviceId": 33122,
"Device": "API",
"DateTime": "2018-01-22T11:57:42",
"StatusId": 1,
"Barcode": "REC22011811574200000",
"ServiceType": 2,
"TotalAmount": 11.39,
"ServiceCharge": null,
"Gratuity": null,
"DiscountValue": 0.00,
"NonDiscountable": 0.00,
"NonTax": 0.00,
"DiscountReasonId": null,
"IsTransactionIncTax": false,
"ReferenceCode": null,
"Table": null,
"TransactionItems": [
{
"Id": 695060906,
"TransactionId": 205968687,
"ProductId": 14944172,
"UnitPrice": 9.5900000000000000,
"UnitPriceExcTax": 7.9916700000000000,
"CostPrice": 0.5800000000000000,
"TaxGroupId": null,
"TaxAmount": 1.60,
"Quantity": 1,
"DiscountAmount": null,
"DiscountReasonId": null,
"RefundReasonId": null,
"Notes": null,
"PrintOnOrder": false,
"MultipleChoiceProductId": null,
"ParentId": null,
"IsTaxExempt": false,
"MeasurementDetails": null,
"Taxes": [
{
"TransactionItemId": 695060906,
"TaxRateId": 59668,
"Name": "20VAT",
"Rate": 20.0000,
"Amount": 1.60
}
],
"MultipleChoiceItems": [
{
"Id": 695060907,
"TransactionId": 205968687,
"ProductId": 14944081,
"UnitPrice": 1.8000000000000000,
"UnitPriceExcTax": 1.5000000000000000,
"CostPrice": 1.0000000000000000,
"TaxGroupId": null,
"TaxAmount": 0.00,
"Quantity": 1,
"DiscountAmount": null,
"DiscountReasonId": null,
"RefundReasonId": null,
"Notes": null,
"PrintOnOrder": false,
"MultipleChoiceProductId": 98995,
"ParentId": 695060906,
"IsTaxExempt": false,
"MeasurementDetails": null,
"Taxes": null,
"MultipleChoiceItems": null
}
]
}
],
"MiscProductItems": null,
"Tenders": [
{
"TransactionId": 205968687,
"TenderTypeId": 46244,
"Amount": 11.39,
"ChangeGiven": 0.00
}
],
"TransactionDetails": null,
"Taxes": [
{
"TransactionId": 205968687,
"TaxRateId": 59668,
"Name": "20VAT",
"Rate": 20.0000,
"Amount": 1.60
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment