Back

    Buyamia Directory API

    v1.1.0

    Businesses

    GET
    /v1/businesses

    List businesses. Filters: `category_id`, `region_id`, `country_id`, `verified`, `visibility` (internal scope only), plus `limit` / `offset`.

    businesses.read

    Returns the flat list envelope. Without businesses.internal.read the result set is restricted to visibility = public and ?visibility= is ignored.

    Example response (truncated)json
    {
      "data": [
        {
          "id": "c3a1…",
          "name": "Bali Teak Works",
          "slug": "bali-teak-works",
          "description_en": "Solid teak furniture manufacturer.",
          "category_id": "8f2b…",
          "region_id": "12d4…",
          "verified": true,
          "visibility": "public",
          "phone": "+62…",
          "email": "sales@example.com"
        }
      ],
      "total": 7213,
      "limit": 20,
      "offset": 0
    }
    GET
    /v1/businesses/:id

    Single business by UUID. Returns 404 if it is not public and the key lacks `businesses.internal.read`.

    businesses.read
    GET
    /v1/businesses/slug/:slug

    Single business by slug, same visibility rules as by-id.

    businesses.read
    POST
    /v1/businesses

    Create a business. Slug is generated from the name and de-duplicated automatically. Fires `business.created`.

    businesses.write
    Request bodyjson
    {
      "name": "Bali Teak Works",
      "description_en": "Solid teak furniture manufacturer.",
      "description_id": "Produsen furnitur jati solid.",
      "category_id": "8f2b…",
      "region_id": "12d4…",
      "country_id": "b593…",
      "address": "Jl. Raya Gianyar 12",
      "phone": "+6281…",
      "email": "sales@example.com",
      "website": "https://example.com",
      "whatsapp_number": "+6281…",
      "can_fulfill_orders": true,
      "visibility": "public"
    }
    PUT
    /v1/businesses/:id

    Partial update. Fires `business.updated` with the list of changed fields.

    businesses.write

    Accepted fields: name, description_en, description_id, category_id, region_id, country_id, address, phone, email, website, whatsapp_number, can_fulfill_orders, visibility, booking_url, google_maps_url, year_established, certifications, payment_terms, minimum_order_value, operating_hours, latitude, longitude. Unknown fields are ignored.

    GET
    /v1/businesses/:id/products

    Products belonging to one business, with variants and pricing tiers. Restricted to active + public products unless the key has `products.internal.read`.

    businesses.read
    GET
    /v1/businesses/:id/performance

    Supplier performance record for the business, or `null` when none exists.

    businesses.read
    POST
    /v1/businesses/:id/performance

    Upsert supplier performance. Fires `supplier.performance_updated`.

    businesses.write
    Request bodyjson
    {
      "reliability_score": 87,
      "quality_score": 92,
      "response_rate_percent": 78,
      "on_time_delivery_percent": 95,
      "total_orders": 41,
      "notes": "Consistent on repeat teak orders."
    }
    GET
    /v1/businesses/:id/capabilities

    Declared supplier capabilities for the business.

    businesses.read

    This endpoint returns all capability rows with no internal-visibility filter, unlike the neighbouring products and assets routes. If your integration must not see internal data, do not rely on this route to filter it for you.

    GET
    /v1/businesses/:id/assets

    Business assets (documents, certificates, media). Returns 403 without `businesses.assets.read` or `*`, because assets can include sensitive internal documents.

    businesses.assets.read
    Current as of API 1.1.0 — released 7 September 2026