Search…
API Reference
Resources
List all tax calculators
How to fetch a collection of tax calculators via API
To fetch a collection of tax calculators, send a GET request to the /api/tax_calculators endpoint.

Request

GET https://yourdomain.commercelayer.io/api/tax_calculators

Example

Request
Response
The following request fetches a collection of tax calculators:
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/tax_calculators/' \
3
-H 'Accept: application/vnd.api+json' \
4
-H 'Authorization: Bearer your-access-token'
Copied!
On success, the API responds with a 200 OK status code, returning a paginated collection of resource objects:
1
{
2
"data": [
3
{
4
"id": "xYZkjABcde",
5
"type": "tax_calculators",
6
"links": {
7
"self": "https://yourdomain.commercelayer.io/api/tax_calculators/xYZkjABcde"
8
},
9
"attributes": {
10
"name": "Personal tax calculator",
11
"created_at": "2018-01-01T12:00:00.000Z",
12
"updated_at": "2018-01-01T12:00:00.000Z",
13
"reference": "ANY-EXTERNAL-REFEFERNCE",
14
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
15
"metadata": {
16
"foo": "bar"
17
}
18
},
19
"relationships": {
20
"tax_categories": {
21
"links": {
22
"self": "https://yourdomain.commercelayer.io/api/tax_calculators/xYZkjABcde/relationships/tax_categories",
23
"related": "https://yourdomain.commercelayer.io/api/tax_calculators/xYZkjABcde/tax_categories"
24
}
25
},
26
"markets": {
27
"links": {
28
"self": "https://yourdomain.commercelayer.io/api/tax_calculators/xYZkjABcde/relationships/markets",
29
"related": "https://yourdomain.commercelayer.io/api/tax_calculators/xYZkjABcde/markets"
30
}
31
},
32
"attachments": {
33
"links": {
34
"self": "https://yourdomain.commercelayer.io/api/tax_calculators/xYZkjABcde/relationships/attachments",
35
"related": "https://yourdomain.commercelayer.io/api/tax_calculators/xYZkjABcde/attachments"
36
}
37
}
38
},
39
"meta": {
40
"mode": "test"
41
}
42
},
43
{
44
"other": "... 9 tax_calculators (first page)"
45
}
46
],
47
"meta": {
48
"record_count": 140,
49
"page_count": 14
50
},
51
"links": {
52
"first": "https://yourdomain.commercelayer.io/api/tax_calculators?page[number]=1&page[size]=10",
53
"next": "https://yourdomain.commercelayer.io/api/tax_calculators?page[number]=2&page[size]=10",
54
"last": "https://yourdomain.commercelayer.io/api/tax_calculators?page[number]=14&page[size]=10"
55
}
56
}
Copied!

Sortable attributes

The list of tax calculators can be sorted by the following attributes:
  • name
  • id
  • created_at
  • updated_at
  • reference
  • reference_origin
Last modified 2mo ago