403 env_not_sandbox.
For a walkthrough with worked examples, see Custom Sandbox Data and its per-data-source guides for payroll, document upload, financial accounts, education, and insurance.
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. A value that collides with Truv’s own test data is refused with reserved_credential.
Behavior
Content
Which scenario wins
If multiple scenarios match, Truv selects the most specific. Ondocs, a scenario whose filenames are exactly the uploaded files beats one naming only some of them, and among partial matches the one naming more files wins. Then the scenario with more matching fields set wins; if there is still a tie, a scenario that sets is_refresh wins over one that doesn’t. After that, Truv selects the oldest scenario.
Disabled scenarios never take part, and a scenario restricted to products is skipped for tasks of any other product. Truv uses its built-in test data when no custom scenario matches. 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. A scenario references one bydocument_id wherever it serves a file: a payroll or document-upload paystub, W-2, 1099, 1040, volunteer letter, or PCS order, a bank statement, or an insurance policy document. A document-upload scenario also selects on the entry’s filename.
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}/