Create a tax rule
How to create a tax rule via API
To create a new tax rule, send a POST
request to the /api/tax_rules
endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/tax_rules
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.name |
| Required |
attributes.tax_rate |
| Optional, default is 0.0 |
attributes.country_code_regex |
| Optional |
attributes.not_country_code_regex |
| Optional |
attributes.state_code_regex |
| Optional |
attributes.not_state_code_regex |
| Optional |
attributes.zip_code_regex |
| Optional |
attributes.not_zip_code_regex |
| Optional |
attributes.freight_taxable |
| Optional, default is 'false' |
attributes.payment_method_taxable |
| Optional, default is 'false' |
attributes.gift_card_taxable |
| Optional, default is 'false' |
attributes.adjustment_taxable |
| Optional, default is 'false' |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.manual_tax_calculator |
| Required |
Example
The following request creates a new tax rule:
Last updated