Prompt
How do I validate exemption certificates through an API?
Latest observation
Nov 3, 2026
OpenAI APIWeb search: off
To validate exemption certificates through an API, the exact steps depend on the tax/compliance provider you’re using, but the general flow is usually:
1) Collect the certificate data
You typically need:
- certificate number or ID
- customer name
- issuing state/jurisdiction
- exemption reason/code
- expiration date
- tax ID or resale number
- supported jurisdictions and document image/file, if required
2) Authenticate to the API
Most providers require one of:
- API key
- OAuth2 access token
- Basic auth for sandbox/testing only
3) Send the certificate to a validation endpoint
Common patterns are:
- POST
/certificates/validate - POST
/exemptions/validate - POST
/certificate/{id}/verify
Example request shape:
POST /certificates/validate HTTP/1.1
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"certificateNumber": "EX-123456",
"customerName": "Acme Corp",
"jurisdiction": "CA",
"exemptionType": "resale",
"expirationDate": "2026-12-31",
"taxId": "98-7654321"
}
4) Handle the response
A validation response usually returns:
valid: true/falsestatus: valid, expired, revoked, pending, malformedreason: why it failed if applicablejurisdiction: confirmation of coverageexpiryDatematchedFieldsorwarnings
Example:
{
"valid": true,
"status": "valid",
"certificateId": "cert_abc123",
"expiresOn": "2026-12-31",
"warnings": []
}
5) Store the validation result
Best practice is to save:
- certificate payload
- validation timestamp
- API response
- any reference IDs
- audit trail for compliance
6) Revalidate periodically
Certificates can expire or be revoked, so many systems:
- validate on upload
- revalidate before applying tax exemption
- schedule periodic checks for active certificates
Example in cURL
curl -X POST "https://api.example.com/certificates/validate" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"certificateNumber": "EX-123456",
"customerName": "Acme Corp",
"jurisdiction": "CA",
"exemptionType": "resale",
"expirationDate": "2026-12-31"
}'
Example in Python
import requests
url = "https://api.example.com/certificates/validate"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
payload = {
"certificateNumber": "EX-123456",
"customerName": "Acme Corp",
"jurisdiction": "CA",
"exemptionType": "resale",
"expirationDate": "2026-12-31"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
If you tell me which provider you mean—like Avalara, Sovos, TaxJar, Vertex, or a custom API—I can give you the exact endpoint, request schema, and code sample.