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

# Sandbox Overview

> Test your integration with mock data before going live

## What is the Sandbox?

The Sandbox provides mock API endpoints that return deterministic test data. Use these endpoints to develop and test your integration without consuming your API quota or waiting for real blockchain queries.

<Warning>
  **SANDBOX**: All data returned by sandbox endpoints is mock data for testing purposes only. Do not use sandbox responses for production decisions.
</Warning>

## Sandbox vs Production

| Feature         | Sandbox            | Production           |
| --------------- | ------------------ | -------------------- |
| Data            | Mock/deterministic | Real blockchain data |
| Response time   | Instant            | 1-10 seconds         |
| API quota       | Not counted        | Counted              |
| Base URL        | Same               | Same                 |
| Endpoint prefix | `/api/v2/sandbox/` | `/api/v2/`           |

## Available Sandbox Endpoints

All production endpoints have sandbox equivalents. Simply add `/sandbox/` after `/api/v2/`:

### Score Endpoints

| Sandbox Endpoint                        | Production Equivalent      | Description                  |
| --------------------------------------- | -------------------------- | ---------------------------- |
| `GET /sandbox/score/address/{address}`  | `/score/address/{address}` | Mock credit score            |
| `POST /sandbox/score/address/{address}` | `/score/address/{address}` | Mock enhanced score          |
| `GET /sandbox/score/`                   | `/score/`                  | Mock aggregated score        |
| `GET /sandbox/score/batch/`             | `/score/batch/`            | Mock batch individual scores |

### Report Endpoints

| Sandbox Endpoint                                                   | Production Equivalent                                  | Description               |
| ------------------------------------------------------------------ | ------------------------------------------------------ | ------------------------- |
| `GET /sandbox/report/address/{address}`                            | `/report/address/{address}`                            | Mock comprehensive report |
| `POST /sandbox/report/address/{address}`                           | `/report/address/{address}`                            | Mock enhanced report      |
| `GET /sandbox/report/`                                             | `/report/`                                             | Mock aggregated report    |
| `GET /sandbox/report/address/{address}/summary`                    | `/report/address/{address}/summary`                    | Mock summary report       |
| `GET /sandbox/report/address/{address}/chain/{chain_id}`           | `/report/address/{address}/chain/{chain_id}`           | Mock single-chain report  |
| `GET /sandbox/report/address/{address}/chain/{chain_id}/summary`   | `/report/address/{address}/chain/{chain_id}/summary`   | Mock chain summary        |
| `GET /sandbox/report/address/{address}/total/usd`                  | `/report/address/{address}/total/usd`                  | Mock portfolio value      |
| `GET /sandbox/report/address/{address}/chain/{chain_id}/total/usd` | `/report/address/{address}/chain/{chain_id}/total/usd` | Mock chain portfolio      |

## Deterministic Responses

Sandbox responses are deterministic based on the address provided:

* The same address always returns the same mock data
* Different addresses return different (but consistent) mock scores
* This allows you to test various scenarios reliably

## When to Use the Sandbox

<CardGroup cols={2}>
  <Card title="Development" icon="code">
    Build and test your integration without using real API quota
  </Card>

  <Card title="CI/CD Testing" icon="robot">
    Run automated tests against consistent mock data
  </Card>

  <Card title="Demo Applications" icon="presentation-screen">
    Build demos without depending on real blockchain data
  </Card>

  <Card title="UI Development" icon="paintbrush">
    Design and test your UI with various score scenarios
  </Card>
</CardGroup>

## Example Workflow

<Steps>
  <Step title="Develop with Sandbox">
    Use sandbox endpoints while building your integration

    ```bash theme={null}
    curl "https://api.credprotocol.com/api/v2/sandbox/score/address/0x123..." \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```
  </Step>

  <Step title="Test Edge Cases">
    Test different addresses to see various score ranges
  </Step>

  <Step title="Switch to Production">
    Simply remove `/sandbox/` from the URL to use production endpoints

    ```bash theme={null}
    curl "https://api.credprotocol.com/api/v2/score/address/0x123..." \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```
  </Step>
</Steps>

## Test Addresses

Mock scores are generated deterministically from the address. Here are example addresses for testing specific scenarios:

| Address                                      | Approximate Score | Classification |
| -------------------------------------------- | ----------------- | -------------- |
| `0x0000000000000000000000000000000000000001` | \~850             | Excellent      |
| `0x0000000000000000000000000000000000000002` | \~720             | Good           |
| `0x0000000000000000000000000000000000000003` | \~550             | Fair           |
| `0x0000000000000000000000000000000000000004` | \~400             | Low            |

<Info>
  The actual mock score is calculated using the last 8 characters of the address, so any address will produce a consistent, deterministic result.
</Info>
