curl --request POST \
--url https://base_url/api/v1/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"transaction_type": "SALE",
"addresses": {
"ship_to": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
},
"ship_from": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
}
},
"customer_details": {
"customer_id": "<string>"
},
"line_items": {
"items": [
{
"quantity": 1.01,
"amount": 1,
"line_number": 2,
"product_taxability_code": "TPP",
"discount": 1,
"product_id": "<string>"
}
]
},
"discount": 0.99
}
'{
"data": {
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"discount": 0.99,
"customer_details": {
"customer_id": "<string>"
},
"tax_currency": "USD",
"addresses": {
"ship_from": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
},
"ship_to": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
}
},
"line_items": [
{
"amount": 123,
"taxable_amount": 123,
"quantity": 123,
"tax_code": "<string>",
"product_id": "<string>",
"effective_tax_rate": 123,
"tax_breakdown": [
{
"jurisdiction": "California",
"jurisdiction_type": "STATE",
"rate": 6.25
}
],
"total_tax_due": 1.03
}
]
},
"message": "Successfully calculated tax."
}curl --request POST \
--url https://base_url/api/v1/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"transaction_type": "SALE",
"addresses": {
"ship_to": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
},
"ship_from": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
}
},
"customer_details": {
"customer_id": "<string>"
},
"line_items": {
"items": [
{
"quantity": 1.01,
"amount": 1,
"line_number": 2,
"product_taxability_code": "TPP",
"discount": 1,
"product_id": "<string>"
}
]
},
"discount": 0.99
}
'{
"data": {
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"discount": 0.99,
"customer_details": {
"customer_id": "<string>"
},
"tax_currency": "USD",
"addresses": {
"ship_from": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
},
"ship_to": {
"postal_code": "90401",
"state": "CA",
"country": "US",
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"city": "Santa Monica"
}
},
"line_items": [
{
"amount": 123,
"taxable_amount": 123,
"quantity": 123,
"tax_code": "<string>",
"product_id": "<string>",
"effective_tax_rate": 123,
"tax_breakdown": [
{
"jurisdiction": "California",
"jurisdiction_type": "STATE",
"rate": 6.25
}
],
"total_tax_due": 1.03
}
]
},
"message": "Successfully calculated tax."
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier for the corporation associated with this transaction.
"b6d009b0-d174-463f-b030-94643c28e209"
ISO 8601 formatted date string indicating date on which the transaction took place.
ISO 4217 alpha-3 currency code for the transaction.
"USD"
Type of the transaction (sale or refund).
SALE, REFUND The addresses for this transaction, including shipping origin and destination. If destination address is not set, we will attempt to extract it from the linked customer. If a customer is not linked, or if the linked customer does not have a shipping address, the tax calculation will fail.
Show child attributes
Show child attributes
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Show child attributes
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Customer details for this transaction.
Show child attributes
Unique identifier for the customer for this transaction. Used for exemptions and for shipping address. If fields on the customer conflict with fields on this calculation, the ones on the calculation will be prioritized.
Show child attributes
Array of line items representing individual products or services in the transaction. For each line item either pass the tax_code or the product_id. If the product_id is passed the tax_code will be fetched from the product itself. If no product_taxaiblity_code is available, TPP will be used as the fallback.
Show child attributes
Quantity of units purchased.
x >= 0.01Total price for the line item.
x >= 0Optional line number for this item.
x >= 1Discount amount for this line item.
x >= 0The unique identifier for the product.
Total discount amount applied to the subtotal.
x >= 00.99
Successful tax calculation
Show child attributes
The unique identifier for the corporation associated with this transaction.
"b6d009b0-d174-463f-b030-94643c28e209"
ISO 8601 formatted date string indicating date on which the transaction took place.
ISO 4217 alpha-3 currency code for the transaction.
"USD"
Total discount amount applied to the transaction.
0.99
ISO 4217 alpha-3 currency code representing the currency in which tax details are reported.
"USD"
The addresses for this transaction, including shipping origin and destination.
Show child attributes
Show child attributes
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Show child attributes
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Show child attributes
Total price for the line item.
The amount that is considered taxable for this line item.
Quantity of units purchased.
The tax code used for this line item.
The unique identifier for the product.
The effective tax rate applied to this line item.
Show child attributes
Name of the taxing jurisdiction.
"California"
Type of tax jurisdiction.
STATE, COUNTY, CITY, SPECIAL_DISTRICT Tax rate for this jurisdiction as a percentage.
6.25
Total amount of sales tax to charge for line item.
1.03
"Successfully calculated tax."