Quote tax for a draft invoice
POST
/v1/invoices/{invoiceId}/tax/quoteAuthorization
AuthorizationBearer token · headerrequiredPublic API key bearer token.
Path parameters
invoiceIdstringrequiredQuery parameters
environmentstringrequiredmerchantAccountIdstringrequiredHeader parameters
Idempotency-KeystringRequired for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
min length 1
Request body
requiredapplication/jsoncustomerTaxAddressTaxAddressrequiredShow propertiesHide properties
line1stringrequiredline2stringcitystringrequiredregionstringrequiredpostalCodestringrequiredcountrystringrequiredtaxBehaviorPolicyTaxBehaviorPolicyRequestShow propertiesHide properties
behaviorTaxBehaviorrequiredAllowed:
exclusiveinclusivelocation_basedlocationRefstringrequestedByRefstringResponses
200Success
dataobjectrequiredShow propertiesHide properties
taxInvoiceTaxrequiredShow propertiesHide properties
invoiceNumberstringrequiredstatusstringrequiredAllowed:
not_requiredquote_pendingquotedfinalization_pendingfinalizedfailedvoidedreversedcurrencystringrequiredsubtotalintegerrequiredtaxTotalintegerrequiredtotalintegerrequiredevidenceVersionstringrequiredtaxBehaviorPolicyTaxBehaviorPolicyrequiredShow propertiesHide properties
behaviorTaxBehaviorrequiredAllowed:
exclusiveinclusivelocation_basedsourcestringrequiredAllowed:
requestrequest_defaultlocation_profileamountIncludesTaxbooleanrequiredlocationRefstringquotedAtstring<date-time>finalizedAtstring<date-time>lineEvidenceTaxLineEvidence[]requiredShow propertiesHide properties
Array of
TaxLineEvidencesourceLineIdstringrequiredclassificationKeystringrequiredclassificationLabelstringrequiredclassificationVersionintegerrequiredclassificationMappingVersionintegerrequiredtaxableAmountintegerrequiredtaxAmountintegerrequiredtaxBehaviorTaxBehaviorrequiredAllowed:
exclusiveinclusivelocation_basedamountIncludesTaxbooleanrequiredjurisdictionEvidenceTaxJurisdictionEvidence[]requiredShow propertiesHide properties
Array of
TaxJurisdictionEvidencejurisdictionTypestringrequiredjurisdictionNamestringrequiredtaxableAmountintegerrequiredtaxAmountintegerrequiredratenumberrequiredfailureTaxFailureShow propertiesHide properties
codestringrequiredAllowed:
tax_company_mapping_missingtax_classification_missingtax_classification_inactivetax_classification_unmappedtax_location_profile_missingaddress_missingunsupported_jurisdictiontax_auth_failedtax_timeouttax_uncertaintax_service_errormessagestringrequirednextActionstringrequiredAllowed:
configure_tax_companyconfigure_tax_classificationconfigure_tax_location_profilecollect_customer_addressretry_quoteretry_finalizeretry_reversereconcile_tax_statenonereplayedbooleanrequiredrequestIdstringrequired400Bad request, including malformed JSON
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject401Missing or invalid API key
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject409Conflict, including idempotency body drift
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject422Validation failed
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject429API key rate limit exceeded
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobjectdefaultError
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobjectRequest
curl -X POST "https://api.vortex.nyc/v1/invoices/string/tax/quote?environment=string&merchantAccountId=string" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customerTaxAddress": {
"line1": "string",
"line2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string"
},
"taxBehaviorPolicy": {
"behavior": "exclusive",
"locationRef": "string"
},
"requestedByRef": "string"
}'const response = await fetch("https://api.vortex.nyc/v1/invoices/string/tax/quote?environment=string&merchantAccountId=string", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"customerTaxAddress": {
"line1": "string",
"line2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string"
},
"taxBehaviorPolicy": {
"behavior": "exclusive",
"locationRef": "string"
},
"requestedByRef": "string"
})
});import requests
response = requests.post(
"https://api.vortex.nyc/v1/invoices/string/tax/quote?environment=string&merchantAccountId=string",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"customerTaxAddress": {
"line1": "string",
"line2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string"
},
"taxBehaviorPolicy": {
"behavior": "exclusive",
"locationRef": "string"
},
"requestedByRef": "string"
},
)Response
{
"data": {
"tax": {
"invoiceNumber": "string",
"status": "not_required",
"currency": "string",
"subtotal": 0,
"taxTotal": 0,
"total": 0,
"evidenceVersion": "string",
"taxBehaviorPolicy": {
"behavior": "exclusive",
"source": "request",
"amountIncludesTax": true,
"locationRef": "string"
},
"quotedAt": "2024-01-01T00:00:00Z",
"finalizedAt": "2024-01-01T00:00:00Z",
"lineEvidence": [
{
"sourceLineId": "string",
"classificationKey": "string",
"classificationLabel": "string",
"classificationVersion": 0,
"classificationMappingVersion": 0,
"taxableAmount": 0,
"taxAmount": 0,
"taxBehavior": "exclusive",
"amountIncludesTax": true
}
],
"jurisdictionEvidence": [
{
"jurisdictionType": "string",
"jurisdictionName": "string",
"taxableAmount": 0,
"taxAmount": 0,
"rate": 0
}
],
"failure": {
"code": "tax_company_mapping_missing",
"message": "string",
"nextAction": "configure_tax_company"
}
},
"replayed": true
},
"requestId": "string"
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}