Start Free Trial

Sandbox

A sandbox is an ordinary workspace marked as a test. You reach it on the same host with a key that starts bgk_test_. Everything works as in production, and nothing leaves Best Guest.

What a sandbox is

  • Four fictional properties: a Czech apartment, a Slovak apartment, a Polish apartment and a Czech house with two listings.
  • No trial, no subscription, no invoice, no card. Nothing is billed, ever.
  • No police report: a reservation is never sent to a police portal. You play the outcome yourself (below).
  • No real message: no e-mail and no SMS reaches a real person.

GET /v1/ping answers "sandbox": true for a sandbox key.

Guests must be fictional

A guest e-mail in a sandbox must be at a reserved test domain (example.com, example.org, example.net, *.invalid, *.localhost); such an address has no mailbox, so mail to it goes nowhere. A phone number is refused unless it is on the sandbox's allow-list, and even then it is only accepted as test data: no SMS is ever sent from a sandbox. If you want to receive the real e-mails of a test run in your own inbox, ask us to put your address on the allow-list. Anything else is refused with SANDBOX_RECIPIENT_NOT_ALLOWED.

Playing the outside world

sandboxSimulate closes a reservation, completes its police submission or fails it, so you can test your status reads and webhooks end to end:

actionEffect
closeReservationWhat automatic closing does. Czech property: queued for the police, submissionStatus PENDING. Other countries: closed (SENT), nothing is reported.
submitReservationCzech property only: the submission succeeds, submissionStatus SENT.
failSubmissionCzech property only: the submission fails for good, submissionStatus FAILED.

Sandbox: close the reservation

Plays the outside world: in a Czech sandbox property the reservation is queued for the police (PENDING). Use submitReservation or failSubmission to finish or fail it. Sandbox only.

curl -X POST https://api.bestguest.app/v1/sandboxSimulate \
  -H "Authorization: $BESTGUEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "externalId": "doc-example-1",
  "action": "closeReservation"
}'

Answer: HTTP 200, and data.submissionStatus = "PENDING".

Starting over

Sandbox: start over

Removes every reservation of the sandbox. The test properties stay.

curl -X POST https://api.bestguest.app/v1/resetSandbox \
  -H "Authorization: $BESTGUEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Answer: HTTP 200, and data.reservationsRemoved = 0.

A sandbox holds at most 500 live reservations; at the limit a call answers SANDBOX_LIMIT_REACHED. Both calls refuse a normal workspace with 403 SANDBOX_ONLY.

What a sandbox does not do yet

It cannot complete a guest's check-in for you: a form becomes complete when you send every required detail and a signature through guests[] (see reservations and guests), or when someone opens the guest's link. Marking a local fee paid is not simulated either.

Getting a sandbox

Ask your Best Guest contact, or use the access request form on the developers page. The sandbox key is shown once; keep it like any key.