---
title: Quickstart
description: Go from an invite to your first Sandbox API call in five minutes.
section: Get started
order: 2
---

# Quickstart

You will accept your invite, create a Sandbox API key, check that it works, and list vendors. It takes about five minutes.

## 1. Accept the invite

Nurish'd emails the invite to the company owner. Open the link, sign in to your Nurish'd account (or create one), and use the same email address the invite was sent to. A forwarded invite does not work for another address. An invite expires after 7 days.

## 2. Accept the API terms

The first time the owner signs in, the console asks them to accept the [Nurish'd API terms](https://www.nurishd.io/api-policy). No key can be created until they do. If you are not the owner, ask the owner to sign in first.

## 3. Create a Sandbox key

1. Open **API keys** in the console and make sure the environment switch says **Sandbox**.
2. Select **Create key** and give it a name.
3. Copy the key now. The full key is shown once and cannot be shown again.

A key is a prefix and 64 hex characters, for example `nk-test-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef`. Put it in an environment variable. Do not put it in source code.

```bash
export NURISHD_API_KEY="nk-test-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
```

## 4. Check the key

`GET /developer/v1/key/get/document` returns the key you call it with. It needs no scope.

```bash
curl https://api.dev.nurishd.ca/developer/v1/key/get/document \
  -H "X-Partner-API-Key: $NURISHD_API_KEY"
```

```javascript
const res = await fetch(
	'https://api.dev.nurishd.ca/developer/v1/key/get/document',
	{
		headers: { 'X-Partner-API-Key': process.env.NURISHD_API_KEY },
	},
);
console.log(res.status, await res.json());
```

```python
import os
import requests

res = requests.get(
    "https://api.dev.nurishd.ca/developer/v1/key/get/document",
    headers={"X-Partner-API-Key": os.environ["NURISHD_API_KEY"]},
)
print(res.status_code, res.json())
```

The answer:

```json
{
	"key_id": "key-0001",
	"name": "Quickstart",
	"mode": "test",
	"scopes": ["catalog:read", "order:read", "order:write"],
	"company_id": "company-0001",
	"company_name": "Example Foods",
	"company_status": "Sandbox",
	"rate_limit_per_minute": 25
}
```

`mode` is `test`, so you are in the Sandbox. `scopes` lists what this key may do now. `company_status` is `Sandbox`, `Live` or `Suspended`. If `catalog:read` is missing, ask Nurish'd to grant it to your company.

If you get `401 invalid_api_key`, the key is missing, malformed, unknown, revoked or expired. All of these look the same. Check the header name and the copied value.

## 5. List vendors

`GET /meals/v1/vendor/query/documents` needs the `catalog:read` scope. Use `size` to limit the page.

```bash
curl "https://api.dev.nurishd.ca/meals/v1/vendor/query/documents?size=2" \
  -H "X-Partner-API-Key: $NURISHD_API_KEY"
```

```javascript
const res = await fetch(
	'https://api.dev.nurishd.ca/meals/v1/vendor/query/documents?size=2',
	{
		headers: { 'X-Partner-API-Key': process.env.NURISHD_API_KEY },
	},
);
console.log(res.status, await res.json());
```

```python
import os
import requests

res = requests.get(
    "https://api.dev.nurishd.ca/meals/v1/vendor/query/documents",
    params={"size": 2},
    headers={"X-Partner-API-Key": os.environ["NURISHD_API_KEY"]},
)
print(res.status_code, res.json())
```

The answer, trimmed to one vendor:

```json
{
	"data": [
		{
			"vendor_id": "vendor-0001",
			"vendor_name": "Green Table Kitchen",
			"vendor_logo_image": "https://images.example.com/vendor-0001/logo.png",
			"vendor_images": [],
			"vendor_short_description": "Fresh prepared meals.",
			"vendor_website_url": "https://greentable.example.com",
			"vendor_minimum_order_items": 4,
			"vendor_maximum_order_items": 40,
			"vendor_minimum_order_value": 6000,
			"vendor_maximum_order_value": null
		}
	],
	"total_pages": 1,
	"total": 1,
	"page": 1,
	"size": 2,
	"has_next": false,
	"has_previous": false
}
```

The list leaves out `vendor_long_description`, `vendor_timezone`, `vendor_address` and the support contact. Order values are in cents. Read one vendor with `GET /meals/v1/vendor/{vendor_id}/get/document` to get them.

Every authenticated answer carries `RateLimit-Limit` and `RateLimit-Remaining`, and an `X-Request-Id` header. Keep the request id when you ask for [support](/docs/resources/support).

## Next

- [Catalog](/docs/meals/catalog): find a zone for a place and read delivery dates.
- [Authentication](/docs/concepts/authentication): store and roll keys safely.
- [Errors](/docs/concepts/errors): every error code and what to do.
