# Sandbox company

A pretend company on the live system, full of fictional people, for building and testing an integration.

Build your integration against the sandbox company before you connect a real one. It runs on the live system with the same address, limits and code as every company, so only the key changes when you go live.

## Get a key

Email [support@kapiworks.com](mailto:support@kapiworks.com) with your company, the integration you are building and the engineers who need access. Kapi staff issue one key per engineer, valid for 90 days, with the scopes you need. Keys on the live system start with `kw_live_`, sandbox keys included. Kapi also tells you the sandbox's organisation ID: it is the only thing that tells the sandbox apart from a real company, so check `snapshot.organization_id` against it.

## What is in it

Larkspur Freight Sandbox is a fictional logistics company. Every person in it is invented, and every address ends in `@larkspur-freight-sandbox.example.com`.

* **People**: 36 employees in three teams (Warehouse, Drivers, Office), invitations that are pending, expired and cancelled, two people who left, and one person who was erased.
* **Training**: more than 200 live training records, so `/v1/training-records` needs two pages at `limit=200`. Between them they show every outcome: `completed_on_time`, `completed_late`, `completed_before_requirement`, `not_due_yet`, `overdue`, `waived` and `optional_not_done`. `missed` and `excused` appear in [`/v1/training-records/period`](https://docs.kapiworks.com/reference/list-period-training-records) with `from` set to `history_complete_from`.
* **Certificates**: valid, revoked and replaced certificates, and site passes that expire a day after they are issued.
* **Erasure**: one person reads "Erased person", with `access_state` `erased`, as described in [Training evidence](https://docs.kapiworks.com/guides/training-evidence).

History starts when the sandbox was created. Asking for an earlier moment answers [`before_history`](https://docs.kapiworks.com/errors/before_history).

## It keeps changing

The sandbox changes on its own, so your sync sees new facts:

* each day, a new invitation whenever none is waiting;
* every four weeks, a new course for every team, due 30 days later. These records start `not_due_yet` and become `overdue` if nobody completes them.

Use [`/v1/snapshot`](https://docs.kapiworks.com/reference/get-snapshot) to see when something changed.

## What it does not do

The sandbox sends no email at all: no invitations, reminders or key notices. Treat its data like any company's data anyway, and keep it apart from real companies' data.
