cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/taxes/rates \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"code": "<string>",
"name": "<string>",
"description": "<string>",
"metadata": {},
"percentage_value": "<string>",
"tax_rate_type": "percentage"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tax_rates.create_tax_rate(code="<value>", name="<value>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.taxRates.createTaxRate({
code: "<value>",
name: "<value>",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.TaxRates.CreateTaxRate(ctx, types.CreateTaxRateRequest{
Code: "<value>",
Name: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.TaxRateResponse != nil {
// handle response
}
}{
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"percentage_value": "<string>",
"scope": "INTERNAL",
"status": "published",
"tax_rate_status": "ACTIVE",
"tax_rate_type": "percentage",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Tax Rates
Create a tax rate
Use when defining a new tax rate (e.g. VAT or sales tax) for use in invoices. Attach to customers or products via tax associations.
POST
/
taxes
/
rates
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/taxes/rates \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"code": "<string>",
"name": "<string>",
"description": "<string>",
"metadata": {},
"percentage_value": "<string>",
"tax_rate_type": "percentage"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tax_rates.create_tax_rate(code="<value>", name="<value>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.taxRates.createTaxRate({
code: "<value>",
name: "<value>",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.TaxRates.CreateTaxRate(ctx, types.CreateTaxRateRequest{
Code: "<value>",
Name: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.TaxRateResponse != nil {
// handle response
}
}{
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"percentage_value": "<string>",
"scope": "INTERNAL",
"status": "published",
"tax_rate_status": "ACTIVE",
"tax_rate_type": "percentage",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
application/json
Tax rate to create
code is the unique alphanumeric case sensitive identifier for the tax rate (required)
name is the human-readable name for the tax rate (required)
description is an optional text description providing details about the tax rate
metadata contains additional key-value pairs for storing extra information
Show child attributes
Show child attributes
percentage_value is the percentage value (0-100)
Available options:
INTERNAL, EXTERNAL, ONETIME Available options:
percentage Response
Created
Show child attributes
Show child attributes
Available options:
INTERNAL, EXTERNAL, ONETIME Available options:
published, deleted, archived Available options:
ACTIVE, INACTIVE Available options:
percentage 
