Buyamia Directory API
The Directory API gives machine-to-machine access to the Buyamia Directory: businesses, products, categories, regions, search, and the RFQ / quote workflow. Its primary consumer is the Procurement app at sourcing.buyamia.com, but any partner with an API key can use it.
No change to any request or response you already depend on. Internal-visibility scopes can now be granted on a key, and every endpoint, error and limit is documented with the release it appeared in.
- AddedScopes
businesses.internal.read,products.internal.readandbusinesses.assets.readcan now be granted on an API key. Without them, non-public businesses, non-active products and business assets stay hidden (returned as404) — behaviour for existing keys is unchanged. - AddedRelease notes: every endpoint, scope and error code now carries the version it was added in.
- DocumentedRate limits: the per-key rolling 60-second window,
429behaviour, and the fact that noRetry-AfterorX-RateLimit-*header is sent.
Base URL
https://rjpxllsycikfabazvkdh.supabase.co/functions/v1/directory-apiA GET on the base URL with no path is an unauthenticated health check and returns { service, version, status, docs }. Every other route requires /v1/ and an API key.
Response Format
Single-resource endpoints return { "data": { ... } }. List endpoints return a flat envelope — there is no nested pagination object and no has_more field:
{
"data": [ /* rows */ ],
"total": 150,
"limit": 20,
"offset": 0
}Compute "is there another page?" yourself: offset + data.length < total. Do not code against a has_more field — the API does not send one.
Three endpoints intentionally use a different shape: /v1/search, /v1/semantic-search and /v1/hybrid-search return grouped results, and GET /v1/rfq/:id/quotes returns an RFQ header plus a suppliers array. Each is documented on its own page.
Errors return a non-2xx status with { "error": "human readable message" }.
Pagination Parameters
| Parameter | Default | Range | Notes |
|---|---|---|---|
limit | 20 | 1 – 100 | Values outside the range are clamped, not rejected. |
offset | 0 | ≥ 0 | Offset-based paging; there are no cursors. |
Money
Money is always an amount plus a currency, never a bare number. Prices carry a sibling currency field (currency, target_currency, quoted_currency). When you omit a currency on write, the API defaults to IDR. Never assume a currency from context.
Versioning
All endpoints are prefixed with /v1/. A request whose first path segment is not v1 returns 400. Additive changes (new fields, new endpoints) ship inside v1; breaking changes would ship as /v2/.
How to tell what changed
- The badge in the header and the sidebar shows the current API release. Everything on these pages describes that release.
- An endpoint, scope or error carrying an
Added in x.y.z/Changed in x.y.zbadge appeared or changed in that release. No badge means it has been there since 1.0.0 and has not changed. - Each page footer states the release its content was last checked against, so you can see whether a page moved in the latest release or not.
- Release Notes lists every release with its date and a per-endpoint breakdown of what was added, changed or fixed.
Where to start
- Quick Start — get a key, make your first call, page through a list.
- Endpoints — the reference for every resource you can read or write.
- Integration Guide — a worked end-to-end example, including the RFQ loop and webhooks.
Related surfaces
- Agent Gateway — natural-language queries,
agent.queryscope, separate base URL. - MCP server (
directory-mcp) — Model Context Protocol access for AI tooling.
Getting help
- API keys and scope changes — contact the Buyamia team that issued your key; keys cannot be self-serve created or modified.
- Unexpected responses — check the running version with a
GETon the base URL, then compare it against Release Notes; include theversionvalue and the full request path when reporting an issue. - Rate limits — if you hit
429regularly, ask Buyamia for a higher per-minute limit on your key (see Rate Limits & Quotas).