tax_rules
Create a tax rule
Changed onCreate a tax rule
post/tax_rules
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/tax_rules
- AuthHTTP bearer
Request body
Example request
{
"data": {
"attributes": {
"name": "Fixed 22%",
"tax_rate": 0.22,
"country_code_regex": "AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT",
"not_country_code_regex": "AT|BE|BG|CZ|DK|EE|DE",
"state_code_regex": "A[KLRZ]|C[AOT]|D[CE]|FL",
"not_state_code_regex": "A[KLRZ]|C[AOT]",
"zip_code_regex": "(?i)(JE1|JE2|JE3|JE4|JE5)",
"not_zip_code_regex": "(?i)(JE1|JE2|JE3)",
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
},
"relationships": {
"manual_tax_calculator": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
}Response
The created tax rule object
Changes
- breaking
added the new required request property
/// - breaking
request property
/was restricted to a list of enum values - warning
removed the request property
/// - warning
removed the request property
/// - info
the
request property default valuetax_ruleswas removed - info
added the new
tax_rulesenum value to the request property/ - info
added the media type
application/vnd.api+jsonfor the response with the status
- breaking