← Developer home

Doeh POS — Marketplace API (1.0.0)

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.

Marketplace

Create a listing

Authorizations:
MerchantAuth
header Parameters
Idempotency-Key
string <= 200 characters
Trace-Id
string
Request Body schema: application/json
required
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

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "currency": "MMK",
  • "price_minor": 1,
  • "stock": 0
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "listing": {
    }
}

Read a listing

Authorizations:
MerchantAuth
path Parameters
id
required
string^[A-Za-z0-9_]+$
header Parameters
Trace-Id
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "listing": {
    }
}

Purchase units from a listing

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.

Authorizations:
MerchantAuth
path Parameters
id
required
string^[A-Za-z0-9_]+$
header Parameters
Idempotency-Key
string <= 200 characters
Trace-Id
string
Request Body schema: application/json
required
qty
required
integer >= 1

Responses

Request samples

Content type
application/json
{
  • "qty": 1
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "purchased": 0,
  • "listing": {
    }
}

Delist a listing (vendor)

Authorizations:
MerchantAuth
path Parameters
id
required
string^[A-Za-z0-9_]+$
header Parameters
Trace-Id
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "listing": {
    }
}