What it does

POST /api/v1/sandbox/seed

Creates a Sandbox-* employer with three representative employees (full-time, part-time, casual) tied to your current user. Idempotent: calling twice returns the existing sandbox employer, not a duplicate.

Test mode only. Calling with a live token returns 403 Forbidden.

Why

Setting up realistic test data by hand — ABN, branch, three employees with valid TFNs, employment bases, income types — is a 15-minute chore that gates every new integrator from their first API call. This endpoint collapses it to one curl.

Example

curl -X POST https://stp.beeswaxapp.com/api/v1/sandbox/seed \
  -H "Authorization: Bearer stp_test_..."

Response: 201 Created

{
  "employer": {
    "id": 201,
    "legal_name": "Sandbox-you",
    "abn": "53012345678",
    "environment": "evte",
    "software_subscription_id": "K7M3XR9PFA2"
  },
  "employees": [
    {
      "id": 301,
      "payroll_id": "SAND-001",
      "full_name": "Alice Anderson",
      "employment_basis": "F",
      "income_type": "SAW"
    },
    {
      "id": 302,
      "payroll_id": "SAND-002",
      "full_name": "Bilal Brown",
      "employment_basis": "P",
      "income_type": "SAW"
    },
    {
      "id": 303,
      "payroll_id": "SAND-003",
      "full_name": "Chioma Clarke",
      "employment_basis": "C",
      "income_type": "SAW"
    }
  ],
  "message": "Sandbox employer and employees provisioned. Create a pay event against this employer to try the lodgement flow end-to-end."
}

Next steps

  1. Create a pay event against the returned employer. See Pay events for the full payload shape.
  2. Add items — one per sandbox employee — with some test dollar amounts.
  3. SubmitPOST /api/v1/pay_events/:id/submit. The submission runs against the ATO EVTE sandbox, so you'll get a real XBRL validation cycle without impacting any production taxpayer.

What's inside

The sandbox employer is created with:

  • A deterministic ABN derived from your user ID (so repeated calls don't collide on the ABN+branch unique constraint across users)
  • environment: "evte" — only test tokens will see it
  • State NSW, postcode 2000, BMS ID SANDBOX-BMS
  • active: true

Employees are created with fake-but-valid TFNs (123-456-78X where X is a valid ATO checksum digit for the 123-456-78 root), birthdates in the 1985–1998 range, and employment start dates 1 year ago.

Cleanup

When you're done, you can either:

  • Leave the sandbox employer in place — it's scoped to your test environment and doesn't cost anything
  • DELETE /api/v1/employers/:id to deactivate and scrub PII (see Employers → Deleting)

You cannot re-run sandbox/seed to "reset" the employer — it just returns the same one. To start over, delete the existing sandbox employer and call seed again.