You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
TableSaleItems API
print icon
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 :

  1. List all receipts in TableSaleItems 
  2. Return full detail on a single receipt in TableSaleItems 
  3. 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

   NB – this shows a single “TableSaleItem” object within a simple “TableSaleItems” wrapper object.
 {
   "items": [
       {
       "tableSaleItemId": "92e0fee2-3c5d-4532-af62-0e0f27582131",
       "tableId": "7581876d-cb09-4c4a-8e1f-49b297c75b5b",
       "receiptId": "ab4299d5-e636-4b08-a5a4-03ff3eeb121f",
       "receiptCode": "87654321",
       "productId": "00000000-0000-0000-0000-000000000000",
       "itemCode": "13579",
       "itemDescription": "My Product",
       "itemShortDescription": "My Product",
       "quantity": 1.00000,
       "itemPrice": 100.00000,
       "itemValue": 100.0000,
       "itemCurValue": 100.0000,
       "overrideValue": null,
       "currencyCode": "",
       "taxCode": "",
       "taxRate": 20.00000,
       "taxValue": 20.00000,
       "promotionCode": "",
       "posted": "X",
       "printed": 0,
       "itemType": "M",
       "customerId": null,
       "rewardPoints": null,
       "inserted": "2020-06-09T16:14:27.77",
       "reasonCodeType": "",
       "paymentAttempts": null,
       "stockQuantity": null,
       "isTaxable": false,
       "commissionType": null,
       "commissionValue": null,
       "stockAdjustmentId": null,
       "modifierGroup": "",
       "printSort": null,
       "cardTransactionInfo01": null,
       "cardTransactionInfo02": null,
       "linkedSaleItemId": null,
       "linkedPurchaseOrderItemId": null,
       "itemSubType": null,
       "cC_001": null,
       "cC_002": null,
       "cC_003": null,
       "cC_004": null,
       "cC_005": null,
       "cC_006": null,
       "cC_007": null,
       "cC_008": null,
       "cC_009": null,
       "cC_010": null,
       "lastEditUser": "admin",
       "creationUser": "admin",
       "lastEditDevice": "till1",
       "creationDevice": "till1",
       "lastEditDate": "2020-06-09T16:14:27.77",
       "creationDate": "2020-06-09T16:14:27.77"
       }
   ]
 }

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

Feedback
0 out of 0 found this helpful

scroll to top icon