Welcome to DINKASSA.SE for Developers
As we have recently released the first public version of our REST API this site is simple, focusing on the API itself. We will be improving it over time. You should rest assured that we are focusing on providing the best
possible development experience for integrating with ES Kassasystem.
Contact information
api@eskassa.se. Contact us for questions related to the API and its relationship to the POS system. For general POS support please see
ES Kassa support.
How does it work?
POS: ES Kassasystem 7 software
API: Dinkassa.se REST API
Cloud: Dinkassa.se Cloud
Changes made with the API will commit instantly to the cloud. When the POS starts its synchronization it will download the changes, and upload its own changes to the cloud servers. There is two possible synchronization times, for dinkassa.se Pro+ synchronization takes place every two minutes or immediately following a sale for transaction and stock information. For dinkassa.se Pro synchronization takes place every 30 minutes.
The API never connects directly to the POS system and works independent of if the POS system is running or not. If a POS system was off when API changes were made the changes will be synchronized with the POS system as soon as it starts up again.
Cost
Integrating with the ES Kassasystem REST API is free for integrators. Customers of the POS pay an additional fee for connecting a POS system to the API.
API Reference
All requests must be made using HTTPS. All data read or written through the API gets staged in the ES Kassasystem servers, the data is then replicated to/from the POS machine the next time it connects to the central system for updates.
API URL
https://www.dinkassa.se/api/
API Serialization Format
Erpato Rest API supports JSON.
API Authentication
Authentication is made using three HTTP header values.
MachineId
To determine which Machine the API will be reading or writing data to we use MachineId.
MachineKey
Each machine has its own unique secret key.
IntegratorId
IntegratorId represents the system integrator that is connecting to the API. Each system connecting receives a unique value. The same integrator can manage multiple machines.
Used to categorise inventory items. There is no limit to the number of inventory items a category can contain.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Id |
ID |
64-bit Integer/null |
|
Yes |
|
Name |
Name |
String (max 30 chars.) |
|
No |
|
AccountNumber |
Account number used for accounting. |
String (max 4 chars.) |
|
No |
|
DefaultVatPercentage |
Default VAT percentage for new inventory items in this category. |
Decimal |
|
No |
Accepts 0, 6, 12 and 25. |
ParentCategoryId |
ID of the parent category (null if none). |
64-bit Integer/null |
|
No |
Must be the ID of a valid category. |
Requests
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
offset |
Specifies the number of items that will be skipped before starting to return. |
Query-string |
32-bit Integer/null |
No |
0 |
Must be >= 0 |
fetch |
Specified the number of items to fetch after the offset has been skipped. |
Query-string |
32-bit Integer/null |
No |
100 |
Must be between 1 and 100 |
curl -X GET "https://www.dinkassa.se/api/category"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Items" :
[
{
"Id" : "1305333868",
"Name" : "GODISAR",
"AccountNumber" : "3033",
"DefaultVatPercentage" : 12.00
},
{
"Id" : "2189283919",
"Name" : "LÄSK",
"AccountNumber" : "3033",
"DefaultVatPercentage" : 12.00
},
]
}
Request
curl -X GET "https://www.dinkassa.se/api/category/1305333868"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Item" : {
"Id" : "1305333868",
"Name" : "GODISAR",
"AccountNumber" : "3033",
"DefaultVatPercentage" : 12.00
}
}
Request
Content-type: application/json
curl -X POST "https://www.dinkassa.se/api/category"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" : {
"Name" : "NY",
"AccountNumber" : "3031",
"DefaultVatPercentage" : 25.00
}
}'
Response
{
"Item" : {
"Id" : "128918928",
"Name" : "NY",
"AccountNumber" : "3031",
"DefaultVatPercentage" : 25.00
}
}
Request
Content-type: application/json
curl -X PUT "https://www.dinkassa.se/api/category"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" : {
"Id" : "128918928",
"Name" : "MAT",
"AccountNumber" : "3031",
"DefaultVatPercentage" : 12.00
}
}'
Response
{
"Item" : {
"Id" : "128918928",
"Name" : "MAT",
"AccountNumber" : "3031",
"DefaultVatPercentage" : 12.00
}
}
Request
curl -X DELETE "https://www.dinkassa.se/api/category/128918928"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
The response will be HTTP status code 200 if the delete was successful.
Represents an item that can be sold.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Id |
ID |
64-bit Integer/null |
|
Yes |
|
Description |
Description |
String (max 30 chars.) |
|
No |
|
BarCode |
Bar code used by the item. If the item doesn't have a bar code provide another unique value. |
String (max 30 chars.) |
|
No |
Must be unique. |
ProductCode |
Product code used by the item. If the item doesn't have a product code provide another unique value. |
String (max 30 chars.) |
|
No |
Must be unique. |
PriceIncludingVat |
Price for the item including VAT. If the item consists of multiple items (such as a package) the price is for the entire item. |
Decimal |
|
No |
|
PickupPriceIncludingVat |
Pickup price (Take away) for the item including VAT. If the item consists of multiple items (such as a package) the price is for the entire item. |
Decimal |
0 |
No |
0 means that no pickup price is used |
VatPercentage |
VAT percentage for the item. |
Decimal/null |
DefaultVatPercentage from Category. |
No |
Accepts 0, 6, 12 and 25. |
QuantityInStockCurrent |
The number of items currently in stock. |
Decimal |
0 |
No |
Can be specified when creating the item. After creation the quantity in stock can only be changed through a separate API call (quantityChange) or through a combined use with the QuantityInStockPrevious field. |
QuantityInStockPrevious |
The number of items in stock before an update. |
Decimal |
0 |
No |
Only used when updating quantity in stock using QuantityInStockCurrent. If QuantityInStockCurrent is used this field must be set to the quantity in stock before the update. |
CategoryId |
The ID of the category that the item belongs to. |
64-bit Integer |
|
No |
Must refer to an existing category. |
CategoryName |
The name of the category that the item belongs to. |
String (max 30 chars.) |
|
Yes |
|
SupplierName |
The name of the supplier. |
String (max 30 chars.) |
|
No |
|
ButtonColorHex |
The selected color of the button, in hex format. |
String |
|
Yes |
|
Requests
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
offset |
Specifies the number of items that will be skipped before starting to return. |
Query-string |
32-bit Integer/null |
No |
0 |
Must be >= 0 |
fetch |
Specified the number of items to fetch after the offset has been skipped. |
Query-string |
32-bit Integer/null |
No |
10 |
Must be between 1 and 200 |
categoryId |
Specifies the category to search for items in. |
Query-string |
64-bit Integer/null |
No |
null |
The category must exist. |
descriptionContains |
Characters that the description must contain, % can be used as a wildcard. |
Query-string |
String |
No |
null |
|
barCodeContains |
Characters that the bar code must contain, % can be used as a wildcard. |
Query-string |
String |
No |
null |
|
productCodeContains |
Characters that the product code must contain, % can be used as a wildcard. |
Query-string |
String |
No |
null |
|
curl -X GET "https://www.dinkassa.se/api/inventoryitem/?offset=10&fetch=2&descriptionContains=FANTA&barcodeContains=22"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
"Items" : [
{
"Id" : "123456789012",
"Description" : "STOR FANTA APELSIN",
"BarCode" : "012234567",
"ProductCode" : "9876543211",
"PriceIncludingVat" : 15.00,
"PickupPriceIncludingVat" : 0.00,
"VatPercentage" : 12.00,
"QuantityInStockCurrent" : 5,
"CategoryId" : "932893829",
"CategoryName" : "STOR DRICKA",
"ButtonColorHex" : "#F0E68C"
},
{
"Id" : "382983298293",
"Description" : "FANTA LIGHT",
"BarCode" : "1142267",
"ProductCode" : "3984398339",
"PriceIncludingVat" : 12.00,
"PickupPriceIncludingVat" : 0.00,
"VatPercentage" : 12.00,
"QuantityInStockCurrent" : 200,
"CategoryId" : "98765432101",
"CategoryName" : "DRICKA",
"ButtonColorHex" : "#F0E68C"
}
]
}
Request
curl -X GET "https://www.dinkassa.se/api/inventoryitem/123456789012"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Item" : {
"Id" : "123456789012",
"Description" : "FANTA",
"BarCode" : "01234567",
"ProductCode" : "9876543210",
"PriceIncludingVat" : 10.00,
"PickupPriceIncludingVat" : 0.00,
"VatPercentage" : 12.00,
"QuantityInStockCurrent" : 0,
"CategoryId" : "98765432101",
"CategoryName" : "DRICKA",
"ButtonColorHex" : "#F0E68C"
}
}
Request
Content-type: application/json
curl -X POST "https://www.dinkassa.se/api/inventoryitem"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" : {
"Description" : "COLA",
"BarCode" : "21982982",
"ProductCode" : "43984911",
"PriceIncludingVat" : 9.00,
"PickupPriceIncludingVat" : 0.00,
"QuantityInStockCurrent" : 10,
"VatPercentage" : 12.00,
"CategoryId" : "98765432101"
}
}'
Response
{
"Item" : {
"Id" : "392893829382",
"Description" : "COLA",
"BarCode" : "21982982",
"ProductCode" : "43984911",
"QuantityInStockCurrent" : 10,
"PriceIncludingVat" : 9.00,
"PickupPriceIncludingVat" : 0.00,
"VatPercentage" : 12.00,
"CategoryId" : "98765432101",
"CategoryName" : "DRICKA",
"ButtonColorHex" : "#F0E68C"
}
}
Request
Content-type: application/json
curl -X PUT "https://www.dinkassa.se/api/inventoryitem"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" : {
"Id" : "392893829382",
"Description" : "COCA COLA",
"BarCode" : "21982982",
"ProductCode" : "43984911",
"PriceIncludingVat" : 10.00,
"PickupPriceIncludingVat" : 0.00,
"VatPercentage" : 12.00,
"CategoryId" : "98765432101",
"QuantityInStockCurrent" : 10,
"QuantityInStockPrevious" : 5
}
}'
Response
{
"Item" : {
"Id" : "392893829382",
"Description" : "COCA COLA",
"BarCode" : "21982982",
"ProductCode" : "43984911",
"PriceIncludingVat" : 10.00,
"PickupPriceIncludingVat" : 0.00,
"QuantityInStockCurrent" : 10,
"VatPercentage" : 12.00,
"CategoryId" : "98765432101",
"CategoryName" : "DRICKA",
"ButtonColorHex" : "#F0E68C"
}
}
Request
Content-type: application/x-www-form-urlencoded
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
currentQuantity |
The current quantity in stock for the item, used to verify no other changes were made and to make the call idempotent. |
x-www-form-urlencoded |
Decimal |
Yes |
|
|
newQuantity |
The new quantity in stock of the item. |
x-www-form-urlencoded |
Decimal |
Yes |
|
|
curl -X POST "https://www.dinkassa.se/api/inventoryitem/392893829382"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/x-www-form-urlencoded"
-d 'currentQuantity=10
newQuantity=7'
Response
{
"Item" : {
"Id" : "392893829382",
"Description" : "COCA COLA",
"BarCode" : "21982982",
"ProductCode" : "43984911",
"PriceIncludingVat" : 10.00,
"PickupPriceIncludingVat" : 0.00,
"QuantityInStockCurrent" : 5,
"VatPercentage" : 12.00,
"CategoryId" : "98765432101",
"CategoryName" : "DRICKA",
"ButtonColorHex" : "#F0E68C"
}
}
Request
curl -X DELETE "https://www.dinkassa.se/api/inventoryitem/392893829382"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
The response will be HTTP status code 200 if the delete was successful.
Represents entities that interact with the POS system.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Id |
ID |
64-bit Integer/null |
|
Yes |
|
Name |
Name |
String (max 30 chars.) |
|
No |
|
EmployeeCode |
Code used to represent the employee, such as personnel number. |
String (max 30 chars.) |
|
No |
|
EmployeePassword |
Employee password, used when logging in to POS. |
String (max 4 chars.) |
|
No |
lengt == 4 |
Permissions |
Employee permission type |
32-bit Integer |
|
Yes |
0 = Standard, 1 = Denied, 2 = Admin, 4 = Moderator |
Requests
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
offset |
Specifies the number of items that will be skipped before starting to return. |
Query-string |
32-bit Integer/null |
No |
0 |
Must be >= 0 |
fetch |
Specified the number of items to fetch after the offset has been skipped. |
Query-string |
32-bit Integer/null |
No |
100 |
Must be between 1 and 100 |
curl -X GET "https://www.dinkassa.se/api/employee"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Items" :
[
{
"EmployeeCode" : "1",
"Name" : "Erik Jirhall",
"Id" : "634449738124984351"
},
{
"EmployeeCode" : "4",
"Name" : "Nicole Holmgren"
,"Id" :"634558379279775274"
}
]
}
Request
curl -X GET "https://www.dinkassa.se/api/employee/634449738124984351"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Item" :
{
"EmployeeCode" : "1",
"Name" : "Erik Jirhall",
"Id" : "634449738124984351"
}
}
Request
Content-type: application/json
curl -X POST "https://www.dinkassa.se/api/employee"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" : {
"EmployeeCode" : "3",
"Name" : "Nicke Persson",
"EmployeePassword" : "1234",
}
}'
Response
{
"Item" : {
"Id" : "348230984320984",
"EmployeeCode" : "3",
"Name" : "Nicke Persson",
}
}
Request
Content-type: application/json
curl -X PUT "https://www.dinkassa.se/api/employee"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" : {
"Id" : "348230984320984",
"EmployeeCode" : "35",
"Name" : "Niclas Persson",
}
}'
Response
{
"Item" : {
"Id" : "348230984320984",
"EmployeeCode" : "35",
"Name" : "Niclas Persson",
}
}
Represents an item to be sold as part of a PreSaleTransaction.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
InventoryItemId |
The ID of the InventoryItem being sold |
64-bit Integer |
|
No |
Must match existing InventoryItem. |
InventoryItemDescription |
The description of the InventoryItem being sold. |
Decimal |
|
Yes |
|
PricePerItemIncludingVat |
Price PER item including VAT. If the item has a quantity != 1 the price is for each item, i.e. total price = this price * quantity. |
Decimal/null |
The PriceIncludingVat from the InventoryItem. |
No |
|
Quantity |
Number of items being sold. |
Decimal |
|
No |
0 – 1000000 |
ExternalReference1 |
A text string that can be used to refer to this object from another system. |
String (max 30 chars.) |
|
No |
|
ExtraInformation |
Additional information for the item. Example: Extra veggies, no cheese. |
String (max 500 chars.) |
|
No |
|
Represents a payment for a PreSaleTransaction.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Amount |
The amount paid. |
Decimal |
|
No |
0 – 1000000 |
Type |
The type of payment used. |
32-bit Integer |
|
No |
Must be one of: Cash = 1, Card = 2, Coupon = 3, BankAccount = 7, WebShop = 18. |
ExternalReference1 |
A text string that can be used to refer to this object from another system. |
String (max 30 chars.) |
|
No |
|
Represents an order/shopping cart before the sale is finalized. When a sale is finalized the PreSaleTransaction is deleted and a Transaction is created.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Id |
ID |
64-bit Integer/null |
|
Yes |
|
EmployeeId |
The employee posting this PreSaleTransaction. |
64-bit Integer |
|
No |
Must match a existing Employee. |
State |
State of the item. Items of state 0 (None) cannot be managed through the API as they originate from the POS system. |
32-bit Integer |
|
Yes |
Can only be changed through a separate API call (submit). 0 = None, 1 = Not submitted, 2 = Submitted. |
TransactionName |
A text string that will be printed on the receipt, often used to indicate customer. |
String (max 50 chars.) |
|
No |
|
ExternalOrderContactInfo |
A text string that will be printed on the kitchen order ticket, used for contact information to the customer. For example the customers phone number |
String (max 250 chars.) |
|
No |
|
ExternalReference1 |
A text string that can be used to refer to this object from another system. |
String (max 30 chars.) |
|
No |
|
Items |
The items to be sold in the PreSaleTransaction. |
PreSaleTransactionItem |
|
Yes |
|
Payments |
Any payments made for the PreSaleTransaction. Note that payments can be added later on the POS system. For a customer that pre-orders online and pays in the store payments would remain empty. |
PreSaleTransactionPayment |
|
Yes |
PreSaleTransactionPayments of type WebShop can not be combined with a different Type, the total amount paid must also match the total cost of Items. |
Requests
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
offset |
Specifies the number of items that will be skipped before starting to return. |
Query-string |
32-bit Integer/null |
No |
0 |
Must be >= 0 |
fetch |
Specified the number of items to fetch after the offset has been skipped. |
Query-string |
32-bit Integer/null |
No |
200 |
Must be between 1 and 100 |
onlyParked |
Include only parked items. |
Query-string |
Boolean/null |
No |
false |
|
state |
Include items of a certain state. |
Query-string |
32-bit Integer/null |
No |
null |
0 = Created in POS, 1 = Not submitted (editable), 2 = Submitted for webshop (not editable), 3+ = For internal use |
curl -X GET "https://www.dinkassa.se/api/presaletransaction"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Items" :
[
{
"Item" :
{
"Id" : "635588210231306742",
"EmployeeId" : "634449738124984351",
"TransactionName" : "Erik",
"ExternalOrderContactInfo" : "0701234567",
"State" : 1,
"Items" :
[
{
"PricePerItemIncludingVat" : 12.00,
"VatPercentage" : 12,
"Quantity" : 2.0,
"InventoryItemDescription" : "Fanta",
"InventoryItemId" : "635354944552697488"
},
{
"PricePerItemIncludingVat" : 5.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Päron",
"InventoryItemId" : "43894839843938493"
}
],
"Payments" :
[
{
"Type" : 2,
"Amount" : 29.0,
}
]
}
},
{
"Item" :
{
"Id" : "4423423423432423234",
"EmployeeId" : "634449738124984351",
"State" : 1,
"Items" :
[],
"Payments" :
[]
}
}
]
}
Request
curl -X GET "https://www.dinkassa.se/api/presaletransaction/1305333868"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Item" :
{
"Id" : "635588210231306742",
"EmployeeId" : "634449738124984351",
"TransactionName" : "Ronen",
"ExternalOrderContactInfo" : "0701234567",
"State" : 1,
"Items" :
[
{
"PricePerItemIncludingVat" : 12.00,
"VatPercentage" : 12,
"Quantity" : 2.0,
"InventoryItemDescription" : "Fanta",
"InventoryItemId" : "635354944552697488"
},
{
"PricePerItemIncludingVat" : 5.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Päron",
"InventoryItemId" : "43894839843938493"
}
],
"Payments" :
[
{
"Type" : 2,
"Amount" : 29.0,
}
]
}
}
Request
Content-type: application/json
curl -X POST "https://www.dinkassa.se/api/presaletransaction"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" :
{
"EmployeeId" : "634449738124984351",
"State" : 1,
"TransactionName" : "Ronen",
"ExternalOrderContactInfo" : "0701234567",
"Items" :
[
{
"PricePerItemIncludingVat" : 12.00,
"VatPercentage" : 12,
"Quantity" : 2.0,
"InventoryItemDescription" : "Fanta",
"InventoryItemId" : "635354944552697488"
},
{
"PricePerItemIncludingVat" : 5.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Päron",
"InventoryItemId" : "43894839843938493"
}
],
"Payments" : []
}
}'
Response
{
"Item" :
{
"Id" : "843298493284923823",
"EmployeeId" : "634449738124984351",
"State" : 1,
"TransactionName" : "Ronen",
"ExternalOrderContactInfo" : "0701234567",
"Items" :
[
{
"PricePerItemIncludingVat" : 12.00,
"VatPercentage" : 12,
"Quantity" : 2.0,
"InventoryItemDescription" : "Fanta",
"InventoryItemId" : "635354944552697488"
},
{
"PricePerItemIncludingVat" : 5.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Päron",
"InventoryItemId" : "43894839843938493"
}
],
"Payments" : []
}
}
Request
Content-type: application/json
curl -X PUT "https://www.dinkassa.se/api/presaletransaction"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/json"
-d '
{
"Item" :
{
"Id" : "843298493284923823",
"EmployeeId" : "634449738124984351",
"State" : 1,
"Items" :
[
{
"PricePerItemIncludingVat" : 12.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Fanta",
"InventoryItemId" : "635354944552697488"
},
{
"PricePerItemIncludingVat" : 5.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Päron",
"InventoryItemId" : "43894839843938493"
}
],
"Payments" : []
}
}'
Response
{
"Item" :
{
"Id" : "843298493284923823",
"EmployeeId" : "634449738124984351",
"State" : 1,
"Items" :
[
{
"PricePerItemIncludingVat" : 12.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Fanta",
"InventoryItemId" : "635354944552697488"
},
{
"PricePerItemIncludingVat" : 5.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Päron",
"InventoryItemId" : "43894839843938493"
}
],
"Payments" : []
}
}
Request
curl -X DELETE "https://www.dinkassa.se/api/presaletransaction/128918928"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
The response will be HTTP status code 200 if the delete was successful.
Deletes all items created through the API that are older than the specified number and which lack items and payments
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
deleteOldEmpty |
Must be set to true to delete old items. |
Query-string |
Boolean |
Yes |
|
|
minSecondsOldToDelete |
The number of seconds ago that items have to have been created to be deleted. |
Query-string |
32-bit Integer |
Yes |
|
|
maxDeleteCount |
The max number of items to delete in this request. |
Query-string |
32-bit Integer |
No |
100 |
1 - 200 |
curl -X DELETE "https://www.dinkassa.se/api/presaletransaction"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
The response will be HTTP status code 200 if the deletes were successful.
Request
Content-type: application/x-www-form-urlencoded
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
submit |
Must be set to true to submit the PreSaleTransaction. After submit the item cannot be changed or deleted and is now managed by the POS system. |
x-www-form-urlencoded |
Boolean |
Yes |
|
|
curl -X POST "https://www.dinkassa.se/api/presaletransaction/635588210231306742"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
-H "Content-Type: application/x-www-form-urlencoded"
-d 'submit=true'
Response
{
"Item" :
{
"Id" : "635588210231306742",
"EmployeeId" : "634449738124984351",
"State" : 2,
"Items" :
[
{
"PricePerItemIncludingVat" : 12.00,
"VatPercentage" : 12,
"Quantity" : 2.0,
"InventoryItemDescription" : "Fanta",
"InventoryItemId" : "635354944552697488"
},
{
"PricePerItemIncludingVat" : 5.00,
"VatPercentage" : 12,
"Quantity" : 1.0,
"InventoryItemDescription" : "Päron",
"InventoryItemId" : "43894839843938493"
}
],
,"Payments" :
[
{
"Type" : 2,
"Amount" : 29.0,
}
]
}
}
Represents a place where a PreSaleTransaction can be parked (for ex. a table or a bar).
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Id |
ID |
64-bit Integer/null |
|
Yes |
|
Name |
The name of the parking. |
String |
|
Yes |
|
TableMap |
The map where this parking should be shown (typically 1-4) |
32-bit Integer |
|
Yes |
|
Requests
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
offset |
Specifies the number of items that will be skipped before starting to return. |
Query-string |
32-bit Integer/null |
No |
0 |
Must be >= 0 |
fetch |
Specified the number of items to fetch after the offset has been skipped. |
Query-string |
32-bit Integer/null |
No |
10 |
Must be between 1 and 200 |
curl -X GET "https://www.dinkassa.se/api/presaletransactionparking"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Items" :
[
{
"Item" :
{
"Id" : "635588210231306742",
"TableMap" : 1,
"Name" : "Table #22",
}
}
]
}
Represents an item that was sold or returned as part of a Transaction.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
InventoryItemId |
The ID of the InventoryItem being sold |
64-bit Integer |
|
Yes |
|
ProductCategory |
The category of the InventoryItem being sold. |
String (max 30 chars.) |
|
Yes |
|
ProductDescription |
The description of the InventoryItem being sold. |
String (max 30 chars.) |
|
Yes |
|
ProductBarCode |
The bar code of the InventoryItem being sold. |
String (max 50 chars.) |
|
Yes |
|
ProductCode |
The product code of the InventoryItem being sold. |
String (max 50 chars.) |
|
Yes |
|
TotalAmountIncludingVat |
Total price including VAT. |
Decimal |
|
Yes |
|
TotalVat |
Total VAT. |
Decimal |
|
Yes |
|
TotalDiscount |
Total discount including VAT. |
Decimal |
|
Yes |
|
Quantity |
Number of items being sold. |
Decimal |
|
Yes |
0 – 1000000 |
Represents a payment that was made or returned as part of a Transaction.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Amount |
The amount paid. |
Decimal |
|
Yes |
0 – 1000000 |
Type |
The type of payment used. |
32-bit Integer |
|
Yes |
Cash = 1, Card = 2, Coupon = 3, BankAccount = 7. |
PaymentDateTime |
The date and time that the payment was made. |
DateTime |
|
Yes |
|
Represents a transaction once the sale/return has been finalized.
Field
|
Description
|
Type
|
Default value
|
Read-only?
|
Constraints
|
Id |
ID |
64-bit Integer/null |
|
Yes |
|
Number |
The number of the transaction if the transaction represents a receipt (and not an invoice). |
32-bit Integer |
|
Yes |
|
InvoiceNumber |
The invoice number if the transaction represents an invoice. |
32-bit Integer/null |
|
Yes |
|
DateTime |
The date and time of the transaction. |
DateTime |
|
Yes |
|
TransactionName |
A text string that will be printed on the receipt, often used to indicate customer. |
String (max 50 chars.) |
|
Yes |
|
EnteredByEmployeeCode |
The code of the employee that posted this transaction. |
64-bit Integer |
|
Yes |
|
EnteredByEmployeeName |
The name of the employee that posted this transaction. |
64-bit Integer |
|
Yes |
|
TotalAmountIncludingVat |
Total price including VAT. |
Decimal |
|
Yes |
|
TotalVat |
Total VAT. |
Decimal |
|
Yes |
|
Items |
The items sold or returned. |
TransactionItem |
|
Yes |
|
Payments |
Any payments made as part of this transaction. |
TransactionPayment |
|
Yes |
|
Requests
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
offset |
Specifies the number of items that will be skipped before starting to return. |
Query-string |
32-bit Integer/null |
No |
0 |
Must be >= 0 |
fetch |
Specified the number of items to fetch after the offset has been skipped. |
Query-string |
32-bit Integer/null |
No |
10 |
Must be between 1 and 200 |
startDateTime |
The date to include transaction starting from. |
Query-string |
DateTime |
Yes |
|
Must be within 7 days of the end date. |
endDateTime |
The date to include transactions up until. |
Query-string |
DateTime |
Yes |
|
Must be within 7 days of the start date. |
curl -X GET "https://www.dinkassa.se/api/transaction/?offset=10&fetch=2&startDateTime=2016-07-10&endDateTime=2016-07-12"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Items" :
[
{
"Item" :
{
"Id" : "635588210231306742",
"Number" : 12012,
"DateTime" : "2016-02-27T13:02:33",
"TransactionName" : "Tobias",
"EnteredByEmployeeCode" : "1022A",
"EnteredByEmployeeName" : "Per Persson",
"TotalAmountIncludingVat" : 20.00,
"TotalVat" : 4,
"Items" :
[
{
"TotalAmountIncludingVat" : 20.00,
"TotalVat" : 4,
"Quantity" : 2.0,
"ProductCategory" : "Drink",
"ProductDescription" : "Fanta",
"ProductBarCode" : "635354944552697488",
"ProductCode" : "10101",
}
],
"Payments" :
[
{
"Type" : 2,
"Amount" : 20.0,
}
]
}
}
]
}
Request
Parameters
Name
|
Description
|
Parameter type
|
Data type
|
Required
|
Default
|
Constraints
|
receiptNumber |
The number of the receipt to fetch. |
Query-string |
32-bit Integer |
No |
|
|
invoiceNumber |
The number of the invoice to fetch. |
Query-string |
32-bit Integer |
No |
|
|
curl -X GET "https://www.dinkassa.se/api/transaction/?receiptNumber=11920"
-H "MachineId: 12345678-1234-1234-1234-123456789ABC"
-H "MachineKey: VERYSECRETINDEED!"
-H "IntegratorId: 01234567-0123-0123-0123-0123456789AB"
Response
{
"Item" :
{
"Id" : "635588210231306742",
"Number" : 11920,
"DateTime" : "2016-02-27T13:02:33",
"TransactionName" : "Paul",
"EnteredByEmployeeCode" : "1022A",
"EnteredByEmployeeName" : "Per Persson",
"TotalAmountIncludingVat" : 20.00,
"TotalVat" : 4,
"Items" :
[
{
"TotalAmountIncludingVat" : 20.00,
"TotalVat" : 4,
"Quantity" : 2.0,
"ProductCategory" : "Drink",
"ProductDescription" : "Fanta",
"ProductBarCode" : "635354944552697488",
"ProductCode" : "10101",
}
],
"Payments" :
[
{
"Type" : 2,
"Amount" : 20.0,
}
]
}
}