403 env_not_sandbox.
For a walkthrough with worked examples of payroll scenarios, see Custom Sandbox Data.
Attributes
Identity and routing
How a scenario is selected
These matching fields decide which input the scenario answers. A field left unset narrows nothing, so it matches any value. The API refuses a scenario that sets none of them, andis_refresh alone doesn’t count — such a scenario would answer every input of its data source. No two scenarios of the same data source can have the same matching fields; enabled and products don’t make them distinct.
Behavior
Content
Which scenario wins
If multiple scenarios match, Truv selects the scenario with more matching fields, excludingis_refresh. is_refresh is supported on every data source but doesn’t count toward matching fields; if there is still a tie, a scenario that sets it wins over one that doesn’t. After that, Truv selects the oldest scenario.
Disabled scenarios never take part, and a scenario pinned to products is skipped for tasks of any other product. When nothing matches, the task falls through to Truv’s built-in test data. Resolve a sandbox scenario reports the winner for an input without running a verification.
The Sandbox Document object
A sandbox document is a file in your sandbox document library. Payroll paystubs and W-2s reference one bydocument_id to serve a real PDF; every W-2 requires one.
When a task uses a sandbox document, Truv creates a separate copy for that task. The original stays in your sandbox document library and can be reused. Remove all scenario references before deleting the library entry.
Endpoints
Scenarios
- List sandbox scenarios - GET /v1/sandbox/scenarios/
- Create a sandbox scenario - POST /v1/sandbox/scenarios/
- Resolve a sandbox scenario - POST /v1/sandbox/scenarios/resolve/
- Retrieve a sandbox scenario - GET /v1/sandbox/scenarios/{scenario_id}/
- Update a sandbox scenario - PATCH /v1/sandbox/scenarios/{scenario_id}/
- Delete a sandbox scenario - DELETE /v1/sandbox/scenarios/{scenario_id}/
Documents
- List sandbox documents - GET /v1/sandbox/documents/
- Upload a sandbox document - POST /v1/sandbox/documents/
- Retrieve a sandbox document - GET /v1/sandbox/documents/{document_id}/
- Update a sandbox document - PATCH /v1/sandbox/documents/{document_id}/
- Delete a sandbox document - DELETE /v1/sandbox/documents/{document_id}/