# Introduction (/docs)



Karma's API lets you read and write the data behind a restaurant's day, and
subscribe to events as they happen.

## Base URLs [#base-urls]

| Environment | Base URL                                    |
| ----------- | ------------------------------------------- |
| Production  | `https://common-api.karma.life`             |
| Staging     | `https://common-api.staging.karma.life`     |
| Development | `https://common-api.development.karma.life` |

## Authenticating [#authenticating]

Every request carries an API key in the `X-API-Key` header. Keys are prefixed
by environment — `karma_live_*` against production, `karma_dev_*` everywhere
else.

```bash
curl https://common-api.karma.life/api/v1/orders \
  -H "X-API-Key: karma_live_..."
```

## APIs [#apis]

<Cards>
  <Card title="Ordering API" href="/docs/ordering/orders" description="Orders, tabs and coursing — from first item to settled bill." />

  <Card title="Booking API" href="/docs/booking/bookings" description="Reservations, waitlist, tables and availability." />

  <Card title="Menu API" href="/docs/menu/inventory" description="Items, variants, layouts and translations." />

  <Card title="Payments API" href="/docs/payments/payment-methods" description="Payment methods, settlements, invoices and terminals." />

  <Card title="Loyalty API" href="/docs/loyalty/loyalty" description="Programs, wallet passes and vouchers." />

  <Card title="Surplus API" href="/docs/surplus/surplus" description="Surplus inventory and consumer-facing offers." />
</Cards>

## Guides [#guides]

<Cards>
  <Card title="Placing an order" href="/docs/place-an-order" description="Create orders at a location in one call." />

  <Card title="Reading sales data" href="/docs/sales-data" description="Purchases, line items, VAT, refunds and nightly exports." />

  <Card title="BigQuery data sharing" href="/docs/bigquery" description="Customer-scoped views, joins, field definitions and BigQuery changes." />

  <Card title="Objects and fields" href="/docs/custom-fields" description="Typed custom fields on Karma's objects." />

  <Card title="Pushing surplus" href="/docs/surplus-from-pos" description="Sell end-of-day surplus from your own POS." />
</Cards>

<Cards>
  <Card title="Booking attribution" href="/docs/booking-attribution" description="Marketing discovery, booking acquisition and visit revenue." />
</Cards>

## Webhooks [#webhooks]

Rather than polling, subscribe to events and Karma will POST them to you.
[Receiving webhooks](/docs/webhooks) covers the envelope, signature
verification and retries; each API's **Events** section documents its payloads.
