π§ΎTickets
This page provides a description of the available API routes for managing tickets.
Before you dive into the tickets API reference, it's a great idea to check out some articles that talk about different ticket states, the math used in tickets.
Additionally, if you plan to both read and edit tickets, don't miss the article on how tickets work with users' permissions.
API methods
Get tickets
GET
http://{server-address}/tickets
Returns all customers that matches query parameters. Result is of type QueryResult<Ticket>
.
Query Parameters
IsClosed
bool
Option to retrieve only closed or only opened tickets, if value is specified. Supports NData syntax.
HasCustomer
bool
Only tickets with non-empty Customer
field are returned, if value is set to true
. Tickets with Customer
field set to null
are returned, if value is set to false
. Supports NData syntax.
HasDiscount
bool
Only tickets with non-zero discount amount are returned, if value is set to true
. Tickets with zero discount amount are returned, if value is set to false
. Supports NData syntax.
HasNegativeItem
bool
Only tickets with at least one item with negative total price are returned, if value is set to true
. Tickets with positive items only are returned, if value is set to false
. Supports NData syntax.
HasReturnedItem
bool
Only tickets with at least one item with type equal to negative
are returned, if value is set to true
. Tickets with non-negative items only are returned, if value is set to false
. Supports NData syntax.
Id
string
Supports NData syntax. Allows to filter based on id
property.
ExternalId
string
Supports NData syntax. Allows to filter based on externalId
property.
Name
string
Supports NData syntax. Allows filter based on by name
property.
DeviceName
string[]
One or multiple comma separated values can be specified. If ticket is opened, value of originDeviceName
property is compared. When closed, closeInfo.deviceName
property is compared. Supports NData syntax.
PurchaseType
TicketPurchaseType
Supports NData syntax. Allows to filter based on purchaseType
property.
OriginDeviceName
string
Supports NData syntax. Allows to filter based on originDeviceName
property.
CurrencyLabel
string
Supports NData syntax. Allows to filter based on currencyLabel
property.
DiscountRate
decimal
Supports NData syntax. Allows to filter based on discountRate
property.
OpenDate
DateTime
Supports NData syntax. Allows to filter based on openDate
property.
CloseDate
DateTime
Supports NData syntax. Allows to filter based on closeDate
property.
CloseInfoDeviceName
string
Supports NData syntax. Allows to filter based on closeInfo.deviceName
property.
CloseInfoFiscalName
string
Supports NData syntax. Allows to filter based on closeInfo.fiscalName
property.
CloseInfoNumber
int
Supports NData syntax. Allows to filter based on closeInfo.number
property.
CloseInfoDailySalesReportNumber
int
Supports NData syntax. Allows to filter based on closeInfo.dailySalesReportNumber
property.
CloseInfoFiscalMemorySerialNumber
string
Supports NData syntax. Allows to filter based on closeInfo.fiscalMemorySerialNumber
property.
LocationTableName
string
Supports NData syntax. Allows to filter based on location.tableName
property.
LocationZoneName
string
Supports NData syntax. Allows to filter based on location.zoneName
property.
CustomerCardSerialNumber
string
Supports NData syntax. Allows to filter based on customer.cardSerialNumber
property.
EmployeeUserName
string
Supports NData syntax. Allows to filter based on employee.userName
property.
ItemPluCode
int
Supports NData syntax. Allows to filter based on plu.code
property in items
collection.
ItemPluStockName
string
Supports NData syntax. Allows to filter based on plu.stockName
property in items
collection.
$skip
int
Pagination property. Describing number of records to skip from beginning of result collection.
$take
int
Pagination property. Maximum count of items to be returned.
$sort
string[]
Comma separated list of property names. Please see NData syntax.
$count
bool
If set to true
, response will not contain items
collection. Use to get resource count, not the resources themselves.
Headers
Authorization*
string
Authorization header with authorization token.
Get ticket
GET
http://{server-address}/tickets/{id}
Result is of type Ticket
.
Query Parameters
id*
string
Unique ticket identifier
Headers
Authorization*
string
Authorization header with authorization token.
Create ticket
POST
http://{server-address}/tickets
Creates new opened ticket. Result is of type Ticket
.
Required rights
Please see User rights required for creating and modifying ticket section.
Required environments
Sale environment required.
Headers
Authorization*
string
Authorization header with authorization token.
Request Body
(body)*
Ticket
Model to create
Create or update ticket
PUT
http://{server-address}/tickets/{id}
Creates new or updates existing opened ticket. Attempt to update closed ticket will result in HTTP Status 403 (Forbidden). Result is of type Ticket
.
Required rights
Please see User rights required for creating and modifying ticket section.
Required environments
Sale environment required.
Path Parameters
id*
string
Unique ticket identifier
Headers
Authorization*
string
Authorization header with authorization token.
Request Body
(body)*
Ticket
Model to create or update.
Batch tickets update
PATCH
http://{server-address}/tickets
Preforms batch update of one or more tickets. Collection of affected tickets is returned.
Required rights
Please see User rights required for creating and modifying ticket section.
Required environments
Sale environment required.
Path Parameters
action
TicketsUpdateAction
Specifies ticket batch update mode.
Headers
Authorization*
string
Authorization header with authorization token.
Delete ticket
DELETE
http://{server-address}/tickets/{id}
Required rights
Please see User rights required for deleting ticket section.
Required environments
Sale environment required.
Path Parameters
id*
string
Unique ticket identifier
Headers
Authorization*
string
Authorization header with authorization token.
RPC Actions
These API methods trigger specific actions on server. However, it's important to note that depending on the type of selected fiscal device or order endpoint device, some methods may not be supported. Furthermore, if an action is attempted on an inactive fiscal device or order endpoint device, it will lead to failure. In both scenarios, making API calls will generate an HTTP status code of 403.
Close ticket
POST
http://{server-address}/tickets/{id}/close
Fiscalizes specific ticket (prints receipt or sends email receipt)and changes it's state to closed. Request body contains TicketCloseContext
class. Ticket is returned in response body.
Required rights
Please see User rights required for closing ticket section.
Required environments
Sale environment required.
Path Parameters
id*
string
Unique ticket identifier.
Headers
Authorization*
string
Authorization header with authorization token.
Request Body
(body)*
TicketCloseContext
The close options.
Print preliminary ticket
POST
http://{server-address}/tickets/{id}/print_preliminary_ticket
Prints preliminary receipt on specified order endpoint.
A preliminary receipt, often referred to as a "pre-check" or "provisional bill," is a document provided to diners before they make the final payment for their meal. This receipt outlines the items ordered and their associated costs, offering customers an initial overview of their expenses. This lets customer review the details before the final bill is issued.
The ticket's state remains unchanged. This action can be executed on both opened and closed tickets.
Required rights
Please see User rights required for printing preliminary ticket section.
Required environments
Sale environment required.
Path Parameters
action
TicketsUpdateAction
Specifies ticket batch update mode.
Headers
Authorization*
string
Authorization header with authorization token.
Request Body
(body)
PrintPreliminaryTicketContext
The PrintPreliminaryTicketContext
object containing preliminary receipt printing options.
The response contains no content.
Last updated