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

# Introduction

> What the Shoply API is, what it reaches, and where to start

The Shoply API is everything the dashboard does, for a program instead of a person. With a secret API key your own server can manage a store's catalogue and stock, read and complete orders, refund them, look after customers and affiliates, run coupons and sales, keep the books, and be told the moment something happens.

```
https://api.shoply.gg/v1
```

> **[From a key to an answer](/api-reference/quickstart.md)**
>
> A new key, one question to learn its store, and your products read back by your own server.

> **[Node.js](/api-reference/node.md)**
>
> Every route as a typed method, with safe retries, pages and webhook checks: `npm install @shoplygg/node`.

> **[PHP](/api-reference/php.md)**
>
> The same for PHP 8.1 or later, with array shapes your editor reads: `composer require shoplygg/shoply-php`.

> **[Python](/api-reference/python.md)**
>
> The same for Python 3.9 or later, with types mypy reads: `pip install shoply`.

## What it is for

> **Keep a catalogue in step**
>
> Push products, prices and license keys from wherever you already keep them, and pull stock counts back.

> **Act on orders**
>
> Read orders as they are paid, mark one paid yourself, deliver one again, refund one.

> **Sell from a bot**
>
> Raise an invoice for a buyer and hand them the page to pay it on, from Discord or anywhere else.

> **Feed your own tools**
>
> Send orders, customers, expenses and profit to accounting, a CRM or a spreadsheet.

## How it is shaped

Every route but one is under `/stores/{storeId}`. Nothing here is an account's: a product, an order, a customer is one store's. A key is one store's too, and reaches no other.

An answer has one shape, a success and a refusal alike. A key carries permissions, and each route's page says which one it needs. Requests are counted for each key, and every answer says how much of its budget is left.

> **[Authentication](/api-reference/authentication.md)**
>
> Keys, the header they go in, and what protects one.

> **[Permissions](/api-reference/permissions.md)**
>
> Everything a key can be allowed to do.

> **[Conventions](/api-reference/conventions.md)**
>
> The envelope, lists, dates, money and how a save works.

> **[Errors](/api-reference/errors.md)**
>
> What a refusal looks like and what each code means.

## What it is not for

A browser. A secret key in a page is readable by every visitor of that page, so the API sends no CORS headers and a browser refuses to read its answers. For a storefront of your own, use the [Storefront SDK](/sdk/introduction.md), the [embed](/guides/embeds.md) or the [Checkout Kit](/guides/checkout-kit.md): they need a store ID and no key.

A few things are also left to a person in the dashboard, where it asks them to confirm it is them: a payment method's credentials, the dynamic delivery signing secret, where the store's alerts are sent, and API keys themselves. A key that tries one is refused with `dashboard_only`.

## Being told, instead of asking

If you are asking the API over and over whether an order has been paid, use [webhooks](/api-reference/webhooks.md). They arrive in the second the thing happens, signed, and are tried again for a day if your server is down.


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