cURL
curl --request GET \
--url https://api.tirdad.ai/v1/taxes/associations/{id} \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tax_associations.get_tax_association(id="<id>")
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.taxAssociations.getTaxAssociation("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.TaxAssociations.GetTaxAssociation(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.TaxAssociationResponse != nil {
// handle response
}
}{
"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>",
"entity_type": "customer",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"priority": 123,
"start_date": "2023-11-07T05:31:56Z",
"status": "published",
"tax_behavior": "inclusive",
"tax_rate": {
"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>"
},
"tax_rate_id": "<string>",
"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 Associations
Get Tax Association
Use when you need to load a single tax association (e.g. for display or editing).
GET
/
taxes
/
associations
/
{id}
cURL
curl --request GET \
--url https://api.tirdad.ai/v1/taxes/associations/{id} \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tax_associations.get_tax_association(id="<id>")
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.taxAssociations.getTaxAssociation("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.TaxAssociations.GetTaxAssociation(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.TaxAssociationResponse != nil {
// handle response
}
}{
"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>",
"entity_type": "customer",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"priority": 123,
"start_date": "2023-11-07T05:31:56Z",
"status": "published",
"tax_behavior": "inclusive",
"tax_rate": {
"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>"
},
"tax_rate_id": "<string>",
"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>"
}Response
OK