Reputation
/v1/reputation/reviewsSubmit a 1-5 star review of a Merchant or a Space Branch — must be tied to a real completed trade session or Space booking the reviewer was actually a party to.
curl -X POST https://api.tbbnetwork.com/v1/reputation/reviews \
-H "Authorization: Bearer sk_sandbox_..." \
-H "Idempotency-Key: 5f2f...b91" \
-H "Content-Type: application/json" \
-d '{
"targetType": "MERCHANT",
"merchantId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"branchId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"rating": 1,
"comment": "comment",
"tradeSessionId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"spaceBookingId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
}'Request body
| Field | Type | Required |
|---|---|---|
| targetType | MERCHANT | SPACE_BRANCH | yes |
| merchantId | string (uuid) | — |
| branchId | string (uuid) | — |
| rating | integer | yes |
| comment | string | — |
| tradeSessionId | string (uuid) | — |
| spaceBookingId | string (uuid) | — |
Response (201)
| Field | Type | Required |
|---|---|---|
| id | string (uuid) | — |
| reviewerId | string (uuid) | — |
| targetType | MERCHANT | SPACE_BRANCH | — |
| merchantId | string,null (uuid) | — |
| branchId | string,null (uuid) | — |
| rating | integer | — |
| comment | stringnull | — |
| tradeSessionId | string,null (uuid) | — |
| spaceBookingId | string,null (uuid) | — |
| createdAt | string (date-time) | — |
{
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"reviewerId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"targetType": "MERCHANT",
"merchantId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"branchId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"rating": 1,
"comment": null,
"tradeSessionId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"spaceBookingId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"createdAt": "2026-07-01T12:00:00Z"
}Possible errors
Any other failure (validation, auth, rate limiting, a resource that doesn't exist) returns this same envelope with a non-2xx status — error.code is stable and safe to branch on; error.requestId is worth logging and including in a support request.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "A human-readable description of what went wrong.",
"requestId": "req_01hxyz..."
}
}/v1/reputation/merchants/{id}/reviewsA Merchant's reviews plus aggregate rating
curl -X GET https://api.tbbnetwork.com/v1/reputation/merchants/{id}/reviews \
-H "Authorization: Bearer sk_sandbox_..." \Parameters
| id | path | required |
Response (200)
| Field | Type | Required |
|---|---|---|
| reviews | object[] | — |
| averageRating | numbernull | — |
| reviewCount | integer | — |
{
"reviews": [
{
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"rating": 1,
"comment": null,
"reviewerName": null,
"createdAt": "2026-07-01T12:00:00Z"
}
],
"averageRating": null,
"reviewCount": 1
}/v1/reputation/branches/{id}/reviewsA Space Branch's reviews plus aggregate rating
curl -X GET https://api.tbbnetwork.com/v1/reputation/branches/{id}/reviews \
-H "Authorization: Bearer sk_sandbox_..." \Parameters
| id | path | required |
Response (200)
| Field | Type | Required |
|---|---|---|
| reviews | object[] | — |
| averageRating | numbernull | — |
| reviewCount | integer | — |
{
"reviews": [
{
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"rating": 1,
"comment": null,
"reviewerName": null,
"createdAt": "2026-07-01T12:00:00Z"
}
],
"averageRating": null,
"reviewCount": 1
}/v1/reputation/businesses/{id}/reviews-summaryAggregate rating across every Merchant and Branch linked to a Business.
curl -X GET https://api.tbbnetwork.com/v1/reputation/businesses/{id}/reviews-summary \
-H "Authorization: Bearer sk_sandbox_..." \Parameters
| id | path | required |
Response (200)
| Field | Type | Required |
|---|---|---|
| averageRating | numbernull | — |
| reviewCount | integer | — |
{
"averageRating": null,
"reviewCount": 1
}/v1/reputation/sellers/{id}Get a seller's reputation score (0-100). A new seller starts at the neutral baseline of 50.
curl -X GET https://api.tbbnetwork.com/v1/reputation/sellers/{id} \
-H "Authorization: Bearer sk_sandbox_..." \Parameters
| id | path | required |
Response (200)
| Field | Type | Required |
|---|---|---|
| sellerId | string (uuid) | — |
| score | integer | — |
{
"sellerId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"score": 1
}Possible errors
Any other failure (validation, auth, rate limiting, a resource that doesn't exist) returns this same envelope with a non-2xx status — error.code is stable and safe to branch on; error.requestId is worth logging and including in a support request.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "A human-readable description of what went wrong.",
"requestId": "req_01hxyz..."
}
}