API 參考
Reviews
Customer API: GET /reviews, POST /reviews, PATCH /reviews
Returns a map keyed by order line id. Order lines without a review from this customer are omitted. Use it to decide whether to show a “write a review” or “edit your review” button.
Parameters
orderItemIdsstring · queryrequiredComma-separated order line ids (max 100).
Response 200
data"PENDING" | "APPROVED" | "REJECTED"[]requiredhasMorebooleanrequiredTrue when another page exists; pass nextCursor to fetch it.
nextCursorstring | nullrequiredCursor for the next page, or null on the last page.
Errors
VALIDATION400
curl -X GET "https://{site}/api/v1/customer/reviews" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN"Eligibility is checked by the store: the order line must belong to this customer and be paid (digital products also need a live entitlement). The review starts as PENDING until the store approves it. One review per order line.
Request body
orderItemIdstringrequiredOrder line id from GET /orders/{id}.
ratingintegerrequiredcontentstring
Response 200
reviewIdstringstatus"PENDING" | "APPROVED" | "REJECTED"required
Errors
ORDER_NOT_FOUND404FORBIDDEN403REVIEWS_DISABLED403ALREADY_REVIEWED409VALIDATION400
curl -X POST "https://{site}/api/v1/customer/reviews" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Only reviews written by this customer can be edited. An edited review goes back to PENDING and is re-moderated by the store.
Request body
reviewIdstringrequiredratingintegerrequiredcontentstring
Response 200
reviewIdstringstatus"PENDING" | "APPROVED" | "REJECTED"required
Errors
NOT_FOUND404FORBIDDEN403VALIDATION400
curl -X PATCH "https://{site}/api/v1/customer/reviews" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'