POST
/
api
/
v2
/
platform
/
tax_rates
curl --request POST \
  --url http://{defaultHost}/api/v2/platform/tax_rates \
  --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": "16",
    "type": "tax_rate",
    "attributes": {
      "amount": "0.1",
      "included_in_price": false,
      "created_at": "2022-11-08T19:35:44.601Z",
      "updated_at": "2022-11-08T19:35:44.601Z",
      "name": "TaxRate - 772641",
      "show_rate_in_label": true,
      "deleted_at": null,
      "public_metadata": {},
      "private_metadata": {}
    },
    "relationships": {
      "zone": {
        "data": null
      },
      "tax_category": {
        "data": {
          "id": "167",
          "type": "tax_category"
        }
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

include
string

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
tax_rate
object
required

Response

201
application/vnd.api+json
Record created
data
object
required