F ES Kassasystem Developer

Dinkassa.se API Information

Welcome to DINKASSA.SE for Developers.

This documentation will focus on the REST API for ES Kassasystem through our cloud service, "Dinkassa.se". The Dinkassa.se REST API is used to fetch data, create orders in the cash register, update inventory items etc. The API is organized around resources using URLs and the different HTTP methods to create and modify these resources. You authenticate using your credentials and basic auth.

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
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 are 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 independently even if the POS system is not running. If a POS system was off when API changes were made, the changes will be synchronized to/from the POS system as soon as it starts up again.

Cost
Integrating with the Dinkassa.se REST API for ES Kassasystem is free for integrators. Provisionally based fees may be contractually agreed upon. Customers of the POS pay an additional fee for connecting an external system to the API.

Useful external links
Command-line tool to test HTTP REST APIs. used in documentation examples.
Desktop application to test HTTP REST APIs.

API Information

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.

https://www.dinkassa.se/api/

Authentication

API Serialization Format
Erpato Rest API supports JSON.

API Authentication
Authentication is made using three HTTP header values (MachineId, MachineKey, IntegratorId)

Attributes
  • MachineId Required

    To determine which Machine the API will be reading or writing data to we use MachineId.

  • MachineKey Required

    Each cash register machine has its own unique secret key connected to each specific MachineId.

  • IntegratorId Required

    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.

MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075
MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5
IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2

Endpoint: https://www.dinkassa.se/api/

CATEGORY

"Category" is used to categorize one or several inventory items. At least one (1) category must be created before any InventoryItem can be created. Without a category, the creation of an InventoryItem will not be possible.

API Information

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.

https://www.dinkassa.se/api/category

Fields of "CATEGORY"

Field Read only? Type Default Description Constraints
Name No String (max 30 chars.) Name of the category.
AccountNumber No String (max 4 chars.) Account number used for accounting. Numerical value only.
ParentCategoryId No 64-bit Integer/null ID of the parent category (null if none). Must be the ID of a valid category.
SortingWeight Yes NO DATA Used to sort categories in an external system in a vertical order. Numerical value only.
OnlyAllowCategories No NO DATA false Checkbox in register; "Use as main category without items". true/false
DefaultVatPercentage No Decimal Default VAT percentage for new inventory items in this category. Accepts 0, 6, 12 and 25.
Id Yes 64-bit Integer/null Identification number. Unique per category.

SEARCH

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

REQUEST

curl -X GET "https://www.dinkassa.se/api/category"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
	"Items" : 
	[
		{
            "CreatedDateTime": "2019-05-15T21:14:32",
            "LastModifiedDateTime": "2019-05-15T21:14:32",
            "Name": "Cider",
            "AccountNumber": null,
            "ParentCategoryId": "636863777946781196",
            "SortingWeight": 0,
            "OnlyAllowCategories": false,
            "DefaultVatPercentage": 25.0000000000,
            "Id": "636935444266525649"
		},
	]
}
                                                  

FETCH BY ID

Fetch your items by ID


REQUEST

curl -X GET "https://www.dinkassa.se/api/category/636935444266525649"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
    "Item": {
        "CreatedDateTime": "2019-05-15T21:14:32",
        "LastModifiedDateTime": "2019-05-15T21:14:32",
        "Name": "Cider",
        "AccountNumber": null,
        "ParentCategoryId": "636863777946781196",
        "SortingWeight": 0,
        "OnlyAllowCategories": false,
        "DefaultVatPercentage": 25.0000000000,
        "Id": "636935444266525649"
	}
}
                                                  

CREATE NEW CATEGORY

Create new category


REQUEST

curl -X POST "https://www.dinkassa.se/api/category"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -H "Content-Type: application/json"
        -d '
        
{
    "Item": {
        "Name": "Accessories",
        "AccountNumber": "3031",
        "ParentCategoryId": "636863777946781196",
        "OnlyAllowCategories": true,
        "DefaultVatPercentage": 12
            }
}'
 
 
RESPONSE                           

{
    "Item": {
        "CreatedDateTime": "2019-12-19T23:52:22.8413105",
        "LastModifiedDateTime": "2019-12-19T23:52:22.8413105",
        "Name": "Accessories",
        "AccountNumber": "3031",
        "ParentCategoryId": "636863777946781196",
        "SortingWeight": 0,
        "OnlyAllowCategories": true,
        "DefaultVatPercentage": 12.0,
        "Id": "637123702696607434"
    }
}
                                                  

UPDATE EXISTING CATEGORY

Update existing category


REQUEST

curl -X PUT "https://www.dinkassa.se/api/category"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -H "Content-Type: application/json"
        -d '
{
	"Item" : {
		"Id": "637123702696607434",
		"Name": "Extras",
		"AccountNumber": "3032",
		"DefaultVatPercentage": 25
	}
}'
 
 
RESPONSE                           

{
	"Item" : {
		"Id": "637123702696607434",
		"Name": "Extras",
		"AccountNumber": "3032",
		"DefaultVatPercentage": 25.0
	}
}
                                                  

DELETE CATEGORY

Delete existing category


REQUEST

curl -X DELETE "https://www.dinkassa.se/api/category/637123702696607434"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

The response will be HTTP status code 200 if the delete was successful.
                                            

INVENTORYITEM

Represents an item that can be sold.

API Information

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.

https://www.dinkassa.se/api/inventoryitem

Fields of "INVENTORYITEM"

Field Read only? Type Default Description Constraints
ButtonColorHex Yes String The selected color of the button, in hex format.
VisibleOnSalesMenu No NO DATA true true/false value if InventoryItem should be visible on the physical sales menu or not. true/false
ExtraCategoryIds Yes NO DATA Id-number of extra categories for which the InventoryItem is connected to. This is not the main category.
SortingWeight Yes NO DATA Used to sort InventoryItems in an external system in a vertical order.
DictionaryTable Yes NO DATA 1 Words used within the register (Bong info) to present extra text on the kitchen ticket for each InventoryItem ordered. Not visible on customer receipt.
SpecialFunctionTypeId Yes NO DATA 1 Number corresponds to a specific "Special Function" within the register. Only required if requested by API Support.
Description No String (max 30 chars.) Description
SupplierName No String (max 30 chars.) The name of the supplier.
QuantityInStockCurrent No Decimal 0 The number of InventoryItems currently in stock. Can be specified when creating the item. Numerical value
BarCode No String (max 30 chars.) Barcode used by the InventoryItem. If the item doesn't have a bar code; provide another unique value. BarCode 2-5 represents extra barcodes connected to the same InventoryItem. Must be unique.
ProductCode No String (max 30 chars.) Product code used by the item. If the item doesn't have a product code; provide another unique value. Must be unique.
ExternalProductCode No String (max 30 chars.) Same as ProductCode. Product code used by the item. If the item doesn't have a product code; provide another unique value. Must be unique.
PriceIncludingVat No Decimal Price for the InventoryItem including VAT. Numerical value
PickupPriceIncludingVat No Decimal 0 Pickup price (TakeAway) for the item including VAT. 0 (no pickup price used)
VatPercentage No Decimal/null From Category VAT percentage for the InventoryItem. Accepts 0, 6, 12 and 25.
BongCategoryId Yes NO DATA 0 Unique Id-number of the BongCategory for which the item is connected to. For example "Starters". Names & Id's fetched through API/BongCategory.
CategoryName Yes String (max 30 chars.) The name of the category that the item belongs to.
BongCategoryName Yes String (max 30 chars.) The name of the BongCategory for which the InventoryItem is connected to. Used in conjunction with BongCategoryId if necessary. Names & Id's fetched through API/BongCategory.
CategoryId No 64-bit Integer The ID of the category that the item belongs to. Must refer to an existing category.
Id Yes 64-bit Integer/null Unique identification number of each InventoryItem.

SEARCH

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 32-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

                              
                              
                              
                              
                              
REQUEST

curl -X GET "https://www.dinkassa.se/api/inventoryitem/?descriptionContains=Bacon&barcodeContains=12"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

 "Items": [
        {
            "ButtonColorHex": "#FFFF00",
            "VisibleOnSalesMenu": true,
            "ExtraCategoryIds": [],
            "SortingWeight": 10,
            "DictionaryTable": 3,
            "SpecialFunctionTypeId": 7,
            "CreatedDateTime": "2019-06-05T13:25:20",
            "LastModifiedDateTime": "2019-12-02T16:26:36",
            "Description": "Baconburgare",
            "SupplierName": "",
            "QuantityInStockCurrent": 10.0000000000,
            "BarCode": "33791238",
            "BarCode2": null,
            "BarCode3": null,
            "BarCode4": null,
            "BarCode5": null,
            "_Attributes": [],
            "ProductCode": "33791238",
            "ExternalProductCode": "33791238",
            "PriceIncludingVat": 125.0000000000,
            "PickupPriceIncludingVat": 115.0000000000,
            "VatPercentage": 12.0000000000,
            "BongCategoryId": "636953306917068492",
            "CategoryName": "Lunch",
            "BongCategoryName": "LUNCH",
            "CategoryId": "636903420394237638",
            "Id": "636953307123851527"
        }
    ]
}
                                                  

FETCH BY ID

If needed, you may fetch any InventoryItem by ID. Include the ID in the request and the API will present the details for you.


REQUEST

curl -X GET "https://www.dinkassa.se/api/inventoryitem/636874601642150005"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
    "Item": {
        "ButtonColorHex": "#32CD32",
        "VisibleOnSalesMenu": true,
        "ExtraCategoryIds": [],
        "SortingWeight": 60,
        "DictionaryTable": 1,
        "SpecialFunctionTypeId": 1,
        "CreatedDateTime": "2019-04-04T22:36:20",
        "LastModifiedDateTime": "2019-07-02T09:44:06",
        "Description": "Kyckling och Ostquesadilla",
        "SupplierName": "",
        "QuantityInStockCurrent": -23.0000000000,
        "BarCode": "46376424",
        "BarCode2": null,
        "BarCode3": null,
        "BarCode4": null,
        "BarCode5": null,
        "_Attributes": [],
        "ProductCode": "46376424",
        "ExternalProductCode": "46376424",
        "PriceIncludingVat": 175.0000000000,
        "PickupPriceIncludingVat": 0.0000000000,
        "VatPercentage": 12.0000000000,
        "BongCategoryId": "636874594496479772",
        "CategoryName": "Huvudrätt",
        "BongCategoryName": "MAIN COURSE",
        "CategoryId": "636874594568996870",
        "Id": "636874601642150005"
    }
}
                                                  

CREATE NEW INVENTORYITEM

Create new InventoryItem.


REQUEST

curl -X POST "https://www.dinkassa.se/api/inventoryitem"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -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"
	}
}
                                                  

UPDATE EXISTING INVENTORYITEM

Update existing inventoryitem


REQUEST

curl -X PUT "https://www.dinkassa.se/api/inventoryitem"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -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"
	}
}
                                                  

CHANGE CURRENT QUANTITY IN STOCK

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

REQUEST

curl -X POST "https://www.dinkassa.se/api/inventoryitem/392893829382"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -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"
	}
}
                                                  

DELETE INVENTORYITEM

Delete existing inventoryitem


REQUEST

curl -X DELETE "https://www.dinkassa.se/api/inventoryitem/392893829382"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

The response will be HTTP status code 200 if the delete was successful.
                                            

EMPLOYEE

Represents entities that interact with the POS system..

API Information

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.

https://www.dinkassa.se/api/employee

Fields of "EMPLOYEE"

Field Read only? Type Default Description Constraints
EmployeeCode No String (max 30 chars.) Code used to represent the employee, such as personnel number.
Name No String (max 30 chars.) Name
Permissions Yes 32-bit Integer Employee permission type 0 = Standard
1 = Denied
2 = Admin
3 = NOT USED
4 = Moderator
Id Yes 64-bit Integer/null Identification number
EmployeePassword No String (max 4 chars.) Employee password, used when logging in to POS. length == 4

SEARCH

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

REQUEST

curl -X GET "https://www.dinkassa.se/api/employee"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
    "Items": [
        {
            "CreatedDateTime": "2019-12-04T22:37:25",
            "LastModifiedDateTime": "2019-12-18T16:48:03",
            "EmployeeCode": "5",
            "Name": "Petra Fredriksson",
            "Permissions": 0,
            "Id": "636874676151895901"
        }
    ]
}
                                                  

FETCH BY ID

Fetch your items by Id. Every Id-number is unique for each employee. An Id-number is created automatically through the physical register or the API and cannot be set manually. Id is used to distinguish each employee.


REQUEST

curl -X GET "https://www.dinkassa.se/api/employee/636874676151895901"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
    "Item": {
        "CreatedDateTime": "2019-04-04T22:37:25",
        "LastModifiedDateTime": "2019-10-18T16:48:03",
        "EmployeeCode": "5",
        "Name": "Petra Fredriksson",
        "Permissions": 0,
        "Id": "636874676151895901"
    }
}
                                                  

CREATE NEW EMPLOYEE

Creating a new employee with below code example. If a Permissions-parameter is not set, it will be set to default 0 (Standard). All other fields are mandatory.


REQUEST

curl -X POST "https://www.dinkassa.se/api/employee"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -H "Content-Type: application/json"
        -d '
{
	"Item" : {
		"EmployeeCode" : "3",
		"Name" : "Niclas Persson",
        "EmployeePassword" : "1234",
	}
}'
 
 
RESPONSE                           

{
	"Item" : {
		"Id" : "348230984320984",
		"EmployeeCode" : "3",
		"Name" : "Niclas Persson",
	}
}
                                                  

UPDATE EXISTING EMPLOYEE

Update existing employee with below code example. Id-number is mandatory to be used in the Request as it is used to identify the employee. All other fields can be edited.

If a Permissions-parameter is not set, it will not be affected.


REQUEST

curl -X PUT "https://www.dinkassa.se/api/employee"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -H "Content-Type: application/json"
        -d '
{
	"Item" : {
		"Id" : "636863776731055417",
		"EmployeeCode" : "35",
		"EmployeePassword" : "1235",
		"Name" : "Niclas Persson",
	}
}
 
 
RESPONSE                           

{
    "Item": {
        "CreatedDateTime": "2019-02-21T21:28:15",
        "LastModifiedDateTime": "2019-12-19T12:34:00.3103758",
        "EmployeeCode": "35",
        "Name": "Niclas Persson",
        "Permissions": 2,
        "Id": "636863776731055417"
    }
}
                                                  

PRESALETRANSACTION

Represents an order/shopping cart before the sale is finalized. When a sale is finalized the PreSaleTransaction is deleted and a Transaction is created.

API Information

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.

https://www.dinkassa.se/api/presaletransaction

Fields of "PRESALETRANSACTION"

Field Read only? Type Default Description Constraints
ExternalReference1 No String (max 30 chars.) A text string that can be used to refer to this object from another system.
TransactionName No String (max 50 chars.) A text string that will be printed on the receipt, often used to indicate customer.
ExternalOrderContactInfo No String (max 250 chars.) 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.
State Yes 32-bit Integer State of the item. Items of state 0 (None) cannot be managed through the API as they originate from the POS system. Can only be changed through a separate API call (submit). 0 = None, 1 = Not submitted, 2 = Submitted.
Items Yes PreSaleTransactionItem The items to be sold in the PreSaleTransaction.
EmployeeId No 64-bit Integer The employee posting this PreSaleTransaction. Must match a existing Employee.
Id Yes 64-bit Integer/null Identification number
Payments Yes PreSaleTransactionPayment 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. PreSaleTransactionPayments of type WebShop can not be combined with a different Type, the total amount paid must also match the total cost of Items.

SEARCH

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
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

REQUEST

curl -X GET "https://www.dinkassa.se/api/presaletransaction"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
  "Items": [
        {
            "ExternalReference1": null,
            "TransactionName": null,
            "ExternalOrderContactInfo": null,
            "State": 0,
            "Items": [],
            "RootItems": [],
            "Payments": [],
            "EmployeeId": "636900068727654201",
            "CreatedDateTime": "2019-12-19T22:50:21",
            "LastModifiedDateTime": "2019-12-19T22:50:21",
            "ParkingId": "",
            "Id": "637123890217677445"
        },
        {
            "ExternalReference1": null,
            "TransactionName": null,
            "ExternalOrderContactInfo": null,
            "State": 0,
            "Items": [
                {
                    "ExternalReference1": null,
                    "IsTakeAway": false,
                    "ExtraInformation": "",
                    "PricePerItemIncludingVat": 42.00,
                    "DiscountAllowed": true,
                    "CreatedDateTime": "2019-12-16T14:41:52.223",
                    "LastModifiedDateTime": "2019-12-16T15:22:27",
                    "VatPercentage": 25.0000000000,
                    "TotalDiscount": 0.0,
                    "Quantity": 1.0000000000,
                    "QuantityPerPackage": 1.0000000000,
                    "BongCategoryId": "636874595545523737",
                    "InventoryItemDescription": "Foxtail",
                    "InventoryItemId": "636874603814317406",
                    "Items": [],
                    "Id": "637120959108372911"
                }
            ],
            "RootItems": [
                {
                    "ExternalReference1": null,
                    "IsTakeAway": false,
                    "ExtraInformation": "",
                    "PricePerItemIncludingVat": 42.00,
                    "DiscountAllowed": true,
                    "CreatedDateTime": "2019-12-16T14:41:52.223",
                    "LastModifiedDateTime": "2019-12-16T15:22:27",
                    "VatPercentage": 25.0000000000,
                    "TotalDiscount": 0.0,
                    "Quantity": 1.0000000000,
                    "QuantityPerPackage": 1.0000000000,
                    "BongCategoryId": "636874595545523737",
                    "InventoryItemDescription": "Foxtail",
                    "InventoryItemId": "636874603814317406",
                    "Items": [],
                    "Id": "637120959108372911"
                }
            ],
            "Payments": [],
            "EmployeeId": "636900074226919670",
            "CreatedDateTime": "2019-12-16T14:41:52.223",
            "LastModifiedDateTime": "2019-12-16T15:22:27",
            "ParkingId": "636900073066586641",
            "Id": "637120959108360314"
        }
    ]
}
                                                  

FETCH BY ID

Fetch your items by ID


REQUEST

curl -X GET "https://www.dinkassa.se/api/presaletransaction/1305333868"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
	"Item" : 
		{
			"Id" : "635588210231306742",
			"EmployeeId" : "634449738124984351",
			"TransactionName" : "Lina Nilsson",
            "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,
					}	
				]	
		}
}
                                                  

CREATE NEW PRESALETRANSACTION

Create new presaletransaction


REQUEST

curl -X POST "https://www.dinkassa.se/api/presaletransaction"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -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" : []	
		}
}
                                                  

UPDATE EXISTING PRESALETRANSACTION

Update existing Presaletransaction


REQUEST

curl -X PUT "https://www.dinkassa.se/api/presaletransaction"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -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" : []	
		}
}
                                                  

DELETE PRESALETRANSACTION

Delete existing presaletransaction


REQUEST

curl -X DELETE "https://www.dinkassa.se/api/presaletransaction/128918928"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

The response will be HTTP status code 200 if the delete was successful.
                                            

DELETE ALL OLD + EMPTY PRESALETRANSACTIONS

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

REQUEST

curl -X DELETE "https://www.dinkassa.se/api/presaletransaction"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

The response will be HTTP status code 200 if the deletes were successful.
                                                  

SUBMIT FOR PROCESSING

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

REQUEST

curl -X POST "https://www.dinkassa.se/api/presaletransaction/635588210231306742"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
        -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,
					}	
				]	
		}
}
                                                  

PRESALETRANSACTIONITEM

Represents an item to be sold as part of a PreSaleTransaction.

API Information

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.

NOT AN ENDPOINT

Fields of "PRESALETRANSACTIONITEM"

Field Read only? Type Default Description Constraints
InventoryItemId No 64-bit Integer The ID of the InventoryItem being sold. Must match existing InventoryItem.
InventoryItemDescription Yes Decimal The description of the InventoryItem being sold.
PricePerItemIncludingVat No Decimal/null The PriceIncludingVat from the InventoryItem. 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.
Quantity No Decimal Number of items being sold. 0 – 1000000
ExternalReference1 No String (max 30 chars.) A text string that can be used to refer to this object from another system.
ExtraInformation No String (max 500 chars.) Additional information for the item. Example: Extra veggies, no cheese.

PRESALETRANSACTIONPAYMENT

Represents an item to be sold as part of a PreSaleTransaction.

API Information

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.

NOT AN ENDPOINT

Fields of "PRESALETRANSACTIONPAYMENT"

Field Read only? Type Default Description Constraints
Amount No Decimal The amount paid. 0 – 1000000
Type No 32-bit Integer The type of payment used. Must be one of: Cash = 1, Card = 2, Coupon = 3, BankAccount = 7, WebShop = 18
ExternalReference1 No String (max 30 chars.) A text string that can be used to refer to this object from another system.

PRESALETRANSACTIONPARKING

Represents a place where a PreSaleTransaction can be parked (for ex. a table or a bar).

API Information

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.

https://www.dinkassa.se/api/presaletransactionparking

Fields of "PRESALETRANSACTIONPARKING"

Field Read only? Type Default Description Constraints
Id Yes 64-bit Integer/null Identification number
Name Yes String The name of the parking/table.
TableMap Yes 32-bit Integer The map where this parking should be shown (typically 1-4).

SEARCH

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

REQUEST

curl -X GET "https://www.dinkassa.se/api/presaletransactionparking"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

   "Items": [
        {
            "Name": "100",
            "TableMap": 1,
            "Id": "636936094895645899"
        }
    ]
}                                             

Transaction

Represents a transaction once the sale/return has been finalized. Transactions can only be fetched for a period of 7 days from current date. Data needed from dates later than 7 days are not fetchable.

API Information

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.

https://www.dinkassa.se/api/transaction

Fields of "TRANSACTION"

Field Read only? Type Default Description Constraints
Id Yes 64-bit Integer/null Identification number
Number Yes 32-bit Integer The number of the transaction if the transaction represents a receipt (and not an invoice).
InvoiceNumber Yes 32-bit Integer/null The invoice number if the transaction represents an invoice.
DateTime Yes DateTime The date and time of the transaction.
TransactionName Yes String (max 50 chars.) A text string that will be printed on the receipt, often used to indicate customer.
EnteredByEmployeeCode Yes 64-bit Integer The code of the employee that posted this transaction.
EnteredByEmployeeName Yes 64-bit Integer The name of the employee that posted this transaction.
TotalAmountIncludingVat Yes Decimal Total price including VAT.
TotalVat Yes Decimal Total VAT.
Items Yes TransactionItem The items sold or returned.
Payments Yes TransactionPayment Any payments made as part of this transaction.

SEARCH

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.

REQUEST

curl -X GET "https://www.dinkassa.se/api/transaction/?offset=1&fetch=1&startDateTime=2019-12-13&endDateTime=2019-12-19"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           
       
    "Items": [
        {
            "Number": 57476,
            "DateTime": "2019-12-18T10:09:19",
            "TransactionName": null,
            "InvoiceNumber": null,
            "CreatedDateTime": "2019-12-18T10:09:19",
            "LastModifiedDateTime": "2019-12-18T10:09:19",
            "TotalAmountIncludingVat": 150.0000000000,
            "TotalVat": 16.0714290000,
            "EnteredByEmployeeCode": "1",
            "EnteredByEmployeeName": "Admin",
            "Items": [
                {
                    "InventoryItemDescription": "Pasta Carbonara",
                    "ProductCode": "46365120",
                    "ProductBarCode": "46365120",
                    "TotalAmountIncludingVat": 150.0000000000,
                    "TotalVat": 16.07142857142857142857142857,
                    "Quantity": 1.0000000000,
                    "Id": "637122569595835337"
                }
            ],
            "RootItems": [
                {
                    "InventoryItemDescription": "Pasta Carbonara",
                    "ProductCode": "46365120",
                    "ProductBarCode": "46365120",
                    "TotalAmountIncludingVat": 150.0000000000,
                    "TotalVat": 16.07142857142857142857142857,
                    "Quantity": 1.0000000000,
                    "Id": "637122569595835337"
                }
            ],
            "Payments": [
                {
                    "CreatedDateTime": "2019-12-18T10:09:19",
                    "LastModifiedDateTime": "2019-12-18T10:09:19",
                    "PaymentDateTime": "2019-12-18T10:09:19",
                    "Type": 2,
                    "Amount": 150.0000000000,
                    "Id": "637122569595835071"
                }
            ],
            "Id": "637122569595834746"
        }
    ]
}
                                                  

GET BY NUMBER

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

REQUEST

curl -X GET "https://www.dinkassa.se/api/transaction/?receiptNumber=57474"
        -H "MachineId: 9DD39BBF-8E67-4C07-825A-0845F8176075"
        -H "MachineKey: 3E836351-5E66-496A-9BF1-91053CDAFDB5"
        -H "IntegratorId: 1CF3DD98-787F-4ER4-9681-ADE1D1A408C2"
 
 
RESPONSE                           

{
    "Item": {
        "Number": 57474,
        "DateTime": "2019-12-18T10:06:49",
        "TransactionName": null,
        "InvoiceNumber": null,
        "CreatedDateTime": "2019-12-18T10:06:49",
        "LastModifiedDateTime": "2019-12-18T10:06:49",
        "TotalAmountIncludingVat": 75.0000000000,
        "TotalVat": 8.0357150000,
        "EnteredByEmployeeCode": "1",
        "EnteredByEmployeeName": "Admin",
        "Items": [
            {
                "InventoryItemDescription": "Melon och skinka",
                "ProductCode": "46360440",
                "ProductBarCode": "46360440",
                "TotalAmountIncludingVat": 75.0000000000,
                "TotalVat": 8.035714285714285714285714286,
                "Quantity": 1.0000000000,
                "Id": "637122568091988971"
            }
        ],
        "RootItems": [
            {
                "InventoryItemDescription": "Melon och skinka",
                "ProductCode": "46360440",
                "ProductBarCode": "46360440",
                "TotalAmountIncludingVat": 75.0000000000,
                "TotalVat": 8.035714285714285714285714286,
                "Quantity": 1.0000000000,
                "Id": "637122568091988971"
            }
        ],
        "Payments": [
            {
                "CreatedDateTime": "2019-12-18T10:06:49",
                "LastModifiedDateTime": "2019-12-18T10:06:49",
                "PaymentDateTime": "2019-12-18T10:06:49",
                "Type": 2,
                "Amount": 75.0000000000,
                "Id": "637122568091988664"
            }
        ],
        "Id": "637122568091988272"
    }
}                                              

TRANSACTIONITEM

Represents an item that was sold or returned as part of a Transaction.

API Information

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.

NOT AN ENDPOINT

Fields of "TRANSACTIONITEM"

Field Read only? Type Default Description Constraints
InventoryItemId Yes 64-bit Integer The ID of the InventoryItem being sold.
ProductCategory Yes String (max 30 chars.) The category of the InventoryItem being sold.
ProductDescription Yes String (max 30 chars.) The description of the InventoryItem being sold.
ProductBarCode Yes String (max 50 chars.) The bar code of the InventoryItem being sold.
ProductCode Yes String (max 50 chars.) The product code of the InventoryItem being sold.
TotalAmountIncludingVat Yes Decimal Total price including VAT.
TotalVat Yes Decimal Total VAT.
TotalDiscount Yes Decimal Total discount including VAT.
Quantity Yes Decimal Number of items being sold. 0 – 1000000

TRANSACTIONPAYMENT

Represents a payment that was made or returned as part of a Transaction.

API Information

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.

NOT AN ENDPOINT

Fields of "TRANSACTIONPAYMENT"

Field Read only? Type Default Description Constraints
Amount Yes Decimal The amount paid. 0 – 1000000
Type Yes 32-bit Integer The type of payment used. Cash = 1, Card = 2, Coupon = 3, BankAccount = 7.
PaymentDateTime Yes DateTime The date and time that the payment was made.