Zoey REST API reference ยท Interactive version: apidocs.zoey.com
GET https://container-url.zoeysite.com/api/rest/tax/rule/
Tax rules (Admin > Settings > Tax > Tax Rules). Takes the usual limit, page, order, dir and filter[0][attribute] / filter[0][eq].
A tax rule applies its rates to orders whose customer tax class and product tax class are in the rule.
GET https://container-url.zoeysite.com/api/rest/tax/rule/:tax_rule_id
One tax rule, with the same fields as Get All.
POST https://container-url.zoeysite.com/api/rest/tax/rule/
Creates a tax rule. Find the IDs with Tax / Class / Get All and Tax / Rate / Get All. Each rate + customer class + product class combination can be in one rule only.
Example request body:
{
"code": "Retail - NY",
"priority": 0,
"position": 0,
"calculate_subtotal": 0,
"skip_shipping_tax": 0,
"customer_tax_class_ids": [
3
],
"product_tax_class_ids": [
2
],
"tax_rate_ids": [
5
]
}
PUT https://container-url.zoeysite.com/api/rest/tax/rule/:tax_rule_id
Only the fields sent change. An ID list that is sent replaces the whole list (send every ID to keep); a list left out is kept.
Example request body:
{
"tax_rate_ids": [
5,
6
]
}
DELETE https://container-url.zoeysite.com/api/rest/tax/rule/:tax_rule_id
Deletes a tax rule. Its rates stay; delete them with Tax / Rate / Delete if they aren't needed.