Tax Rates
Update a Tax Rate
Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Stripe
- Products
- Vendors
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Tax Rates
Update a Tax Rate
Updates a Tax Rate
PATCH
/
api
/
v2
/
platform
/
tax_rates
/
{id}
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/tax_rates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"tax_rate": {
"amount": 0.05,
"zone_id": "2",
"tax_category_id": "1",
"included_in_price": true,
"name": "California",
"show_rate_in_label": false,
"calculator_attributes": {
"type": "Spree::Calculator::FlatRate",
"preferences": {
"amount": 0,
"currency": "USD"
}
}
}
}'
{
"data": {
"id": "19",
"type": "tax_rate",
"attributes": {
"amount": "25.9",
"included_in_price": true,
"created_at": "2022-11-08T19:35:45.406Z",
"updated_at": "2022-11-08T19:35:45.637Z",
"name": "TaxRate - 33807",
"show_rate_in_label": true,
"deleted_at": null,
"public_metadata": {},
"private_metadata": {}
},
"relationships": {
"zone": {
"data": {
"id": "106",
"type": "zone"
}
},
"tax_category": {
"data": {
"id": "170",
"type": "tax_category"
}
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Query Parameters
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Body
application/json
Example:
0.05
Example:
"1"
Example:
"2"
Example:
true
Example:
"California"
Example:
false
Was this page helpful?
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/tax_rates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"tax_rate": {
"amount": 0.05,
"zone_id": "2",
"tax_category_id": "1",
"included_in_price": true,
"name": "California",
"show_rate_in_label": false,
"calculator_attributes": {
"type": "Spree::Calculator::FlatRate",
"preferences": {
"amount": 0,
"currency": "USD"
}
}
}
}'
{
"data": {
"id": "19",
"type": "tax_rate",
"attributes": {
"amount": "25.9",
"included_in_price": true,
"created_at": "2022-11-08T19:35:45.406Z",
"updated_at": "2022-11-08T19:35:45.637Z",
"name": "TaxRate - 33807",
"show_rate_in_label": true,
"deleted_at": null,
"public_metadata": {},
"private_metadata": {}
},
"relationships": {
"zone": {
"data": {
"id": "106",
"type": "zone"
}
},
"tax_category": {
"data": {
"id": "170",
"type": "tax_category"
}
}
}
}
}