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

Request

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

Example

Request
Response
The following request fetches a collection of external tax calculators:
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/external_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": "external_tax_calculators",
6
"links": {
7
"self": "https://yourdomain.commercelayer.io/api/external_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
"tax_calculator_url": "https://external_calculator.yourbrand.com"
19
},
20
"relationships": {
21
"tax_categories": {
22
"links": {
23
"self": "https://yourdomain.commercelayer.io/api/external_tax_calculators/xYZkjABcde/relationships/tax_categories",
24
"related": "https://yourdomain.commercelayer.io/api/external_tax_calculators/xYZkjABcde/tax_categories"
25
}
26
},
27
"markets": {
28
"links": {
29
"self": "https://yourdomain.commercelayer.io/api/external_tax_calculators/xYZkjABcde/relationships/markets",
30
"related": "https://yourdomain.commercelayer.io/api/external_tax_calculators/xYZkjABcde/markets"
31
}
32
},
33
"attachments": {
34
"links": {
35
"self": "https://yourdomain.commercelayer.io/api/external_tax_calculators/xYZkjABcde/relationships/attachments",
36
"related": "https://yourdomain.commercelayer.io/api/external_tax_calculators/xYZkjABcde/attachments"
37
}
38
}
39
},
40
"meta": {
41
"mode": "test"
42
}
43
},
44
{
45
"other": "... 9 external_tax_calculators (first page)"
46
}
47
],
48
"meta": {
49
"record_count": 140,
50
"page_count": 14
51
},
52
"links": {
53
"first": "https://yourdomain.commercelayer.io/api/external_tax_calculators?page[number]=1&page[size]=10",
54
"next": "https://yourdomain.commercelayer.io/api/external_tax_calculators?page[number]=2&page[size]=10",
55
"last": "https://yourdomain.commercelayer.io/api/external_tax_calculators?page[number]=14&page[size]=10"
56
}
57
}
Copied!

Sortable attributes

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