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.

MethodEndpointDescription
GET/api/v1/itemsList published items. Supports q, category, lang, sort, page.
GET/api/v1/items/{id}Details of a single item.
GET/api/v1/categoriesThe category tree with item counts.
POST/api/v1/auth/registerCreate an account (JSON body).
POST/api/v1/auth/loginSign in and receive a session cookie.
GET/api/v1/meThe signed-in member (session cookie required).
GET/api/v1/me/itemsThe 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}/versionPublish a new version of a listing with its changelog.
GET/api/v1/cartThe cart of the signed-in member.
POST/api/v1/cartAdd an item to the cart.
POST/api/v1/checkoutPlace 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.