Retrieve a person's sandbox state
Reads one person's sandbox purchases, subscriptions and the access they grant, including those of persons merged into them.
Guide: Simulate renewals, expiry and refunds
AuthorizationBearer <token>
A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.
In: header
Path parameters
projectId*string
The project's id, proj_.... A secret key works only in the project it belongs to.
Query parameters
personId*string
The person whose sandbox purchases to read.
Examples
curl -X GET "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/sandbox/state?personId=person_h7d2k9m4x1c6v8b3n5q0w2e7" \ -H "Authorization: Bearer vh_sk_..."{ "personId": "person_h7d2k9m4x1c6v8b3n5q0w2e7", "grants": [ { "id": "person_perk_z1x5c9v3b7n2m6q0w4e8r2t6", "perkId": "perk_c4v7b1n9m2x5z8q3w6e0r4t7", "status": "active", "expiresAt": "2026-03-14T10:26:53.000Z" } ], "purchases": [], "subscriptions": [ { "id": "sub_d4f8g2h6j0k3l7z1x5c9v3b7", "productId": "prod_x8k2m5q9v3n7c1z4w6e0r2t5", "status": "active", "startsAt": "2026-03-14T09:26:53.000Z", "expiresAt": "2026-03-14T10:26:53.000Z", "canceledAt": null, "gracePeriodExpiresAt": null } ]}{ "error": { "type": "invalid_request", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "unauthenticated", "code": "invalid_api_key", "message": "This secret key is not valid." }}{ "error": { "type": "permission_denied", "code": "permission_denied", "message": "Insufficient permissions." }}{ "error": { "type": "not_found", "code": "person_not_found", "message": "This project has no person person_h7d2k9m4x1c6v8b3n5q0w2e7.", "param": "personId" }}{ "error": { "type": "internal", "code": "internal_error", "message": "Something went wrong on our side. Try again, and contact support with the Request-Id header if it keeps failing." }}Response body
application/json
application/json
application/json
application/json
application/json
application/json
Errors
| Status | type | code | When |
|---|---|---|---|
| 404 | not_found | person_not_found | For a person the project does not have. |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Sandbox
- Retrieve sandbox settings
GET - Update sandbox settings
PATCH - Simulate a store event
POST - Delete sandbox data
DELETE
Something wrong or missing on this page? Tell us by email or on Discord.