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.
Tax Groups & Tax Rates API
print icon
Tax Groups and Tax Rates API

There are two methods available for Tax Groups:

  1. List all Tax Groups
  2. Return full detail on a single Tax Group
List all tax groups

End Point: https://api.myposconnect.com/api/v2/taxgroups

Verb: GET

Example Call: https://api.myposconnect.com/api/v2/taxgroups?liPage=1&liPageSize=99999&sSortKey=TaxGroupNameASC

Return Codes: 200 for success, with the body containing the JSON for the tax group. For other possible (more general) return codes please see API Build Basics

Important: Returns a flat view of the tax groups, if some of the deeper information is required you will need to use the other method in this document. Typically there are not a large number of tax groups so you may wish to specify a suitably large page size to get them all at once (e.g. liPageSize=99999). There are several query string arguments that can be used with this call as follows (you may need to URL encode your argument values).

Filters: 

liPage

Optional Integer - defaults to 1 if not supplied

liPageSize

Optional Integer - defaults to 10 if not supplied

sSortKey

Optional String – acceptable values are the name of any returned field appended with ASC or DESC (eg “taxGroupNameASC” means sort the results by the name field in ascending order)

sFieldList

Optional String – use to limit which fields are returned. Acceptable value is the comma-separated names of any returned field (eg “taxGroupId,taxGroupName”). It is a good idea to use this argument if you do not require all the fields in the returned JSON. Please note you will always receive the fields “customSortRowNumber” and “liTotalCount” which allow you to establish how many pages of results there are and where each row lies within the results.

Return full detail on a single tax group

End Point: https://api.myposconnect.com/api/v2/taxgroups/{taxGroupId}

Verb: GET

Example Call: https://api.myposconnect.com/api/v2/taxgroups/8bf03185-cfe5-45d8-a2d9-4f83f3aa78ea

Return Codes: 200 for success, with the body containing the JSON for the tax group and the rates. For other possible (more general) return codes please see API Build Basics

Important: Replace the “{taxGroupId}” marker in the given endpoint URL with the Id of the tax group you require.

Example JSON Object
Single Tax Group

{
       "id": "3402d8fd-6362-e311-bb77-d4ae52b94eec",
       "name": "20%",
       "taxRates": [ {
       "id": "8a946fd1-0828-4192-b044-6b39c4109980",
       "taxRateCode": "VAT",
       "taxRateDescription": "UK VAT",
       "rate": 20.00000,
       "taxRounding": 1.00000,
       "sortOrder": 1,
       "zoneAreaID": "00000000-0000-0000-0000-000000000000",
       "taxAdjustable": false } ],
       "cC_001": "1",
       "cC_002": "2",
       "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": "2021-12-04T14:42:43.033",
       "creationDate": "2021-12-11T12:58:56.137"
}

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. 

 

Feedback
0 out of 0 found this helpful

scroll to top icon