Decision API
Decision API
Determine if you must collect tax based on your sales data.
Endpoint
POST /v1/decision/collectRequest Body
{ "destination": { "country": "US", "region": "CA" }, "seller_sales": { "amount": 600000, "transactions": 150, "currency": "USD", "period": "previous_calendar_year" }}Example
curl -X POST "https://api.shipvat.com/v1/decision/collect" \ -H "Authorization: Bearer sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "destination": {"country": "US", "region": "CA"}, "seller_sales": {"amount": 600000, "currency": "USD"} }'Response
{ "must_collect": true, "explanation": "Sales of USD 600,000 exceed threshold of USD 500,000.", "threshold_applied": { "type": "REMOTE_SELLER_NEXUS", "amount": 500000, "currency": "USD", "condition": "AMOUNT_ONLY" }, "confidence": "HIGH", "queried_at": "2024-01-15T10:30:00Z"}Decision Logic
The API evaluates:
- AMOUNT_ONLY: Sales amount vs threshold
- TX_ONLY: Transaction count vs threshold
- OR: Either condition triggers nexus
- AND: Both conditions required for nexus