unTill TPAPI-POS Interface Description version 2 |
TPAPI-POS
Interface description
version 2.13
prot. | yyyy/mm/dd | avail. in unTill | author | changes |
2.0 | 2015/04/01 | 108.1 | Michael Saygachenko | (Initial version) |
2.1 | 2015/04/03 | 108.3 | Michael Saygachenko | Getting receipt in ClientDeposit function |
2.2 | 2015/04/06 | 109 | Michael Saygachenko | GetDepositsReport function added |
2.3 | 2015/04/23 | 109 | Michael Saygachenko | “DiscountReason” extra added to GetDetailedTurnoverReportRequest |
2.4 | 2015/05/05 | 109 | Michael Saygachenko | “ModificationDates” extra added to GetDetailedTurnoverReportRequest |
2.5 | 2015/05/20 | 109 | Michael Saygachenko | “UpdateClients” returns ID of created and updated clients in response’s Extra |
2.6 | 2015/06/03 | 110 | Michael Saygachenko | TPAPI performance improvements |
2.7 | 2015/06/24 | 110 | Michael Saygachenko | GetInOutCashReport function added |
2.8 | 2015/07/22 | 110.12 | Michael Saygachenko | Possibility to create Orders In Future with CreateOrder function |
2.9 | 2015/09/02 | 110.12 | Michael Saygachenko | “void” extra in TransactionOrderItem |
2.10 | 2015/09/17 | 111.1 | Michael Saygachenko | “IncludeReopen” extra acced in GetDetailedTurnoverReportRequest |
2.11 | 2015/09/18 | 111.1 | Michael Saygachenko | New function “PrintProforma” added |
2.12 | 2015/10/20 | 111.1 | Michael Saygachenko |
|
2.13 | 2015/10/29 | 111.1 | Michael Saygachenko | New function “PrintReport” |
TPAPI POS version 1 Interface Description can be found in separate document
Table Of Contents
1.4. Enabling waiter to be available in TPAPI
1.5. TPAPI versions compatibility
2.2. GetArticles - Brief list of active articles in database
2.3. GetArticlesInfo - The detailed list of active articles in database
2.3.2. GetArticlesInfoResponse
2.4. GetOptionsInfo - The list of active options in database
2.5. GetDepartmentsInfo - The list of active departments in database
2.5.1. GetDepartmentsInfoRequest
2.5.2. GetDepartmentsInfoResponse
2.6. GetGroupsInfo - The list of active food groups in database
2.7. GetCategoriesInfo - The list of active categories in database
2.7.1. GetCategoriesInfoRequest
2.7.2. GetCategoriesInfoResponse
2.8. GetPricesInfo - The list of active prices
2.9. GetPaymentsInfo - The list of available payment types
2.9.2. GetPaymentsInfoResponse
2.10. GetSalesAreasInfo - The list of active sales areas
2.10.1. GetSalesAreasInfoRequest
2.10.2. GetSalesAreasInfoResponse
2.11. GetActiveOrders - List of active orders within sales-areas
2.11.1. GetActiveOrdersRequest
2.11.2. GetActiveOrdersResponse
2.12. CreateOrder - Creates order
2.13. CloseOrder - Close order and pay with specified payment type
2.14. PosRestart - Restarts POS
2.15. GetUsersInfo - Get list of active users
2.16. GetTimeAttendanceReport - Read Time&Attendance Report
2.16.1. GetTimeAttendanceRequest
2.16.2. GetTimeAttendanceResponse
2.17. GetTurnoverReport - Read Turnover Report
2.17.1. GetTurnoverReportRequest
2.17.2. GetTurnoverReportResponse
2.18. GetDetailedTurnoverReport - Read Detailed Turnover Report
2.18.1. GetDetailedTurnoverReportRequest
2.18.2. Available extra fields
2.18.3. GetDetailedTurnoverReportResponse
2.19. GetClients - Read The List of Clients.
2.20. GetVersion - Read Current TPAPI Protocol Version
2.21. GetCancelledItemsReport - Read List of Cancelled Items
2.21.1. GetCancelledItemsReportRequest
2.21.2. GetCancelledItemsReportResponse
2.22. ClientDeposit - Makes Deposit to Client Account
2.22.1. ClientAccountDepositRequest
2.22.2. ClientAccountDepositResponse
2.23. UpdateClients - Create or Update clients in database.
2.24. GetClientsEx - Returns the list of clients using additional filters
2.24.2. GetClientsResponse - ref. response for GetClients method. Clients sorted by number.
2.25. NextCourse - Apply next course to table
2.26. SetTableCourse - Apply course to certain table
2.26.2. SetTableCourseResponse
2.27. GetActiveTableInfo - Information about open table
2.27.1. GetActiveTableInfoRequest
2.27.2. GetActiveTableInfoResponse
2.28. FindTransactions - Find transactions in database
2.28.1. FindTransactionsRequest
2.28.2. FindTransactionsResponse
2.29. GetServerInfo - Get Server Information
2.30. GetBOStatus - Get Current Backoffice Status
2.31. Pay - Make payment on table with specified payment type
2.32. GetDepositsReport - Read List of Cancelled Items
2.32.1. GetDepositsReportRequest
2.32.2. GetDepositsReportResponse
2.33. GetInOutCashReport - Read “In/Out Cash Report”
2.33.1. GetInOutCashReportRequest
2.33.2. GetInOutCashReportResponse
2.34. PrintProforma - Print proforma for a table
2.35. GetCountries - Return list of countries
2.36. UpdateCountries - Add or update countries
2.36.1. UpdateCountriesRequest
2.36.2. UpdateCountriesResponse
2.37. PrintReport - Print report
unTill server provides SOAP interface for 3rd party applications which may be used for remotely working with POS: reading configuration, making orders, etc (TPAPI-POS API)
TPAPI POS WSDL can be obtained from running untillsrv instance using HTTP address like:
http://<host-name>:<port>/wsdl/ITPAPIPOS
URL example:http://localhost:3063/wsdl/ITPAPIPOS
WSDL can be used to generate client for TPAPI web-service on any programming language.
To enable TPAPI interface, untill.ini must contain the following information:
[common]
;enable SOAP server.
soapport=3063
[TPAPI]
;enable TPAPI
UntillDatabaseName=[Untill_Database_Name]
On=1
Where [Untill_Database_Name] – is a short name of Untill database, f.e. regression.gdb
To make TP API unavailable, parameter “On” should be to “0”.
Note. “soapport” setting defines TCP port for listening incoming SOAP connections. Normally you should specify N+3 where N is the number defined by “port” setting in untill.ini. Do not specify other values in the range N..N+5, because they can be blocked by other unTill services, but N+3 is always reserved for TPAPI.
Each call to SOAP includes waiter name and TPAPI Password. To allow waiter be used in TPAPI calls, special “TPAPI Password” field must be specified in unTill BO for this waiter. Additional field is introduced since Passwords are normally very simple and can be easily hacked. Also, when configuring TPAPI user, ensure that “POS password” contains only digits.
Normally TPAPI POS protocol versions are backwards-compatible, so you can update unTill and do not take care that something will be broken in newer TPAPI version. If you are working with web-service using stub class generated by WSDL it also work in most cases. However it was found that stubs generated for Java (AXIS) are unable to work with an updated web-service if there were any change. This is known AXIS issue. For applications using AXIS stubs, you should take care of current TPAPI version, and update stub code each time protocol version is changed.
MS.NET clients does not produces any problem on webservice update.
unTIll POS API provides set of functions which may be used for requesting info abot POS configuration and executing actions like creating order, closing order, etc.
The following functions available in unTIll POS API:
The POS configuration should be read with the following algorythm:
This sequence may be repeated from time to time to keep POS configuration up-to-date on a client side.
After configuration received, GetActiveOrders may be called at any time to get current availability of tables. Use CreateOrder for creating new order, and CloseOrder for paying and closing existing order.
Some functions require TableNumber and TablePart, where TablePart is a letter in a range from “a” to “f”. Other values not accepted.
The following articles and option types can be ordered with TPAPI:
To identify item type, there is “order_item_type” field in OrderItem structure. It is not required to specify in CreateOrder request if certain article has “menu” enabled: only requirement is to identify it’s menu items.
Below there are few examples. Order items shown hierarchically just for convenience. In the list of items they follow one after another.
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | SalesAreaId | Long | Specify to request information for articles of certain sales-area only |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Articles | Array of articles, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
Returns the list of articles with their options. Each article represented by ArticleInfo structure. Condiment, supplement and free options returned in separate fields, and “mist have” options returned as a list of Ids. If article is a menu, it returns “true” in its is_menu field.
If ArticleId specified, only one article returned.
If SalesAreaId specified in request, only those articles returned, which is available in this sales area.
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | ArticleId | Long | Specify to request information for certain article only | |
4 | SalesAreaId | Long | Specify to request information for articles of certain sales-area only | |
5 | GetInactive | Boolean | If true, inactive articles will be returned as well | |
6 | Extra | List of extra fields* |
* Extra fields available for using in request:
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Articles | Array of articles, see App 1: Types and Classes | |
4 | Extra | List of extra fields* |
* The following extra fields returned:
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | OptionId | Long | Specify to request information for certain option only | |
4 | SalesAreaId | Long | Specify to request information for options of certain sales-area only |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Options | Array of options, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | SalesAreaId | Long | Specify to request information for departments from certain sales-area only | |
4 | DepartmentId | Long | Specify to request information for certain department only |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Departments | Array of departments, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Groups | Array of groups, see App 1: Types and Classes | |
4 | Extra | List of extra fields:
|
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Categories | Array of categories, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Prices | Array of active prices, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Payments | Array of payments, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | SalesAreas | Array of active sales areas, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | SalesAreaId | Long | Specify to request information for tables of certain sales-area only |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Orders | List of orders, see App 1: Types and Classes | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | TableNumber | Integer | + | |
4 | TablePart | String | + | “a” - “f” (*) |
5 | ClientName | String | Client name | |
6 | OrderName | String | Order name | |
7 | OrderDescr | String | Order description | |
8 | Covers | Integer | Number or covers | |
9 | Items | + | Order items, see App 1: Types and Classes | |
10 | Extra | List of extra fields(**) | ||
11 | ClientId | Long | Client ID |
(*) Table parts usage::
(**) The following extra fields accepted:
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | TableNumber | Integer | + | |
4 | TablePart | String | + | |
5 | PaymentId | Long | + | ID of payment to use |
6 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Users | UserInfo[] | List of active users |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
4 | UserId | Long | If specified, only report for this user returned, otherwise by all users | |
5 | From | Timestamp | + | Report period start |
6 | Till | Timestamp | + | Report period end |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Data | List of time & attendance records | |
4 | Extra | List of extra fields |
Returns the list of transactions with ordered items included
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
4 | UserId | Long | If specified, only report for this user returned, otherwise by all users | |
5 | SalesAreaId | Long | If specified, only report for this sales area returned, otherwise for all sales areas | |
6 | From | Timestamp | + | Report period start |
7 | Till | Timestamp | + | Report period end |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Data | List of bills with included items | |
4 | Extra | List of extra fields |
Returns the detailed list of transactions over specified period. For each transaction list of orders and list of bills returned.
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | From | Timestamp | + | Report period start |
4 | Till | Timestamp | + | Report period end |
5 | SalesAreaId | Long | Only show transactions from given Sales Area | |
6 | Extra | List of extra fields (see below) |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Data | List of transactions with included orders & payments | |
4 | Extra |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Clients | Client[] | List of clients |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Major | Integer | version major number |
4 | Minor | Integer | version minor number |
5 | Extra | List of extra fields |
Returns the list of items which has been cancelled (added to some order and then removed by “Cancel” or “Void” button)
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | From | Timestamp | + | Report period start |
4 | Till | Timestamp | + | Report period end |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Items | List of cancelled items | |
4 | Extra | List of extra fields |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | ClientId | Long | + | Client ID |
4 | PaymentId | Long | + | Payment ID |
5 | Amount | Decimal | + | Amount of deposit |
6 | Extra | List of extra fields1 |
1List of accepted extra fields:
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | OldBalance | Decimal | Client account balance before deposit |
4 | NewBalance | Decimal | Client account balance after deposit |
4 | Extra | List of extra fields2 |
2 Possible extra fields:
When ID is greater than 0, client is updated, else new client created.
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | Clients | Client[] | + | List of clients to add or update |
4 | Extra | Extra information |
When using this request, fields AccountBalance and SavePoints are not updated. Use ClientDeposit request for updating AccountBalance.
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | AddedClients | Integer | Number of added clients |
4 | UpdatedClients | Integer | Number of updated clients |
5 | Extra | Extra information1 |
1 Extra fields in response:
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | ModifiedSince | Timestamp | Specify this value to return only clients added/updated since that date/time | |
4 | Extra |
1List of available optional extra fields in request:
If no more courses on table, ReturnCode will be 7, ReturnMessage: “There are no more courses”
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | TableNumber | Integer | + | |
4 | TablePart | String | + | |
5 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
When course is not changed because given course is already set, no error will be returned.
If it is unable to set given course for this table, ReturnCode will be 7, ReturnMessage: “Unable to change table course to [...]”
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | TableNumber | Integer | + | Table to set course to |
4 | TablePart | String | + | Table part |
5 | CourseId | Long | + | Course to set for table |
6 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
Returns transaction structure and amounts (total, remaining, extra) by table number
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | TableNumber | Integer | + | Table to set course to |
4 | TablePart | String | + | Table part |
5 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Transaction | Transaction structure | |
4 | TotalAmount | Decimal | Total amount of transaction |
5 | RemainingAmount | Decimal | Remaining amount for payments |
6 | ExtraAmount | Decimal | Extra amount |
7 | Extra | Extra information |
Searches and returns transactions by certain conditions specified in “Conditions” field. Conditions is a set of ExtraInfo entities where each condition has key and value.
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | Conditions | + | List of conditions1 | |
4 | Limit | Integer | 0 - all records | |
5 | Desc | Boolean | False - return transactions in the order of creation | |
6 | Extra | List of extra fields |
1 Supported conditions:
Key | Value |
transaction_id | Transaction ID |
bill_external_id | External ID of a TransactionBill |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Transaction | List of found transactions | |
4 | Extra | Extra information |
Returns general TPAPI server information
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | DateTime | Timestamp | Current server date/time |
4 | Extra | Extra information |
Returns the status including BO database signature. Everytime any backoffice data is updated, this signature is changed.
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | CurrentSignature | String | Current BO database signature |
4 | Extra | Extra information |
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | TableNumber | Integer | + | |
4 | TablePart | String | + | |
5 | PaymentId | Long | + | ID of payment to use |
6 | Amount | Decimal | Specify amount of payment, “0” means pay complete amount | |
7 | EFTData | when specified and not empty, means that EFT payment processed externally and shouldn’t be handled by unTIll. Key=Value pairs separated by LF charachter: Syntax: “key1=value1\nkey2=value2…” | ||
8 | Extra | List of extra fields1 |
1Available extra fields for PayRequest:
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Extra | List of extra fields1 |
1Available extra fields for PayResponse:
Returns the list of deposits per time period
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | From | Timestamp | + | Report period start |
4 | Till | Timestamp | + | Report period end |
5 | SalesAreaId | Long | - | Sales Area ID (optional) |
6 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Items | List of deposits | |
4 | Extra | List of extra fields |
Returns the list of “in/out” cash entries from database per time period
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | From | Timestamp | + | Report period start |
4 | Till | Timestamp | + | Report period end |
5 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Items | List of in/out cash entries | |
4 | Extra | List of extra fields |
Allows to print proforma and optionally return proforma text
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | TableNumber | Integer | + | Table number |
4 | TablePart | String | + | Table part |
5 | Extra | List of extra fields
|
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Extra | List of extra fields
|
Returns the list of countries, declared in backoffice
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | Extra | List of extra fields1 |
1Extra Fields:
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Countries | Country[] | List of countries |
4 | Extra | List of extra fields |
Adds or updates countries in database. When Country.ID = 0, country is added, else updated. It is not allowed to add country when the country with same name is already exists.
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | Countries | Country[] | + | List of countries |
4 | Extra | List of extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | AddedCountries | Integer | Number of added countries |
4 | UpdatedCountries | Integer | Number of updated countries |
5 | Extra | List of extra fields1 |
1 Extra fields in response:
Allows to print report or return it in response as plain text
# | parameter | type | required | description |
1 | UserName | String | + | The name of unTill POS waiter |
2 | Password | String | + | Password for unTill TPAPI |
3 | LayoutId | Long | + | Report layout ID |
4 | PrinterId | Long | - | Target printer ID. If zero, result is sent in response as plain text |
5 | From | Timestamp | - | Report period start |
6 | Till | Timestamp | - | Report period end |
7 | Arguments | KeyValue[] | - | Report arguments |
8 | Extra | - | Extra fields |
# | parameter | type | description |
1 | ReturnCode | Integer | |
2 | ReturnMessage | String | Error text, ref. App 2: Return Codes |
3 | Extra | List of extra fields
|
App 1. Types and Classes
All strings are unicode UTF8 strings. Other classes are listed below:
# | parameter | type | description |
1 | ArticleId | Long | |
2 | ArticleName | String | Article name |
3 | ArticleNumber | Integer | Article number |
4 | Available | Long[] | List of sales area IDs this article is available |
5 | Prices | Prices for this article | |
6 | DepartmentId | Long | Department ID |
7 | FreeOption | Long | Free option ID (or null) |
8 | Options | Long[] | “Must have” option IDs |
9 | IsMenu | Boolean | “true” if this article is a menu |
10 | IsManualPrice | Boolean | “true” if this article requires manual price input when ordering |
11 | IsActive | Boolean | Article active |
12 | Promo | Boolean | Combo/Promo article |
13 | HqId | String | HQ Id |
14 | Extra | List of extra fields |
# | parameter | type | description |
1 | ArticleId | Long | Article id |
2 | ArticleName | String | Article name |
3 | ArticleNumber | Integer | Article number |
4 | SalesAreaId | Long | Sales-area id where this article is available |
5 | DepartmentId | Long | ID of department |
6 | HqId | String | HQ Id |
7 | Extra | List of extra fields |
# | parameter | type | description |
1 | ArticleId | Long | Article ID |
2 | DateTime | Timestamp | Date/time of ordering |
3 | UserId | Long | Waier ID |
4 | TableNo | Integer | Table Number |
5 | TablePart | String | Table Part |
6 | Quantity | Integer | Quantity of ordered articles |
7 | Price | Decimal | Single Item Price |
8 | PriceId | Long | Price ID |
9 | Extra | List of extra fields |
# | parameter | type | description |
1 | CategoryId | Long | Category ID |
2 | CategoryName | String | Category name |
3 | HqId | String | HQ Id |
4 | Extra | List of extra items |
# | parameter | type | description |
1 | Id | Long | Client ID |
2 | Number | Integer | Client Number |
3 | Name | String | |
4 | Country2 | String | Country name (ID of country is sent in Extras) |
5 | Phone | String | |
6 | Fax | String | |
7 | String | ||
8 | Website | String | |
9 | Address | String | |
10 | Info | String | |
11 | BirthDate | Timestamp | |
12 | CardNumber | String | Base64-encoded |
13 | Code | String | |
14 | OnInvoice1 | Boolean | |
15 | PriceActive | Boolean | |
16 | Price | Long | |
17 | PromotionPrice | Long | |
18 | AccountBalance1 | Decimal | |
19 | AccountLimit1 | Decimal | |
20 | IsSharedAccount | Boolean | True if client belongs to a shared account |
21 | SharedAccount | String | Shared Account Name |
22 | SavePoints | Integer | |
23 | SaveAmount1 | Integer | |
24 | Extra | List of extra fields3 |
1 For clients who belongs to Shared Accounts, these fields display values from Shared Accounts
2 Methods GetClients and GetClientsEx returns both Country (name) and country_id in Extras. When updating clients with UpdateClients:
3 Extra Fields:
Key | Description | Range | Read | Write |
is_active | Activity flag | 1 / 0 | always | optional, default=1 |
country_id | ID of Country | Long | always | optional 2 |
last_update | When client was updated for the last time | Date/Time | always | - |
# | parameter | type | description |
1 | CountrytId | Long | Country id |
2 | CountryName | String | Country name |
3 | Kind | Integer | One of the following:
|
4 | Extra | List of extra fields1 |
1 Extra Fields:
Key | Description | Range | Read | Write |
is_active | Activity flag | 1 / 0 | always | optional, default=1 |
# | parameter | type | description |
1 | CredentialGuid | String | GUID |
2 | CredentialName | String | Name |
# | parameter | type | description |
1 | DepartmentId | Long | Department id |
2 | DepartmentName | String | Department name |
3 | DepartmentNumber | Integer | Department number |
4 | Available[] | Long[] | Sales-areas where this department is available |
5 | Supplement | Long | Supplement Option ID |
6 | Condiment | Long | Condiment Option ID |
7 | GroupId | Long | Group ID |
8 | SpecialArticles | Long[] | List of “special” articles included into department |
9 | HqId | String | HQ Id |
10 | Extra | List of extra fields |
# | parameter | type | description |
1 | Id | Long | Deposit ID |
2 | DateTime | Timestamp | Deposit date/tme |
3 | ComputerName | String | Computer Name |
4 | DepositNumber | String | Deposit Number |
5 | UserId | Long | Waiter ID |
6 | SalesAreaId | Long | Sales Area ID |
7 | ClientId | Long | Client ID |
8 | PaymentId | Long | Payment ID |
9 | Amount | Decimal | Deposit Amount |
10 | Comments | String | Deposit comments |
11 | Extra | List of extra fields |
# | parameter | type | description |
1 | Key | String | Extra Info Item Key |
2 | Value | String | Extra Info Item Value |
3 | Extra | List of extra items |
# | parameter | type | description |
1 | GroupId | Long | Group ID |
2 | GroupName | String | Group name |
3 | CategoryId | Long | Category ID |
4 | HqId | String | HQ Id |
5 | Extra | List of extra items |
# | parameter | type | description |
1 | Position | String | Waiter Position |
2 | HourlyWage | Decimal | |
3 | HourlyWageOvertime | Decimal |
# | parameter | type | description |
1 | Id | Long | Item ID |
2 | DateTime | Timestamp | In/out cash date/tme |
3 | ComputerName | String | Computer Name |
4 | UserId | Long | Waiter ID |
5 | Amount | Decimal | Amount. Positive for “In” cash and negative for “Out” cash items |
6 | Reason | String | Reason |
7 | Supplier | String | Supplier |
8 | Extra | List of extra fields |
# | parameter | type | description |
1 | ArticleId | Long | Article id |
2 | PriceId | Long | Price id |
3 | Amount | Decimal | Price amount |
4 | Vat | Decimal | VAT percent |
5 | Extra | List of extra fields |
# | parameter | type | description |
1 | Key | String | Item Key |
2 | Value | String | Item Value |
# | parameter | type | description |
1 | LangCode | String | Language Code |
2 | Language | String | Language Name |
# | parameter | type | description |
1 | OptionId | Long | Option id |
2 | OptionName | String | Option name |
3 | Available | Long[] | List of sales-areas where this option is available |
4 | Items | List of option items with their prices | |
5 | Extra | List of extra fields |
# | parameter | type | description |
1 | TableNumber | Integer | Table number |
2 | TablePart | WideString | Table part |
3 | OrderName | String | Order name |
4 | ClientName | String | Client name |
5 | OrderDescr | String | Order description |
6 | SalesAreaId | Long | Sales-area ID |
7 | Extra | List of extra fields |
# | parameter | type | description |
1 | ItemNumber | Integer | Order item sequential number |
2 | ArticleId | Long | Article id (Zero for OrderItemType=6) |
3 | OrderItemType | Integer | Order item type, ref. App3: Constants |
4 | Text | String | Text for order_item_type=6 |
5 | ManualPrice | Decimal | Specifies price for articles with IsManualPrice=true |
6 | Quantity | Integer | Quantity of ordered items. Valid only for OrderItemType=0 and 5 |
7 | Extra | List of extra fields |
# | parameter | type | description |
1 | PriceId | Long | Price id |
2 | PriceName | String | Price name |
3 | HqId | String | HQ Id |
4 | Extra | List of extra fields |
# | parameter | type | description |
1 | PaymentId | Long | Payment id |
2 | PaymentNumber | Integer | Payment number |
3 | PaymentName | String | Payment name |
4 | PaymentKind | Integer | Payment kind, ref. App3: Constants |
5 | Extra | List of extra fields |
# | parameter | type | description |
1 | SalesAreaId | Long | Sales-area ID |
2 | SalesAreaName | String | Sales-area name |
3 | SalesAreaNumber | Integer | Sales-area number |
4 | PriceId | Long | Price for this sales-area |
5 | Tables | List of table ranges for this sales area | |
6 | Extra | List of extra fields |
# | parameter | type | description |
1 | FromTable | Integer | Table range start |
2 | ToTable | Integer | Table range end |
3 | Extra | List of extra fields |
# | parameter | type | description |
1 | UserId | Long | User ID |
2 | Start | Timestamp | Record start. “1899-12-30” means null date |
3 | Stop | Timestamp | Record end. “1899-12-30” means null date |
4 | TotalTime | String | Record duration, Format: “HH:MM” |
5 | TotalDecimal | Decimal | Record duration, in decimal |
6 | TotalCosts | Decimal | Total Costs |
7 | Extra | List of extra fields |
# | parameter | type | description |
1 | OpenDateTime | Timestamp | Transaction open date/tme |
2 | CloseDateTime | Timestamp | Transaction close date/time |
3 | ComputerName | String | Computer Name |
4 | BillNumber | Integer | Transaction Number |
5 | BillSuffix | String | Transaction Suffix |
6 | TableNumber | Integer | Table Number |
7 | Table Part | String | Table Part |
8 | Covers | Integer | Number of Covers |
9 | UserId | Long | Waier ID |
10 | SalesAreaId | Long | Sales Area ID |
11 | Items | List of included items | |
12 | Extra | List of extra fields |
# | parameter | type | description |
1 | ArticleId | Long | Article ID |
2 | DateTime | Timestamp | Date/time of ordering |
3 | ItemNumber | Integer | Number in order |
4 | ComputerName | String | Computer name |
5 | Quantity | Integer | Quantity of ordered articles |
6 | Price | Decimal | Price |
10 | UserId | Long | Waier ID |
11 | HqId | String | HQ ID |
12 | Extra | List of extra fields |
# | parameter | type | description |
1 | Id | Long | Transaction ID |
2 | OpenDateTime | Timestamp | Transaction open date/tme |
3 | CloseDateTime | Timestamp | Transaction close date/time |
4 | TranNumber | String | Transaction Number |
5 | TableNumber | Integer | Table Number |
6 | Table Part | String | Table Part |
7 | Covers | Integer | Number of Covers |
8 | UserId | Long | Waiter ID |
9 | DiscountOnTotal | Decimal | Discount amount on transaction total |
10 | ServiceCharge | Decimal | In Percents |
11 | ClientName | String | Name of client |
12 | ClientId | Long | ID of client |
13 | Orders | List of orders for this transaction | |
14 | Bills | List of bills for this transaction | |
15 | Proformas | List of proformas | |
16 | BillReprints | List of bill re-prints | |
17 | Extra | List of extra fields:
|
# | parameter | type | description |
1 | Id | Long | Order ID |
2 | DateTime | Timestamp | Order date/tme |
3 | Extra | List of extra fields |
# | parameter | type | description |
1 | Id | Long | Order ID |
2 | DateTime | Timestamp | Order date/tme |
3 | UserId | Long | Waiter ID |
4 | Extra | List of extra fields |
# | parameter | type | description |
1 | Id | Long | Order ID |
2 | DateTime | Timestamp | Order date/tme |
3 | ComputerName | String | Computer Name |
4 | OrderNumber | String | Order Number |
5 | UserId | Long | Waiter ID |
6 | SalesAreaId | Long | Sales Area ID |
7 | Items | List of order items | |
8 | Extra | List of extra fields |
# | parameter | type | description |
1 | Id | Long | Order item ID |
2 | ArticleId | Long | Article ID |
3 | ItemNumber | Integer | Number in order |
4 | Kind | Integer | 1 - Article 2 - Option 3 - Message text |
5 | Quantity | Integer | Quantity of ordered articles |
6 | SinglePrice | Decimal | Single Price |
7 | Price | Decimal | Price |
8 | Discount | Decimal | Discount amount |
9 | Vat | Decimal | VAT value |
10 | VatPercent | Decimal | VAT percent |
11 | Text | String | Text (in case when Id=0) |
12 | HqId | String | HQ Id |
13 | Extra | List of extra fields:
|
# | parameter | type | description |
1 | Id | Long | Bill ID |
2 | DateTime | Timestamp | Bill date/tme (first time paid) |
3 | RealDateTime | Timestamp | Real bill date/time |
4 | ComputerName | String | Computer Name |
5 | BillNumber | String | Bill Number |
6 | UserId | Long | Waiter ID |
7 | ClientName | String | Client for this bill |
8 | ClientId | Long | Client ID |
9 | SalesAreaId | Long | Sales Area ID |
10 | Tip | Currency | Tip amount |
11 | Payments | Payments used in this bill | |
12 | Extra | List of extra fields1 |
1Available extra fields:
# | parameter | type | description |
1 | Id | Long | Bill payment ID |
2 | PaymentId | Long | Payment ID |
3 | Amount | Decimal | Payment amount |
4 | Extra | List of extra fields |
# | parameter | type | description |
1 | GroupId | Long | Group ID |
2 | GroupName | String | Group name |
# | parameter | type | description |
1 | UserId | Long | User ID |
2 | UserName | String | User name |
3 | FirstName | String | First name |
4 | LastName | String | Last name |
5 | Group | Group Id | |
6 | Credentials | List of assigned credentials | |
7 | Language | User language | |
8 | Void | Boolean | User Void |
9 | ClockIn | Boolean | User Clock In |
10 | TagReaderCode | String | Tag Reader Code, Base64 encoded |
11 | OperatorId | String | Value passed to EFT |
12 | Address | String | |
13 | Country | String | |
14 | Phone | String | |
15 | Birthdate | Timestamp | |
16 | Insurance | String | |
17 | HourlyWage | Decimal | (deprecated) since v1.4 / unTill b92 |
18 | HourlyWages | List of hourly wages for this waiter (since v1.4 / unTill b92) | |
19 | Extra | List of extra fields |
Each function returns result code and result message. When function completes with no errors, result code is “0” and result message is “ok”. For result codes different than 0, result message will contain the text of error.
Result code | Description | Result Message |
0 | Operation completed with no errors | ok |
1 | Internal server error | Exception class, message, stacktrace |
2 | Authentication error | |
3 | Illegal request argument | Details |
4 | Database unavailable | Details |
5 | TP-API disabled | Details |
6 | TP-API not allowed | TP-API not allowed by unTill license |
7 | Request can not be processed | Reason |
Order item types:
Option type | Description |
0 | Normal article (either regular or menu) |
1 | Must have option |
2 | Free option |
3 | Supplement |
4 | Condiment |
5 | Menu item |
6 | Article message |
Payment kinds:
Option type | Description |
0 | Cash |
1 | Card |
2 | On-Account / On-Invoice |
3 | Room (HotelConcepts) |
4 | Cheque |
5 | Hash |
6 | Service Charge |
7 | Discount |
8 | SmartCard |
Order article with free option:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:TPAPIPosIntfU-ITPAPIPOS" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <soapenv:Header/> <soapenv:Body> <urn:CreateOrder soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <Request xsi:type="urn:TCreateOrderRequest" xmlns:urn="urn:TPAPIPosIntfU"> <Password xsi:type="xsd:string">123</Password> <UserName xsi:type="xsd:string">Ivan</UserName> <TableNumber xsi:type="xsd:int">222</TableNumber> <TablePart xsi:type="xsd:string">a</TablePart> <ClientName xsi:type="xsd:string"></ClientName> <OrderName xsi:type="xsd:string"></OrderName> <OrderDescr xsi:type="xsd:string"></OrderDescr> <Items xsi:type="urn:TOrderItemArray" soapenc:arrayType="urn:TOrderItem[2]"> <item xsi:type="urn:TOrderItem"> <ItemNumber xsi:type="xsd:int">1</ItemNumber> <ArticleId xsi:type="xsd:long">25000073936</ArticleId> <OrderItemType xsi:type="xsd:int">0</OrderItemType> <Text xsi:type="xsd:string"></Text> <ManualPrice xsi:type="xsd:double">0</ManualPrice> <Quantity xsi:type="xsd:int">1</Quantity> </item> <item xsi:type="urn:TOrderItem"> <ItemNumber xsi:type="xsd:int">2</ItemNumber> <ArticleId xsi:type="xsd:long">5000000370</ArticleId> <OrderItemType xsi:type="xsd:int">2</OrderItemType> <Text xsi:type="xsd:string"></Text> <ManualPrice xsi:type="xsd:double">0</ManualPrice> <Quantity xsi:type="xsd:int">1</Quantity> </item> </Items> </Request> </urn:CreateOrder> </soapenv:Body> </soapenv:Envelope> |
Order Menu:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:TPAPIPosIntfU-ITPAPIPOS" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <soapenv:Header/> <soapenv:Body> <urn:CreateOrder soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <Request xsi:type="urn:TCreateOrderRequest" xmlns:urn="urn:TPAPIPosIntfU"> <Password xsi:type="xsd:string">123</Password> <UserName xsi:type="xsd:string">Ivan</UserName> <TableNumber xsi:type="xsd:int">222</TableNumber> <TablePart xsi:type="xsd:string">a</TablePart> <ClientName xsi:type="xsd:string"></ClientName> <OrderName xsi:type="xsd:string"></OrderName> <OrderDescr xsi:type="xsd:string"></OrderDescr> <Items xsi:type="urn:TOrderItemArray" soapenc:arrayType="urn:TOrderItem[4]"> <item xsi:type="urn:TOrderItem"> <ItemNumber xsi:type="xsd:int">1</ItemNumber> <ArticleId xsi:type="xsd:long">15000037955</ArticleId> <OrderItemType xsi:type="xsd:int">0</OrderItemType> <Text xsi:type="xsd:string"></Text> <ManualPrice xsi:type="xsd:double">0</ManualPrice> <Quantity xsi:type="xsd:int">2</Quantity> </item> <item xsi:type="urn:TOrderItem"> <ItemNumber xsi:type="xsd:int">2</ItemNumber> <ArticleId xsi:type="xsd:long">5000000224</ArticleId> <OrderItemType xsi:type="xsd:int">5</OrderItemType> <Text xsi:type="xsd:string"></Text> <ManualPrice xsi:type="xsd:double">0</ManualPrice> <Quantity xsi:type="xsd:int">2</Quantity> </item> <item xsi:type="urn:TOrderItem"> <ItemNumber xsi:type="xsd:int">3</ItemNumber> <ArticleId xsi:type="xsd:long">5000000428</ArticleId> <OrderItemType xsi:type="xsd:int">5</OrderItemType> <Text xsi:type="xsd:string"></Text> <ManualPrice xsi:type="xsd:double">0</ManualPrice> <Quantity xsi:type="xsd:int">2</Quantity> </item> <item xsi:type="urn:TOrderItem"> <ItemNumber xsi:type="xsd:int">4</ItemNumber> <ArticleId xsi:type="xsd:long">5000000442</ArticleId> <OrderItemType xsi:type="xsd:int">5</OrderItemType> <Text xsi:type="xsd:string"></Text> <ManualPrice xsi:type="xsd:double">0</ManualPrice> <Quantity xsi:type="xsd:int">2</Quantity> </item> </Items> </Request> </urn:CreateOrder> </soapenv:Body> </soapenv:Envelope> |
Get Turnover Report:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:TPAPIPosIntfU-ITPAPIPOS"> <soapenv:Header/> <soapenv:Body> <urn:GetTurnoverReport soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <Request xsi:type="urn:TGetTurnoverReportRequest" xmlns:urn="urn:TPAPIPosIntfU"> <Password xsi:type="xsd:string">123</Password> <UserName xsi:type="xsd:string">Ivan</UserName> <UserId xsi:type="xsd:long">0</UserId> <SalesAreaId xsi:type="xsd:long">0</SalesAreaId> <From xsi:type="xsd:dateTime">2011-10-18T16:50:00.000+04:00</From> <Till xsi:type="xsd:dateTime">2011-10-18T12:59:00.000Z</Till> </Request> </urn:GetTurnoverReport> </soapenv:Body> </soapenv:Envelope> |
unTill® bvba – Hospitality Software info@untill.com www.untill.com Broekstraat 76e – 9150 Rupelmonde – Belgium
unTill® is a registered trademark, all rights on the use of the logo, trademark and software are owned by unTill® Holding BV.