TableSaleItems API
TableSaleitems is the main TAB and Account table holding incomplete receipts, for example those awaiting payment. You can add and view TableSaleItems only, never edit or delete them. TableSaleItems are Receipts that have NOT happened. If you want to look at sales that have been completed and paid look at Saleitems instead.
There are three methods available for TableSaleItems :
- List all receipts in TableSaleItems
- Return full detail on a single receipt in TableSaleItems
- Add a new receipt in TableSaleItems
List all receipts in TableSaleItems
End Point: https://api.myposconnect.com/api/v2/tablesaleitems/receipts
Verb: GET
Example Call 1: https://api.myposconnect.com/api/v2/tablesaleitems/receipts?customerId=e0ca0dbf-a342-4996-ba57-5980f45f4a6f
Return Codes: 200 (OK) for success, with the body containing the JSON for the Receipts. For other possible (more general) return codes please see API Build Basics
Note: This is a utility method to retrieve the receiptId’s and associated customerId. You can optionally filter down the results with a querystring argument for the customerId as shown in the example call.
Return full detail on a single receipt in TableSaleItems
End Point: https://api.myposconnect.com/api/v2/tablesaleitems/{identifier}
Verb: GET
Example Call 1: https://api.myposconnect.com/api/v2/tablesaleitems/0001234?isCodeLookup=true
Return Codes: 200 (OK) for success, with the body containing the JSON for the Receipts. For other possible (more general) return codes please see API Build Basics
Note: Replace the “{identifier}” marker in the given endpoint URL with a valid “receiptId” or “receiptCode” – nb if you supply a “receiptCode” then you must append a querystring argument to the URL called “isCodeLookup” and set it to “true”, you do not need to add this if you are retrieving by “receiptId”. The JSON you receive back from this method is a “TableSaleItems” wrapper object containing full “TableSaleItem” objects as shown in the appendices of this document.
Example JSON Object
Sample object TableSaleItems
|
---|
Add a TableSaleItems Receipt
End Point: https://api.myposconnect.com/api/v2/tablesaleitems
Verb: POST
Return Codes: 202 (Accepted) for success. 400 (BadRequest) for failure, see the body for more details. For other possible (more general) return codes please see API Build Basics
Important: Post a valid “TableSaleItems” wrapper object containing “TableSaleItem” objects as shown in the appendices of this document. The system creates the “tableSaleItemId” and “inserted” field values so there is no need to supply them.
Troubleshooting Ideas
As with all API connections, you will need to have acquired a bearer token and the user that acquired the token will need to be assigned access permission to this table. If you are not receiving any results send the full endpoint together with any filters and the API user to us from a valid email address and we can advise if permissions have been authorised. You might be able to see data with one table and not another if specific permissions are not applied. Check your filter dates if collecting all rows.
If you are adding TableSaleItems then ask us for a sample
A TableSaleItem must balance to zero, there must be a minimum of one product row and a minimum of one payment row