Create an external tax calculator
How to create an external tax calculator via API
To create a new external tax calculator, send a POST
request to the /api/external_tax_calculators
endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/external_tax_calculators
Arguments
Body Parameter
Type
Required
type
string
Required
attributes.name
string
Required
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
attributes.tax_calculator_url
string
Required
Example
The following request creates a new external tax calculator:
curl -g -X POST \
'https://yourdomain.commercelayer.io/api/external_tax_calculators' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "external_tax_calculators",
"attributes": {
"name": "Personal tax calculator",
"tax_calculator_url": "https://external_calculator.yourbrand.com"
}
}
}'
Last updated