Back

    Buyamia Directory API

    v1.0

    Update Business

    PUT
    /v1/businesses/:id

    Update an existing business listing. Only include fields you want to change.

    businesses.write

    Requires the businesses.write permission scope.

    Path Parameters

    ParameterTypeDescription
    iduuidThe business UUID to update

    Updatable Fields

    Send only the fields you want to update. All fields are optional. Unrecognized fields are silently ignored.

    FieldTypeDescription
    namestringBusiness name
    description_enstringDescription (English)
    description_idstringDescription (Indonesian)
    category_iduuidPrimary category
    region_iduuidRegion
    country_iduuidCountry
    addressstringPhysical address
    phonestringPhone number
    emailstringContact email
    websitestringWebsite URL
    whatsapp_numberstringWhatsApp number
    can_fulfill_ordersbooleanCan fulfill procurement orders
    visibilitystringpublic, internal, or draft
    booking_urlstringBooking/scheduling URL
    google_maps_urlstringGoogle Maps link
    year_establishedintegerYear founded
    certificationsstring[]Business certifications
    payment_termsstring[]Accepted payment terms
    minimum_order_valuenumberMinimum order value
    operating_hoursobjectOperating hours JSON
    latitudenumberGPS latitude
    longitudenumberGPS longitude

    Fires the business.updated webhook with updated_fields array showing which fields changed.

    Example Request

    Partial Updatebash
    curl -X PUT "https://rjpxllsycikfabazvkdh.supabase.co/functions/v1/directory-api/v1/businesses/550e8400-e29b-41d4-a716-446655440000" \
      -H "X-API-Key: your-key" \
      -H "Content-Type: application/json" \
      -d '{
        "phone": "+62898765432",
        "can_fulfill_orders": true,
        "certifications": ["ISO 9001", "SVLK"]
      }'

    Response

    {
      "data": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "PT Furniture Jaya",
        "phone": "+62898765432",
        "can_fulfill_orders": true,
        "certifications": ["ISO 9001", "SVLK"],
        "updated_at": "2026-03-15T10:30:00Z"
      }
    }
    Last updated on March 15, 2026