Download OpenAPI specification:
Public marketplace API, served by the edge gateway. Bearer-token auth; shop scope derived from the token. Listings are shop-scoped. Purchases atomically decrement stock and never oversell (concurrency-safe); purchase is idempotent by key. Prices are integer minor units.
| Idempotency-Key | string <= 200 characters |
| Trace-Id | string |
| title required | string non-empty |
| currency required | string (Currency) Enum: "MMK" "THB" "USD" "CNY" "SGD" "INR" |
| price_minor required | integer >= 1 integer minor units |
| stock required | integer >= 0 |
{- "title": "string",
- "currency": "MMK",
- "price_minor": 1,
- "stock": 0
}{- "ok": true,
- "idempotent": true,
- "listing": {
- "id": "lst_7718e897cb4c619f",
- "status": "active",
- "shop_id": 0,
- "branch_id": 0,
- "title": "string",
- "currency": "MMK",
- "price_minor": 0,
- "stock": 0,
- "sold": 0,
- "created_at_utc": "2019-08-24T14:15:22Z",
- "created_at_local": "string"
}
}| id required | string^[A-Za-z0-9_]+$ |
| Trace-Id | string |
{- "ok": true,
- "idempotent": true,
- "listing": {
- "id": "lst_7718e897cb4c619f",
- "status": "active",
- "shop_id": 0,
- "branch_id": 0,
- "title": "string",
- "currency": "MMK",
- "price_minor": 0,
- "stock": 0,
- "sold": 0,
- "created_at_utc": "2019-08-24T14:15:22Z",
- "created_at_local": "string"
}
}Atomically decrements stock. Never oversells under concurrency. Idempotent by key — a retried purchase does not decrement again. Rejected if the listing is sold out or delisted.
| id required | string^[A-Za-z0-9_]+$ |
| Idempotency-Key | string <= 200 characters |
| Trace-Id | string |
| qty required | integer >= 1 |
{- "qty": 1
}{- "ok": true,
- "idempotent": true,
- "purchased": 0,
- "listing": {
- "id": "lst_7718e897cb4c619f",
- "status": "active",
- "shop_id": 0,
- "branch_id": 0,
- "title": "string",
- "currency": "MMK",
- "price_minor": 0,
- "stock": 0,
- "sold": 0,
- "created_at_utc": "2019-08-24T14:15:22Z",
- "created_at_local": "string"
}
}| id required | string^[A-Za-z0-9_]+$ |
| Trace-Id | string |
{- "ok": true,
- "idempotent": true,
- "listing": {
- "id": "lst_7718e897cb4c619f",
- "status": "active",
- "shop_id": 0,
- "branch_id": 0,
- "title": "string",
- "currency": "MMK",
- "price_minor": 0,
- "stock": 0,
- "sold": 0,
- "created_at_utc": "2019-08-24T14:15:22Z",
- "created_at_local": "string"
}
}