catalog

Write a review or reply on a published component

The token is checked first, then the body. With parent the request creates a reply: parent must be a top-level review of the same component, the text is required and the rating is ignored (stored as 0).

Without parent it writes the caller's top-level review: rating 1–5 is required, the text is optional, and each user has at most one top-level review per component (a second POST updates its rating and text).

The author name is derived from the token's user (name, else the local part of the e-mail address). On success the component's review_count, review_avg and review_dist are recomputed and the fresh thread is returned.

post/api/components/{id}/reviews

Request

  • Base URL: https://voltplan.app
  • URL: https://voltplan.app/api/components/{id}/reviews
  • Auth: HTTP bearer

Request body

ratinginteger

Star rating; required for a top-level review, ignored for a reply.

bodystring

Review or reply text, trimmed; optional for a review, required for a reply.

parentstring

Id of a top-level review of the same component; turns the request into a reply.

Response

Review or reply saved; the updated thread and aggregate.

successunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.