List Sales

This endpoint returns all the sales of a given location. The list of sales is paginated and it is possible to apply filters to the sales being fetched.

Filtering

The filtering options use an "OR" clause within the same filter criteria and an "AND" clause between criteria.

This means that a request with saleStatus=OPEN&saleType=SALE will return the sales that were OPEN and that of type SALE.

A request with saleType=SALE&saleType=REFUND will return the sales that have either sale type SALE or REFUND.

Pagination

The paginated results are ordered using the sequence they were created in the Tyro Connect. For example results[0] on page 1 is the first matching sale that was created in the Tyro Connect system.

Request
Security:
query Parameters
locationId
required
string

The Tyro Connect Location Id of the sales to be retrieved. This parameter is required.

Example: locationId=luna-park
saleStatus
string

Returns results based on the status of a sale.

Enum: "OPEN" "CLOSED" "REOPENED"
saleType
string

Returns results based on the type of a sale.

Can be a single string or multi string value.

Enum: "COMBINATION" "SALE" "REFUND" "VOID"
fromDate
string <date>

Returns results that have a "startTime" later than or equal to the provided value.

Format: YYYY-MM-DD

Example: fromDate=2023-04-29
toDate
string

Returns results that have a "startTime" before than or equal to the provided value.

Format: YYYY-MM-DD

Example: toDate=2023-04-28
dateType
string
Default: "CREATED"

Specifies the date type of the 'fromDate' and 'toDate' parameters.

Enum: "CREATED" "UPDATED" "OPENED" "CLOSED"
limit
number [ 1 .. 50 ]

Specifies the amount of results to be retrieved.

A maximum of 50 results are returned if this value is not provided.

Example: limit=10
page
number >= 1

Specify the page to retrieve.

You will need to use this setting if you wish to retrieve specific pages.

Page-numbering is based on the value of "limit". If limit=5, then page=1 will display the hits from 1 to 5, page=3 will display the hits from 11 to 15.

Page numbers start at 1.

A request for a non-existing page will yield 0 results.

Example: page=2
header Parameters
Authorization
required
string
Default: Bearer {$$.env.access_token}
Responses
200

The sales list

403

When you don't have the right permissions to fetch the sales for the provided location

get/sales
Request samples
curl -i -X GET \
  'https://api.tyro.com/connect/sales?locationId=luna-park&saleStatus=OPEN&saleType=COMBINATION&fromDate=2023-04-29&toDate=2023-04-28&dateType=CREATED&limit=10&page=2' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "pagination": {
    },
  • "results": [
    ]
}
Copyright © Tyro Payments 2019-2024. All right reserved.