Skip to content
TURANYOLDevelopers

Sandbox

A second API process with its own database, its own seed and its own keys. Nothing you do here touches live orders.

Sandbox status

Checking…Checking…http://localhost:3050

Sandbox keys

Create a key with environment Sandbox on the API keys page. A sandbox key sent to the live API is refused with ERR_API_KEY_ENVIRONMENT, and the other way round.

base urls
live     https://api.turanyol.com
sandbox  http://localhost:3050

Sandbox keys

What is seeded

The sandbox database is rebuilt from the same deterministic seed as development, so the codes below are stable between resets.

  • Vendors and products across the Sadarak zones A–F, with az/ru/en names and photos.
  • Customers with saved addresses in 20 Yanvar, Gənclik, Yasamal, Nərimanov and Nizami.
  • Orders in every status, AT_HUB and PACKED included, with hub orders already handed to a partner.
  • Delivery batches, drivers and COD reconciliation data.
  • Two partner accounts with one live and one sandbox key each, plus webhooks with deliveries in every status.

Test accounts

OTP is mocked in the sandbox: the code comes back in the response as devCode and is shown on the sign-in screen. Never a real SMS.

Test accounts
RolePhoneNotes
Partner+994500000040Kargo Express — orders:read, orders:pii, logistics:write
Partner+994500000041PayAZ — payments:read
Customer+994500000100Aysel Məmmədova — ES-1049, ES-1025, ES-1001
Seller+994500000010Vendor A-101
Driver+994500000020B-2083 completed, B-2084 assigned
Runner+994500000030Hub pickup queue
Support agent+994500000002Günel Rəhimova
Administrator+994500000001Kamil Hüseynov

Resetting the sandbox

The sandbox database is disposable. Ask us to reset it, or if you run the stack yourself:

  1. Stop the sandbox API so nothing writes while the database is rebuilt.
  2. Re-apply the migrations and re-run the seed against the sandbox database.
  3. Start the sandbox API again — the seeded keys and codes are identical to before.
shell
# 1. stop the sandbox API
pnpm --filter @turanyol/api exec -- true   # (stop the 'dev:api:sandbox' process)

# 2. re-apply migrations and re-seed the sandbox database
DATABASE_URL=postgresql://esadarak:esadarak@localhost:5433/esadarak_sandbox?schema=public \
  pnpm --filter @turanyol/api prisma:deploy
DATABASE_URL=postgresql://esadarak:esadarak@localhost:5433/esadarak_sandbox?schema=public \
  pnpm db:seed

# 3. start it again
pnpm dev:api:sandbox
Resetting invalidates nothing on the live API: keys, webhooks and orders there are untouched.

How the sandbox differs from live

  • OTP is mocked — no SMS is sent and the code is returned to the caller.
  • Card payments run through the mock provider, which serves its own checkout page and signs its own webhook.
  • Dispatch runs on seeded drivers, so batches and offers appear without anyone driving a van.
  • Rate limits and scopes behave exactly as they do live — the sandbox is not more permissive.

Sandbox guide