Skip to main content
POST
/
taxes
/
associations
Create Tax Association
curl --request POST \
  --url https://us.api.flexprice.io/v1/taxes/associations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "tax_rate_code": "<string>",
  "auto_apply": true,
  "currency": "<string>",
  "end_date": "2023-11-07T05:31:56Z",
  "entity_id": "<string>",
  "external_customer_id": "<string>",
  "metadata": {},
  "priority": 123,
  "start_date": "2023-11-07T05:31:56Z"
}
'
{
  "auto_apply": true,
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "currency": "<string>",
  "end_date": "2023-11-07T05:31:56Z",
  "entity_id": "<string>",
  "environment_id": "<string>",
  "id": "<string>",
  "metadata": {},
  "priority": 123,
  "start_date": "2023-11-07T05:31:56Z",
  "tax_rate": {
    "code": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": "<string>",
    "description": "<string>",
    "environment_id": "<string>",
    "fixed_value": "<string>",
    "id": "<string>",
    "metadata": {},
    "name": "<string>",
    "percentage_value": "<string>",
    "tenant_id": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "updated_by": "<string>"
  },
  "tax_rate_id": "<string>",
  "tenant_id": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "updated_by": "<string>"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json

Tax Config Request

tax_rate_code
string
required
auto_apply
boolean
currency
string
end_date
string<date-time>

EndDate sets when this association expires. Must be after StartDate when both are provided.

entity_id
string
entity_type
enum<string>
Available options:
customer,
subscription,
invoice,
tenant
external_customer_id
string
metadata
object
priority
integer
start_date
string<date-time>

StartDate sets when this association becomes active. Defaults to now if omitted.

Response

OK

auto_apply
boolean

Whether this tax should be automatically applied

created_at
string<date-time>
created_by
string
currency
string

Currency

end_date
string<date-time>

EndDate is the optional date until which this association is active

entity_id
string

ID of the entity this tax rate applies to

entity_type
enum<string>
Available options:
customer,
subscription,
invoice,
tenant
environment_id
string

EnvironmentID is the ID of the environment this tax rate config belongs to

id
string

ID of the ent.

metadata
object

Metadata holds the value of the "metadata" field.

priority
integer

Priority for tax resolution (lower number = higher priority)

start_date
string<date-time>

StartDate is the date from which this association is active

status
enum<string>
Available options:
published,
deleted,
archived
tax_rate
object
tax_rate_id
string

Reference to the TaxRate entity

tenant_id
string
updated_at
string<date-time>
updated_by
string