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.
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
.
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.
The sales list
When you don't have the right permissions to fetch the sales for the provided location
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>'
{- "pagination": {
- "page": 1,
- "size": 2,
- "limit": 10,
- "total": 2
}, - "results": [
- {
- "version": 69,
- "locationId": "luna-park",
- "origin": {
- "saleId": "SaleId"
}, - "source": {
- "type": "MEANDU"
}, - "type": "SALE",
- "status": "CLOSED",
- "openedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "closedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "staff": {
- "id": "8675309"
}, - "bookingId": "6dca53a9-04c7-46aa-991c-cfdf51a8f652",
- "items": [
- {
- "id": "DRINK-123",
- "name": "Diet Soda",
- "sku": "1123581321",
- "unitPrice": {
- "amount": 123,
- "currency": "AUD"
}, - "unitPriceTax": {
- "amount": 123,
- "currency": "AUD"
}, - "quantity": 3,
- "tax": {
- "amount": 369,
- "currency": "AUD"
}, - "total": {
- "amount": 369,
- "currency": "AUD"
}
}
], - "payments": [
- {
- "acquirer": {
- "name": "TYRO",
- "transactionReference": "88888888-4444-4444-4444-121212121212",
- "terminalId": "57"
}, - "method": "EFTPOS",
- "type": "SALE",
- "goodsAndServicesAmount": {
- "amount": 123,
- "currency": "AUD"
}
}
], - "tax": {
- "amount": 123,
- "currency": "AUD"
}, - "total": {
- "amount": 369,
- "currency": "AUD"
}, - "table": {
- "seats": 1,
- "number": "11"
}, - "subtotal": {
- "amount": 369,
- "currency": "AUD"
}
}, - {
- "version": 69,
- "locationId": "luna-park",
- "origin": {
- "saleId": "SaleId",
- "locationId": "POS-0000001"
}, - "source": {
- "type": "MEANDU"
}, - "type": "COMBINATION",
- "status": "CLOSED",
- "openedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "closedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "staff": {
- "id": "8675309"
}, - "bookingId": "6dca53a9-04c7-46aa-991c-cfdf51a8f652",
- "items": [
- {
- "id": "DRINK-123",
- "name": "Diet Soda",
- "sku": "1123581321",
- "sale": {
- "type": "SALE"
}, - "unitPrice": {
- "amount": 123,
- "currency": "AUD"
}, - "unitPriceTax": {
- "amount": 123,
- "currency": "AUD"
}, - "quantity": 3,
- "tax": {
- "amount": 369,
- "currency": "AUD"
}, - "total": {
- "amount": 369,
- "currency": "AUD"
}
}, - {
- "id": "DRINK-1322",
- "name": "Soda",
- "sku": "1123581322",
- "sale": {
- "type": "REFUND"
}, - "unitPrice": {
- "amount": 123,
- "currency": "AUD"
}, - "unitPriceTax": {
- "amount": 123,
- "currency": "AUD"
}, - "quantity": 3,
- "tax": {
- "amount": 369,
- "currency": "AUD"
}, - "total": {
- "amount": 369,
- "currency": "AUD"
}
}
], - "payments": [
- {
- "acquirer": {
- "name": "TYRO",
- "transactionReference": "88888888-4444-4444-4444-121212121212",
- "terminalId": "57"
}, - "method": "EFTPOS",
- "type": "SALE",
- "goodsAndServicesAmount": {
- "amount": 123,
- "currency": "AUD"
}
}
], - "tax": {
- "amount": 123,
- "currency": "AUD"
}, - "total": {
- "amount": 369,
- "currency": "AUD"
}
}
]
}