> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gridbeds.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing: mock and sandbox

> Build against a mock generated from the contract today, and check your integration against the sandbox once it opens.

<Warning>
  **Preview: nothing is served yet.** The sandbox is not open: it opens with the first test key. Until then, a mock generated from the contract answers every operation.
</Warning>

## Build against a mock

A mock server generated from the contract, the OpenAPI document the **Reference** pages are generated from, answers every operation before it is served. With [Prism](https://github.com/stoplightio/prism):

```sh theme={null}
npx @stoplight/prism-cli mock --dynamic distribution-v1.yaml
```

Pin an exact 5.x release of Prism (`@stoplight/prism-cli@5.x.y`). With `--dynamic`, Prism generates its answers from the contract's schemas instead of repeating one example. The contract file is `distribution-v1.yaml`; write to [support@gridbeds.com](mailto:support@gridbeds.com) if you do not have it yet. Client libraries can be generated from the same document.

## The sandbox

The sandbox is `https://staging-api.gridbeds.com/api/v1/distribution`, and is reached with a `gbd_test_` key ([Authentication](/en/distribution-api/authentication)). It opens with the first test key, issued by the Gridbeds team.

Once it is open, `prism proxy` checks the sandbox's answers against the contract while your client talks to it:

```sh theme={null}
npx @stoplight/prism-cli proxy distribution-v1.yaml https://staging-api.gridbeds.com/api/v1/distribution
```

## What to try

* A first full read of each list, then a second read with `updated_since` that brings back only what changed, as described in [Synchronisation](/en/distribution-api/synchronisation).
* A tombstone, for each of `withdrawn` and `deleted`, on every resource, and an enum value your code does not know.
* A `410` for an `updated_since` older than 35 days, which must start a resync.
* A notification delivered twice, out of order, with a lower version than the one you hold, and with a bad signature or a stale timestamp ([Webhooks](/en/distribution-api/webhooks)).
* A `429` with `Retry-After` ([Errors and rate limits](/en/distribution-api/errors-and-limits)).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.