Submit Supplier Performance
POST
/v1/businesses/:id/performanceSubmit or update supplier performance feedback. Uses upsert — creates a new record or updates the existing one.
businesses.write
Requires the businesses.write permission scope.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | uuid | The business UUID |
Request Body
All fields are optional. Only include the metrics you want to set or update.
| Field | Type | Description |
|---|---|---|
reliability_score | number | Overall reliability score (0-5) |
quality_score | number | Product quality score (0-5) |
response_rate_percent | number | Response rate percentage (0-100) |
on_time_delivery_percent | number | On-time delivery percentage (0-100) |
total_orders | integer | Total orders completed |
notes | string | Performance notes or comments |
Behavior
- Upsert: If a performance record exists for this business, it is updated. Otherwise, a new record is created.
- Returns 201 for new records, 200 for updates
- Fires
supplier.performance_updatedwebhook
Example Request
cURLbash
curl -X POST "https://rjpxllsycikfabazvkdh.supabase.co/functions/v1/directory-api/v1/businesses/uuid-here/performance" \
-H "X-API-Key: your-key" \
-H "Content-Type: application/json" \
-d '{
"reliability_score": 4.2,
"quality_score": 4.5,
"response_rate_percent": 88,
"on_time_delivery_percent": 92,
"total_orders": 150,
"notes": "Excellent quality, occasional minor delays"
}'Response (201 Created)
{
"data": {
"id": "uuid",
"business_id": "uuid",
"reliability_score": 4.2,
"quality_score": 4.5,
"response_rate_percent": 88,
"on_time_delivery_percent": 92,
"total_orders": 150,
"notes": "Excellent quality, occasional minor delays",
"created_at": "2026-03-15T08:00:00Z"
}
}Last updated on March 15, 2026