Tax Groups and Tax Rates API
There are two methods available for Tax Groups:
- List all Tax Groups
- 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
|
---|
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.