JSON API
The marketplace exposes a small JSON API under /api/v1. Sessions use the same cookie as the web interface, so you can sign in and reuse the session cookie for API calls.
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/items | List published items. Supports q, category, lang, sort, page. |
GET | /api/v1/items/{id} | Details of a single item. |
GET | /api/v1/categories | The category tree with item counts. |
POST | /api/v1/auth/register | Create an account (JSON body). |
POST | /api/v1/auth/login | Sign in and receive a session cookie. |
GET | /api/v1/me | The signed-in member (session cookie required). |
GET | /api/v1/me/items | The listings of the signed-in member, drafts included. |
POST | /api/v1/items/{id} | Update the metadata of a listing (JSON body, only the fields that are sent are written). |
POST | /api/v1/items/{id}/version | Publish a new version of a listing with its changelog. |
GET | /api/v1/cart | The cart of the signed-in member. |
POST | /api/v1/cart | Add an item to the cart. |
POST | /api/v1/checkout | Place an order for the current cart. |
Unsafe requests must send the CSRF token in the X-CSRF-Token header — the same value the browser receives in the ms_csrf cookie.