Decision API
Decision API
Section titled “Decision API”Determine if you must collect tax based on your sales data.
Endpoint
Section titled “Endpoint”POST /v1/decision/collectRequest Body
Section titled “Request Body”{ "destination": { "country": "US", "region": "CA" }, "seller_sales": { "amount_minor": 60000000, "transactions": 150, "currency": "USD", "period": "previous_calendar_year" }}Example
Section titled “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_minor": 60000000, "transactions": 150, "currency": "USD", "period": "previous_calendar_year" } }'Response
Section titled “Response”{ "must_collect": true, "explanation": "Sales of USD 600,000.00 meet or exceed threshold of USD 500,000.00.", "threshold_applied": { "type": "REMOTE_SELLER_NEXUS", "amount_minor": 50000000, "currency": "USD", "condition": "AMOUNT_ONLY" }, "confidence": "HIGH", "queried_at": "2024-01-15T10:30:00Z"}amount_minor is a non-negative safe integer in the minor unit of the adjacent ISO
currency (60000000 means USD 600,000.00). ShipVAT does not compare unlike
currencies; convert explicitly before calling this endpoint.
Decision Logic
Section titled “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