POST
/
calculate
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",
  "transacted_at": "2023-12-25",
  "customer_details": {
    "shipping_address": {
      "address_line_1": "1776 Main St",
      "address_line_2": "Apt. #123",
      "address_line_3": "<string>",
      "postal_code": "90401",
      "city": "Santa Monica",
      "state": "CA",
      "country": "US"
    },
    "customer_id": "<string>"
  },
  "invoice_currency": "USD",
  "subtotal": 10.99,
  "discount": 0.99,
  "shipping_and_handling": 0,
  "total": 10.99,
  "line_items": {
    "items": [
      {
        "amount": 123,
        "quantity": 123,
        "tax_code": "TPP",
        "product_id": "<string>",
        "external_id": "<string>"
      }
    ]
  }
}'
{
  "data": {
    "corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
    "transacted_at": "2023-12-25",
    "customer_details": {
      "shipping_address": {
        "address_line_1": "1776 Main St",
        "address_line_2": "Apt. #123",
        "address_line_3": "<string>",
        "postal_code": "90401",
        "city": "Santa Monica",
        "state": "CA",
        "country": "US"
      },
      "customer_id": "<string>"
    },
    "invoice_currency": "USD",
    "subtotal": 10.99,
    "discount": 0.99,
    "shipping_and_handling": 0,
    "line_items": [
      {
        "raw_amount": 99.99,
        "taxable_amount": 89.99,
        "quantity": 123,
        "tax_code": "TPP",
        "product_id": "<string>",
        "external_id": "1",
        "total_tax_due": 1.03,
        "total_tax_rate": 6.3500004,
        "tax_breakdown": {
          "rates": [
            {
              "jurisdiction_name": "CT",
              "jurisdiction_type": "STATE",
              "rate": 6.3500004
            }
          ]
        }
      }
    ],
    "tax_currency": "USD",
    "total_tax_due": 11.06,
    "validation_results": [
      {}
    ]
  },
  "message": "Successfully calculated tax."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
corporation_id
string
required

The unique identifier for the corporation associated with this transaction.

Example:

"b6d009b0-d174-463f-b030-94643c28e209"

transacted_at
string
required

ISO 8601 formatted date string indicating date on which the transaction took place. If tax calculations need to be based on a different date, please contact our team for assistance.

customer_details
object
required

Customer details for this transaction.

invoice_currency
string
required

ISO 4217 alpha-3 currency code for the transaction.

Example:

"USD"

subtotal
number
required

Total amount before tax, shipping, handling, and discounts.

Example:

10.99

line_items
object
required
discount
number

Total discount amount applied to the subtotal.

Example:

0.99

shipping_and_handling
number

Total shipping and handling charges.

Example:

0

total
number

Total amount after tax, shipping, handling, and discounts.

Example:

10.99

Response

200
application/json
Successful tax calculation
data
object
message
string
Example:

"Successfully calculated tax."