๐งพ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
Name | Type | Description |
---|---|---|
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 |
HasDiscount | bool | Only tickets with non-zero discount amount are returned, if value is set to |
HasNegativeItem | bool | Only tickets with at least one item with negative total price are returned, if value is set to |
HasReturnedItem | bool | Only tickets with at least one item with type equal to |
Id | string | Supports NData syntax. Allows to filter based on |
ExternalId | string | Supports NData syntax. Allows to filter based on |
Name | string | Supports NData syntax. Allows filter based on by |
DeviceName | string[] | One or multiple comma separated values can be specified. If ticket is opened, value of |
PurchaseType | TicketPurchaseType | Supports NData syntax. Allows to filter based on |
OriginDeviceName | string | Supports NData syntax. Allows to filter based on |
CurrencyLabel | string | Supports NData syntax. Allows to filter based on |
DiscountRate | decimal | Supports NData syntax. Allows to filter based on |
OpenDate | DateTime | Supports NData syntax. Allows to filter based on |
CloseDate | DateTime | Supports NData syntax. Allows to filter based on |
CloseInfoDeviceName | string | Supports NData syntax. Allows to filter based on |
CloseInfoFiscalName | string | Supports NData syntax. Allows to filter based on |
CloseInfoNumber | int | Supports NData syntax. Allows to filter based on |
CloseInfoDailySalesReportNumber | int | Supports NData syntax. Allows to filter based on |
CloseInfoFiscalMemorySerialNumber | string | Supports NData syntax. Allows to filter based on |
LocationTableName | string | Supports NData syntax. Allows to filter based on |
LocationZoneName | string | Supports NData syntax. Allows to filter based on |
CustomerCardSerialNumber | string | Supports NData syntax. Allows to filter based on |
EmployeeUserName | string | Supports NData syntax. Allows to filter based on |
ItemPluCode | int | Supports NData syntax. Allows to filter based on |
ItemPluStockName | string | Supports NData syntax. Allows to filter based on |
$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 |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Get ticket
GET
http://{server-address}/tickets/{id}
Result is of type Ticket
.
Query Parameters
Name | Type | Description |
---|---|---|
id* | string | Unique ticket identifier |
Headers
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(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
Name | Type | Description |
---|---|---|
id* | string | Unique ticket identifier |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | Ticket | Model to create or update. |