Retrieving all tax configurations
GET {{api-url}}/tax/{{tenant}}/taxes
Retrieves all tax configurations. The API allows to filter by the base tax configuration params like country code, tax class code, name or rate.
* If the Accept-Language
is set to *
then each internationalized field will be returned as a map that contains all of translations in a format of key:value
pairs, where the key
is the language code and value
is the translation.
* If the Accept-Language
contains a single language then the translation translation will be returned as a string value.
* If the Accept-Language
header is empty default language defined in the Configuration service
is taken.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
pageNumber | number | The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. | |
The number of the first page is 1. | |||
pageSize | number | The number of documents being retrieved on the page. | |
sort | string | Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case. Sorting by name parameter works properly only if the Accept-Language header is set to a specific language or is empty with default language specified in the configuration service. Valid params to sort: name , description , countryCode , taxClassCode , rate | |
name | string | Filter the tax configurations by a tax class name. For this field the contains operator is used. Filtering by localized fields without language key is possible only when Accept-Language header with correct language is provided or when it is not set at all (in that case default language is taken) For example when Accept-Language' is set to 'en' and the name parameter is equal to name=Red then a tax configuration with ‘Reduced’ tax class should be returned.
When Accept-Language header is set to ‘’ filtering by localized fields is possible only when fields contains language key. For example when Accept-Language is set to '' and name parameter is equal to name.en=Red then a tax configuration with ‘Reduced’ tax class should be returned. | |
rate | string | Filter by a tax class rate. The rate value should be passed as a number. For this field the equals operator is used. | |
countryCode | string | Filter the tax configurations by a country code. For this field the contains operator is used. | |
taxClassCode | string | Filter the tax configurations by a tax class code. For this field the contains operator is used. | |
description | string | Filter the tax configurations by a tax class description. For this field the contains operator is used. Filtering by localized fields without language key is possible only when Accept-Language header with correct language is provided or when it is not set at all (in that case default language is taken) For example when Accept-Language' is set to 'en' and the description parameter is equal to name=Fru then a tax configuration which has tax class with ‘Fruit’ description would be returned.
When Accept-Language header is set to ‘’ then filtering by localized fields is possible only when fields contains language key. For example when Accept-Language is set to '' and description parameter is equal to description.en=Fru then a tax configuration which has tax class with ‘Fruit’ description would be returned. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept-Language | string | The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred. If empty then default system language is returned. It can be a priority list working as a fallback mechanism. | |
X-Total-Count | boolean | The flag indicates if the total count of items should be returned. | |
Accept | string |
RESPONSES
status: OK
[{"locationCode":"PL","location":{"countryCode":"PL"},"taxClasses":[{"code":"STANDARD","name":"Standard","order":0,"rate":23},{"code":"REDUCED","name":"Reduced","order":1,"rate":8},{"code":"ZERO","name":"Zero","order":2,"rate":0}],"metadata":{"version":1,"createdAt":"2022-03-31T19:22:44.734Z","modifiedAt":"2022-03-31T19:22:44.734Z"}},{"locationCode":"DE","location":{"countryCode":"DE"},"taxClasses":[{"code":"STANDARD","name":"Standard","order":0,"rate":23},{"code":"REDUCED","name":"Reduced","order":1,"rate":8},{"code":"ZERO","name":"Zero","order":2,"rate":0}],"metadata":{"version":1,"createdAt":"2022-04-11T11:42:47.027Z","modifiedAt":"2022-04-11T11:42:47.027Z"}},{"locationCode":"FR","location":{"countryCode":"FR"},"taxClasses":[{"code":"STANDARD","name":"Standard","order":0,"rate":23},{"code":"REDUCED","name":"Reduced","order":1,"rate":8},{"code":"ZERO","name":"Zero","order":2,"rate":0}],"metadata":{"version":1,"createdAt":"2022-04-11T12:03:18.283Z","modifiedAt":"2022-04-11T12:03:18.283Z"}},{"locationCode":"GB","location":{"countryCode":"GB"},"taxClasses":[{"code":"STANDARD","name":"Standard","order":0,"rate":23},{"code":"REDUCED","name":"Reduced","order":1,"rate":8},{"code":"ZERO","name":"Zero","order":2,"rate":0}],"metadata":{"version":1,"createdAt":"2022-04-11T12:07:51.173Z","modifiedAt":"2022-04-11T12:07:51.173Z"}}]