Published using Google Docs
unTill TPAPI-POS v2
Updated automatically every 5 minutes

untill_header5.png

unTill TPAPI-POS Interface Description version 2

TPAPI-POS

Interface description

version 2.13


TPAPI 2 Version History

prot.
ver

yyyy/mm/dd

avail. in unTill
version

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

               What’s new in version 2.0

Table Of Contents

TPAPI 2 Version History

What’s new in version 2.0

1. Architecture Overview

1.1. Control Flow

1.2. TPAPI Entry Point

1.3. Enabling TPAPI in unTill

1.4. Enabling waiter to be available in TPAPI

1.5. TPAPI versions compatibility

2. unTill POS API

2.1. Ordering Overview

2.2. GetArticles - Brief list of active articles in database

2.2.1. GetArticlesRequest

2.2.2. GetArticlesResponse

2.3. GetArticlesInfo - The detailed list of active articles in database

2.3.1. GetArticlesInfoRequest

2.3.2. GetArticlesInfoResponse

2.4. GetOptionsInfo - The list of active options in database

2.4.1. GetOptionsInfoRequest

2.4.2. GetOptionsInfoResponse

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.6.1. GetGroupsInfoRequest

2.6.2. GetGroupsInfoResponse

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.8.1. GetPricesInfoRequest

2.8.2. GetPricesInfoResponse

2.9. GetPaymentsInfo - The list of available payment types

2.9.1. GetPaymentsInfoRequest

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.12.1. CreateOrderRequest

2.12.2. CreateOrderResponse

2.13. CloseOrder - Close order and pay with specified payment type

2.13.1. CloseOrderRequest

2.13.2. CloseOrderResponse

2.14. PosRestart - Restarts POS

2.14.1. PosRestartRequest

2.14.2. PosRestartResponse

2.15. GetUsersInfo - Get list of active users

2.15.1. GetUsersInfoRequest

2.15.2. GetUsersInfoResponse

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.19.1. GetClientsRequest

2.19.2. GetClientsResponse

2.20. GetVersion - Read Current TPAPI Protocol Version

2.20.1. GetVersionRequest

2.20.2. GetVersionResponse

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.23.1. UpdateClientsRequest

2.23.2. UpdateClientsResponse

2.24. GetClientsEx - Returns the list of clients using additional filters

2.24.1. GetClientsExRequest

2.24.2. GetClientsResponse - ref. response for GetClients method. Clients sorted by number.

2.25. NextCourse - Apply next course to table

2.25.1. NextCourseRequest

2.25.2. NextCourseResponse

2.26. SetTableCourse - Apply course to certain table

2.26.1. SetTableCourseRequest

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.29.1. GetServerInfoRequest

2.29.2. GetServerInfoResponse

2.30. GetBOStatus - Get Current Backoffice Status

2.30.1. GetBOStatusRequest

2.30.2. GetBOStatusResponse

2.31. Pay - Make payment on table with specified payment type

2.31.1. PayRequest

2.31.2. PayResponse

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.34.1. PrintProformaRequest

2.34.2. PrintProformaResponse

2.35. GetCountries - Return list of countries

2.35.1. GetCountriesRequest

2.35.2. GetCountriesResponse

2.36. UpdateCountries - Add or update countries

2.36.1. UpdateCountriesRequest

2.36.2. UpdateCountriesResponse

2.37. PrintReport - Print report

2.37.1. PrintReportRequest

2.37.2. PrintReportResponse

ArticleInfo

ArticleShort

CancelledItem

CategoryInfo

Client

Country

Credential

DepartmentInfo

DepositItem

ExtraInfo

GroupInfo

HourlyWageItem

InOutCashItem

ItemPrice

KeyValue

Language

OptionInfo

OrderInfo

OrderItem

PriceInfo

PaymentInfo

SalesAreaInfo

TableRange

TimeAttendanceRecord

TurnoverBill

TurnoverBillItem

TurnoverTransaction

TransactionBillReprint

TransactionProforma

TransactionOrder

TransactionOrderItem

TransactionBill

TransactionBillPayment

UserGroup

UserInfo

App 2. Return codes

App 3. Constants

App 4. SOAP Examples

1. Architecture Overview

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)

1.1. Control Flow

1.2. TPAPI Entry Point

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.

1.3. Enabling TPAPI in unTill

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.

1.4. Enabling waiter to be available in 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.

1.5. TPAPI versions compatibility

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.

2. unTill POS API

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:

  1. Read the list of sales areas with GetSalesAreasInfo
  2. Read the list of prices with GetPricesInfo
  3. Read the list of options with GetOptionsInfo
  4. Read the list of articles with GetArticlesInfo
  5. Read the list of payments with GetPaymentsInfo

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.

2.1. Ordering Overview

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.

  1. List of regular articles: order_item_type = 0 used for all items
  2. Article with “must-have” options:
  1. Article with different types of options:
  1. Menus:
  1. Each menu item may also have different types of options:
  1. optionA_article1: order_item_type = 1 (must have option)
  2. optionB_article1: order_item_type = 1 (must have option)

2.2. GetArticles - Brief list of active articles in database

2.2.1. GetArticlesRequest

#

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

2.2.2. GetArticlesResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Articles

ArticleShort[]

Array of articles, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.3. GetArticlesInfo - The detailed list of active articles in database

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.

2.3.1. GetArticlesInfoRequest

#

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

ExtraInfo[]

List of extra fields*

* Extra fields available for using in request:

2.3.2. GetArticlesInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Articles

ArticleInfo[]

Array of articles, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields*

* The following extra fields returned:

2.4. GetOptionsInfo - The list of active options in database

2.4.1. GetOptionsInfoRequest

#

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

2.4.2. GetOptionsInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Options

OptionInfo[]

Array of options, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.5. GetDepartmentsInfo - The list of active departments in database

2.5.1. GetDepartmentsInfoRequest

#

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

2.5.2. GetDepartmentsInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Departments

DepartmentInfo[]

Array of departments, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.6. GetGroupsInfo - The list of active food groups in database

2.6.1. GetGroupsInfoRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.6.2. GetGroupsInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Groups

GroupInfo[]

Array of groups, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields:

  • bookkeeping_vat
  • bookkeeping_turnover

2.7. GetCategoriesInfo - The list of active categories in database

2.7.1. GetCategoriesInfoRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.7.2. GetCategoriesInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Categories

CategoryInfo[]

Array of categories, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.8. GetPricesInfo - The list of active prices

2.8.1. GetPricesInfoRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.8.2. GetPricesInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Prices

PriceInfo[]

Array of active prices, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.9. GetPaymentsInfo - The list of available payment types

2.9.1. GetPaymentsInfoRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.9.2. GetPaymentsInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Payments

PaymentInfo[]

Array of payments, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.10. GetSalesAreasInfo - The list of active sales areas

2.10.1. GetSalesAreasInfoRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.10.2. GetSalesAreasInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

SalesAreas

SalesAreaInfo[]

Array of active sales areas, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.11. GetActiveOrders - List of active orders within sales-areas

2.11.1. GetActiveOrdersRequest

#

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

2.11.2. GetActiveOrdersResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Orders

OrderInfo[]

List of orders, see App 1: Types and Classes

4

Extra

ExtraInfo[]

List of extra fields

2.12. CreateOrder - Creates order

2.12.1. CreateOrderRequest

#

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

OrderItem[]

+

Order items, see App 1: Types and Classes

10

Extra

ExtraInfo[]

List of extra fields(**)

11

ClientId

Long

Client ID

(*) Table parts usage::

  1. “a” to “f” table parts available
  2. If no parts occupied - you can only order at "a"
  3. If only 1 part (X) occupied on table - then it is possible to make order at this part, or at table part (X + 1), if available
  4. If more than 1 part occupied, then you can make order on any

(**) The following extra fields accepted:

2.12.2. CreateOrderResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

2.13. CloseOrder - Close order and pay with specified payment type

2.13.1. CloseOrderRequest

#

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

ExtraInfo[]

List of extra fields

2.13.2. CloseOrderResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

2.14. PosRestart - Restarts POS

2.14.1. PosRestartRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.14.2. PosRestartResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

2.15. GetUsersInfo - Get list of active users

2.15.1. GetUsersInfoRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.15.2. GetUsersInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Users

UserInfo[]

List of active users

4

Extra

ExtraInfo[]

List of extra fields

2.16. GetTimeAttendanceReport - Read Time&Attendance Report

2.16.1. GetTimeAttendanceRequest

#

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

2.16.2. GetTimeAttendanceResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Data

TimeAttendanceRecord[]

List of time & attendance records

4

Extra

ExtraInfo[]

List of extra fields

2.17. GetTurnoverReport - Read Turnover Report

Returns the list of transactions with ordered items included

2.17.1. GetTurnoverReportRequest

#

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

2.17.2. GetTurnoverReportResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Data

TurnoverBill[]

List of bills with included items

4

Extra

ExtraInfo[]

List of extra fields

2.18. GetDetailedTurnoverReport - Read Detailed Turnover Report

Returns the detailed list of transactions over specified period. For each transaction list of orders and list of bills returned.

2.18.1. GetDetailedTurnoverReportRequest

#

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

ExtraInfo[]

List of extra fields (see below)

2.18.2. Available extra fields
2.18.3. GetDetailedTurnoverReportResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Data

TurnoverTransaction[]

List of transactions with included orders & payments

4

Extra

ExtraInfo[]


2.19. GetClients - Read The List of Clients.

2.19.1. GetClientsRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.19.2. GetClientsResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Clients

Client[]

List of clients

4

Extra

ExtraInfo[]

List of extra fields


2.20. GetVersion - Read Current TPAPI Protocol Version

2.20.1. GetVersionRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

2.20.2. GetVersionResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Major

Integer

version major number

4

Minor

Integer

version minor number

5

Extra

ExtraInfo[]

List of extra fields


2.21. GetCancelledItemsReport - Read List of Cancelled Items

Returns the list of items which has been cancelled (added to some order and then removed by “Cancel” or “Void” button)

2.21.1. GetCancelledItemsReportRequest

#

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

2.21.2. GetCancelledItemsReportResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Items

CancelledItem[]

List of cancelled items

4

Extra

ExtraInfo[]

List of extra fields

2.22. ClientDeposit - Makes Deposit to Client Account

2.22.1. ClientAccountDepositRequest

#

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

ExtraInfo[]

List of extra fields1

1List of accepted extra fields:

2.22.2. ClientAccountDepositResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

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

ExtraInfo[]

List of extra fields2

2 Possible extra fields:

2.23. UpdateClients  - Create or Update clients in database.

When ID is greater than 0, client is updated, else new client created.

2.23.1. UpdateClientsRequest

#

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

ExtraInfo[]

Extra information

When using this request, fields AccountBalance and SavePoints are not updated. Use ClientDeposit request for updating AccountBalance.

2.23.2. UpdateClientsResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

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

ExtraInfo[]

Extra information1

1 Extra fields in response:

2.24. GetClientsEx - Returns the list of clients using additional filters

2.24.1. GetClientsExRequest

#

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

ExtraInfo[]

Extra information1

1List of available optional extra fields in request:

2.24.2. GetClientsResponse - ref. response for GetClients method. Clients sorted by number.

2.25. NextCourse - Apply next course to table

If no more courses on table, ReturnCode will be 7, ReturnMessage: “There are no more courses”

2.25.1. NextCourseRequest

#

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

ExtraInfo[]

List of extra fields

2.25.2. NextCourseResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

2.26. SetTableCourse - Apply course to certain table

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 [...]”

2.26.1. SetTableCourseRequest

#

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

ExtraInfo[]

List of extra fields

2.26.2. SetTableCourseResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

2.27. GetActiveTableInfo - Information about open table

Returns transaction structure and amounts (total, remaining, extra) by table number

2.27.1. GetActiveTableInfoRequest

#

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

ExtraInfo[]

List of extra fields

2.27.2. GetActiveTableInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Transaction

TurnoverTransaction

Transaction structure

4

TotalAmount

Decimal

Total amount of transaction

5

RemainingAmount

Decimal

Remaining amount for payments

6

ExtraAmount

Decimal

Extra amount

7

Extra

ExtraInfo[]

Extra information

2.28. FindTransactions - Find transactions in database

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.

2.28.1. FindTransactionsRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

3

Conditions

ExtraInfo[]

+

List of conditions1

4

Limit

Integer

0 - all records

5

Desc

Boolean

False - return transactions in the order of creation
True - return in reversed order

6

Extra

ExtraInfo[]

List of extra fields

1 Supported conditions:

Key

Value

transaction_id

Transaction ID

bill_external_id

External ID of a TransactionBill

2.28.2. FindTransactionsResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Transaction

TurnoverTransaction[]

List of found transactions

4

Extra

ExtraInfo[]

Extra information

2.29. GetServerInfo - Get Server Information

Returns general TPAPI server information

2.29.1. GetServerInfoRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

3

Extra

ExtraInfo[]

List of extra fields

2.29.2. GetServerInfoResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

DateTime

Timestamp

Current server date/time

4

Extra

ExtraInfo[]

Extra information

2.30. GetBOStatus - Get Current Backoffice Status

Returns the status including BO database signature. Everytime any backoffice data is updated, this signature is changed.

2.30.1. GetBOStatusRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

3

Extra

ExtraInfo[]

List of extra fields

2.30.2. GetBOStatusResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

CurrentSignature

String

Current BO database signature

4

Extra

ExtraInfo[]

Extra information

2.31. Pay - Make payment on table with specified payment type

2.31.1. PayRequest

#

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

ExtraInfo[]

List of extra fields1

1Available extra fields for PayRequest:

2.31.2. PayResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Extra

ExtraInfo[]

List of extra fields1

1Available extra fields for PayResponse:

2.32. GetDepositsReport - Read List of Cancelled Items

Returns the list of deposits per time period

2.32.1. GetDepositsReportRequest

#

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

ExtraInfo[]

List of extra fields

2.32.2. GetDepositsReportResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Items

DepositItem[]

List of deposits

4

Extra

ExtraInfo[]

List of extra fields

2.33. GetInOutCashReport - Read “In/Out Cash Report”

Returns the list of “in/out” cash entries from database per time period

2.33.1. GetInOutCashReportRequest

#

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

ExtraInfo[]

List of extra fields

2.33.2. GetInOutCashReportResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Items

InOutCashItem[]

List of in/out cash entries

4

Extra

ExtraInfo[]

List of extra fields

2.34. PrintProforma - Print proforma for a table

Allows to print proforma and optionally return proforma text

2.34.1. PrintProformaRequest

#

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

ExtraInfo[]

List of extra fields

  • get_receipt - return receipt as text instead of sending it to printer
  • layout_id - specify custom layout for printing proforma

2.34.2. PrintProformaResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Extra

ExtraInfo[]

List of extra fields

  • receipt_text - text of proforma, if requested with get_receipt.

2.35. GetCountries - Return list of countries

Returns the list of countries, declared in backoffice

2.35.1. GetCountriesRequest

#

parameter

type

required

description

1

UserName

String

+

The name of unTill POS waiter

2

Password

String

+

Password for unTill TPAPI

3

Extra

ExtraInfo[]

List of extra fields1

1Extra Fields:

2.35.2. GetCountriesResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Countries

Country[]

List of countries

4

Extra

ExtraInfo[]

List of extra fields

2.36. UpdateCountries - Add or update countries

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.

2.36.1. UpdateCountriesRequest

#

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

ExtraInfo[]

List of extra fields

2.36.2. UpdateCountriesResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

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

ExtraInfo[]

List of extra fields1

1 Extra fields in response:

2.37. PrintReport - Print report

Allows to print report or return it in response as plain text

2.37.1. PrintReportRequest

#

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

ExtraInfo[]

-

Extra fields

2.37.2. PrintReportResponse

#

parameter

type

description

1

ReturnCode

Integer

See App 2: Return Codes

2

ReturnMessage

String

Error text, ref. App 2: Return Codes

3

Extra

ExtraInfo[]

List of extra fields

  • receipt_text - text of report, returned when PrinterId=0 in request

App 1. Types and Classes

All strings are unicode UTF8 strings. Other classes are listed below:

ArticleInfo

#

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

ItemPrice[]

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

ExtraInfo[]

List of extra fields

ArticleShort

#

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

ExtraInfo[]

List of extra fields

CancelledItem

#

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

ExtraInfo[]

List of extra fields

CategoryInfo

#

parameter

type

description

1

CategoryId

Long

Category ID

2

CategoryName

String

Category name

3

HqId

String

HQ Id

4

Extra

ExtraInfo[]

List of extra items

Client

#

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

Email

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

ExtraInfo[]

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

-

Country

#

parameter

type

description

1

CountrytId

Long

Country id

2

CountryName

String

Country name

3

Kind

Integer

One of the following:

  • 0 - Home Country
  • 1 - Member EC
  • 2 - Other

4

Extra

ExtraInfo[]

List of extra fields1

1 Extra Fields:

Key

Description

Range

Read

Write

is_active

Activity flag

1 / 0

always

optional, default=1

Credential

#

parameter

type

description

1

CredentialGuid

String

GUID

2

CredentialName

String

Name

DepartmentInfo

#

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

ExtraInfo[]

List of extra fields

DepositItem

#

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

ExtraInfo[]

List of extra fields

ExtraInfo

#

parameter

type

description

1

Key

String

Extra Info Item Key

2

Value

String

Extra Info Item Value

3

Extra

ExtraInfo[]

List of extra items

GroupInfo

#

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

ExtraInfo[]

List of extra items


HourlyWageItem

#

parameter

type

description

1

Position

String

Waiter Position

2

HourlyWage

Decimal

3

HourlyWageOvertime

Decimal

InOutCashItem

#

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

ExtraInfo[]

List of extra fields

ItemPrice

#

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

ExtraInfo[]

List of extra fields

KeyValue

#

parameter

type

description

1

Key

String

Item Key

2

Value

String

Item Value

Language

#

parameter

type

description

1

LangCode

String

Language Code

2

Language

String

Language Name

OptionInfo

#

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

ItemPrice[]

List of option items with their prices

5

Extra

ExtraInfo[]

List of extra fields


OrderInfo

#

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

ExtraInfo[]

List of extra fields

OrderItem

#

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

ExtraInfo[]

List of extra fields

PriceInfo

#

parameter

type

description

1

PriceId

Long

Price id

2

PriceName

String

Price name

3

HqId

String

HQ Id

4

Extra

ExtraInfo[]

List of extra fields

PaymentInfo

#

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

ExtraInfo[]

List of extra fields

SalesAreaInfo

#

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

TableRange[]

List of table ranges for this sales area

6

Extra

ExtraInfo[]

List of extra fields

TableRange

#

parameter

type

description

1

FromTable

Integer

Table range start

2

ToTable

Integer

Table range end

3

Extra

ExtraInfo[]

List of extra fields

TimeAttendanceRecord

#

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

ExtraInfo[]

List of extra fields

TurnoverBill

#

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

TurnoverBillItem[]

List of included items

12

Extra

ExtraInfo[]

List of extra fields

TurnoverBillItem

#

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

ExtraInfo[]

List of extra fields

TurnoverTransaction

#

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

TransactionOrder[]

List of orders for this transaction

14

Bills

TransactionBill[]

List of bills for this transaction

15

Proformas

TransactionProforma[]

List of proformas

16

BillReprints

TransactionBillReprint[]

List of bill re-prints

17

Extra

ExtraInfo[]

List of extra fields:

  • service_tax - percent value of Service Tax applied to the transaction
  • course_id - course ID
  • extra taxes (optionally)
  • discount_reason (optionally)
  • modified (optionally, YYYYMMDD-HHMMSS)

TransactionBillReprint

#

parameter

type

description

1

Id

Long

Order ID

2

DateTime

Timestamp

Order date/tme

3

Extra

ExtraInfo[]

List of extra fields

TransactionProforma

#

parameter

type

description

1

Id

Long

Order ID

2

DateTime

Timestamp

Order date/tme

3

UserId

Long

Waiter ID

4

Extra

ExtraInfo[]

List of extra fields

TransactionOrder

#

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

TransactionOrderItem[]

List of order items

8

Extra

ExtraInfo[]

List of extra fields

TransactionOrderItem

#

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

ExtraInfo[]

List of extra fields:

  • extra taxes (optionally)
  • void - when item is a result of “Void” operation (for OnlyPaid=0 mode only)

TransactionBill

#

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

TransactionBillPayment[]

Payments used in this bill

12

Extra

ExtraInfo[]

List of extra fields1

1Available extra fields:

TransactionBillPayment

#

parameter

type

description

1

Id

Long

Bill payment ID

2

PaymentId

Long

Payment ID

3

Amount

Decimal

Payment amount

4

Extra

ExtraInfo[]

List of extra fields

UserGroup

#

parameter

type

description

1

GroupId

Long

Group ID

2

GroupName

String

Group name

UserInfo

#

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

UserGroup

Group Id

6

Credentials

Credential[]

List of assigned credentials

7

Language

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

HourlyWageItem[]

List of hourly wages for this waiter (since v1.4 / unTill b92)

19

Extra

ExtraInfo[]

List of extra fields


App 2. Return codes

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
(f.e. incorrect SalesAreaId)

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


App 3. Constants

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


App 4. SOAP Examples

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.