# Create tax.

Create tax.

Endpoint: POST /taxes
Version: 1.0.0
Security: Token

## Request fields (application/json):

  - `order_id` (string, required)
    ID of the order apply this tax to. UUID Version 4.
    Example: "00000000-0000-4000-8000-000000000000"

  - `tax_rate_data` (object)
    Data to construct an ad hoc tax rate inline to apply to this order.

  - `tax_rate_data.name` (string)
    The name of the tax.
    Example: "New York State Tax"

  - `tax_rate_data.description` (string)
    The description of the tax rate.
    Example: "Tax rate applied for any property that falls within the bounds New York State."

  - `tax_rate_data.applied_rate` (number)
    A decimal value representing the rate that should be applied to a taxed entity. For example, 0.075 would represent an applied tax percentage of 7.5%.
    Example: 0.075

## Response 201 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "success"

  - `data` (object)
    A tax represents the application of a tax rate to a taxed entity, such as an order or order item.

  - `data.object` (string, required)
    String representing the object's type.
    Example: "TAX"

  - `data.id` (string, required)
    ID of the entity. UUID Version 4.
    Example: "00000000-0000-4000-8000-000000000000"

  - `data.total_tax_amount` (integer)
    A positive integer in the smallest currency unit (that is, 100 cents for $1.00) representing the total calculated tax for this tax rate for all applicable order items.
    Example: 2099

  - `data.applied_rate` (number)
    A decimal value representing the rate of the parent tax rate at the time of this tax application. For example, 0.075 would represent an applied tax percentage of 7.5%.
    Example: 0.075

  - `data.tax_rate` (object)
    A tax rate represents the percentage of tax that should be applied to a taxed entity.

  - `data.tax_rate.object` (string, required)
    String representing the object's type.
    Example: "TAX_RATE"

  - `data.tax_rate.id` (string, required)
    ID of the entity. UUID Version 4.
    Example: "00000000-0000-4000-8000-000000000000"

  - `data.tax_rate.name` (string)
    The name of the tax.
    Example: "New York State Tax"

  - `data.tax_rate.description` (string,null)
    The description of the tax rate.
    Example: "Tax rate applied for any property that falls within the bounds New York State."

  - `data.tax_rate.applied_rate` (number)
    A decimal value representing the rate that should be applied to a taxed entity. For example, 0.075 would represent an applied tax percentage of 7.5%.
    Example: 0.075

  - `data.tax_rate.rate` (string,null)
    A decimal value representing the rate that should be applied to a taxed entity. For example, 0.075 would represent an applied tax percentage of 7.5%.
    Example: "0.075000"

  - `data.tax_rate.is_active` (boolean)
    Whether the tax rate is active.
    Example: true

  - `data.tax_rate.is_inclusive` (boolean)
    Whether the tax rate is inclusive.
    Example: true

  - `timestamp` (string,null)
    The request timestamp (ISO 8601).
    Example: "2021-06-30T20:30:00Z"

## Response 403 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "error"

  - `message` (string, required)
    The error message.
    Example: "{ApiError message.}"

  - `code` (integer,null)
    A numeric code corresponding to the error.
    Example: 403

## Response 404 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "error"

  - `message` (string, required)
    The error message.
    Example: "{ApiError message.}"

  - `code` (integer,null)
    A numeric code corresponding to the error.
    Example: 404

## Response 422 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "fail"

## Response 500 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "error"

  - `message` (string, required)
    The error message.
    Example: "{ApiError message.}"

  - `code` (integer,null)
    A numeric code corresponding to the error.
    Example: 500


