# Introduction

The Open API lets your systems (ERP, website, accounting software, internal tools) read and write a shop's data on Pancake POS: orders, products, stock, customers, purchases, exports, promotions and reports.

## API address

Every endpoint lives under:

```text
https://pos.pages.fm/api/v1
```

Paths in these docs are relative to that address: `GET /shops/{SHOP_ID}/orders` means `https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders`. `{SHOP_ID}` is the shop's numeric ID.

## Your first request

1. Create an API key as described in [Authentication](/developers/api/en/authentication).
2. List the shops the key can access, with their IDs:

```bash
curl "https://pos.pages.fm/api/v1/shops?api_key=API_KEY"
```

3. Get a shop's 20 most recent orders:

```bash
curl "https://pos.pages.fm/api/v1/shops/SHOP_ID/orders?api_key=API_KEY&page_size=20&page_number=1"
```

4. Create an order by sending JSON in the request body:

```bash
curl -X POST "https://pos.pages.fm/api/v1/shops/SHOP_ID/orders?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bill_full_name": "Jane Doe", "bill_phone_number": "0912345678", "items": [{"variation_id": "VARIATION_ID", "quantity": 1}]}'
```

The fields of each endpoint are in the reference, for example [Orders](/developers/api/en/order).

## Data format

- Requests and responses are JSON (`Content-Type: application/json`), UTF-8 encoded.
- Responses carry `success` (`true` or `false`); data usually sits in `data`. Each endpoint documents its exact shape.
- Times use ISO 8601 in UTC, for example `2026-01-15T03:20:00`.
- Array query parameters repeat the name with `[]`: `filter_status[]=1&filter_status[]=2`.

## Pagination

List endpoints take `page_size` together with `page_number` or `page` (see each endpoint's parameters) and return:

| Field | Meaning |
|---|---|
| `data` | Records on this page |
| `page_number` | Current page, starting at 1 |
| `page_size` | Records per page |
| `total_entries` | Total number of records |
| `total_pages` | Total number of pages |

Read a whole list by increasing `page_number` up to `total_pages`. For periodic syncs, read only what changed instead of everything. For orders: `updateStatus=updated_at` with `startDateTime` and `endDateTime` (unix timestamps).

## Reading the reference

- Endpoints are grouped by business area in the sidebar: Shop, Sales, Products & inventory, Customers & promotions, Finance, Reports & ads.
- Each endpoint lists its parameters, request body, responses by HTTP status and a `curl` example. Expand an attribute to see its children.
- Shared objects (orders, products, webhook payloads…) are in [Data models](/developers/api/en/schemas).
- Every page has a Markdown version; [llms.txt](/developers/api/llms.txt) helps AI tools read the right docs.

## Related

- [POS Apps](/developers/apps/en) call this same Open API from inside POS, with an app token issued by POS instead of an API key.
- [MCP](/developers/mcp/en) lets Claude, Codex and Cursor use the Open API through plain-language requests.
