Skip to content

Reviews and ratings ​

The repository has both product reviews and newer user reviews with per-product rating metrics. Use the matching create/update/read family; their field names differ.

Access labels such as Origin + Brand key + Customer are defined in Headers and access. Each endpoint ends in a Try it console; set the host and keys once in its Settings tab or on the overview.

Update review ​

MethodURL pathRequired access
PUT/api/v1/user/reviewOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.reviewIdnumberyes—
body.payload.titlestringoptional—
body.payload.textstringoptional—
body.payload.overallRatingnumberoptionalMinimum (1); Maximum (5)
body.payload.assetsstringoptional—

Example:

bash
curl -X PUT "$BASE_URL/api/v1/user/review" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"reviewId":1}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/review_controller.js:12 → updateReview; routes: routes/v1/review_route.js:79; service: _updateReview (app/v1/service/review_service.js:176).

Add review ​

MethodURL pathRequired access
POST/api/v1/user/reviewOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.titlestringoptional—
body.payload.textstringoptional—
body.payload.overallRatingnumberyesMinimum (1); Maximum (5)
body.payload.assetsstringoptional—
body.payload.productIdnumberyes—
body.payload.authCodestringyesWhitespace trimmed

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/review" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"overallRating":5,"productId":1,"authCode":"<AUTH_CODE>"}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/review_controller.js:42 → addReview; routes: routes/v1/review_route.js:69; service: _addReview (app/v1/service/review_service.js:10).

Get review by ID ​

MethodURL pathRequired access
GET/api/v1/user/review/:reviewIdOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
path.reviewIdnumberyes—

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/review/1" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/review_controller.js:75 → getReviewById; routes: routes/v1/review_route.js:89; service: _getReview (app/v1/service/review_service.js:221).

Get all reviews ​

MethodURL pathRequired access
GET/api/v1/user/review/product/:productIdOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
path.productIdnumberyes—

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/review/product/1" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/review_controller.js:101 → getAllReviews; routes: routes/v1/review_route.js:99; service: _getAllReview (app/v1/service/review_service.js:251).

Get all reviews by product slug ​

MethodURL pathRequired access
POST/api/v1/user/review/product-slugOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.slugstringyes—

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/review/product-slug" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"slug":"example"}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/review_controller.js:128 → getAllReviewsByProductSlug; routes: routes/v1/review_route.js:109; service: _getAllReviewsByProductSlug (app/v1/service/review_service.js:281).

Check review for product ​

MethodURL pathRequired access
GET/api/v1/user/review/product/:productId/allowOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
path.productIdnumberyes—

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/review/product/1/allow" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, allowReview.

Source: app/v1/controller/review_controller.js:157 → checkReviewForProduct; routes: routes/v1/review_route.js:119; service: _checkReviewForProduct (app/v1/service/review_service.js:322).

Add user review relation ​

MethodURL pathRequired access
POST/api/v1/user/user-reviewOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.reviewIdnumberyes—
body.payload.wasHelpfulbooleanyes—

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/user-review" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"reviewId":1,"wasHelpful":true}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/userReviewRelation_controller.js:9 → addUserReviewRelation; routes: routes/v1/userReviewRelation_route.js:8; service: _addUserReviewRelation (app/v1/service/userReviewRelation_service.js:5).

Update user review relation ​

MethodURL pathRequired access
PUT/api/v1/user/user-reviewOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.userReviewRelationIdnumberyes—
body.payload.wasHelpfulbooleanyes—

Example:

bash
curl -X PUT "$BASE_URL/api/v1/user/user-review" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"userReviewRelationId":1,"wasHelpful":true}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/userReviewRelation_controller.js:37 → updateUserReviewRelation; routes: routes/v1/userReviewRelation_route.js:18; service: _updateUserReviewRelation (app/v1/service/userReviewRelation_service.js:38).

Get all user review relations ​

MethodURL pathRequired access
GET/api/v1/user/user-review/:reviewIdOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
path.reviewIdnumberyes—

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/user-review/1" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/userReviewRelation_controller.js:64 → getAllUserReviewRelations; routes: routes/v1/userReviewRelation_route.js:28; service: _getAllUserReviewRelations (app/v1/service/userReviewRelation_service.js:61).

Add user review ​

MethodURL pathRequired access
POST/api/v1/user/user-review/createOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.titlestringoptionalWhitespace trimmed
body.payload.descriptionstringoptionalWhitespace trimmed
body.payload.overall_ratingnumberyesMinimum (1); Maximum (5)
body.payload.productIdnumberyes—
body.payload.review_metricarray of objectyes—
body.payload.review_metric[].idnumberyes—
body.payload.review_metric[].ratingnumberyes—
body.payload.review_metric[].commentsstringoptional—

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/user-review/create" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"overall_rating":5,"productId":1,"review_metric":[{"id":1,"rating":1}]}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/user_review_controller.ts:18 → addUserReview; routes: routes/v1/user_review_route.ts:9; service: _addUserReview (app/v1/service/user_review_service.ts:16).

Get all user reviews ​

MethodURL pathRequired access
GET/api/v1/user/user-reviewsOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
query.productIdarray of numberoptional—
query.startDatestringoptionalisoDate()
query.endDatestringoptionalisoDate()

productId is converted to a string array by Lodash split. startDate and endDate are only added when both are supplied.

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/user-reviews" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: User review records matching the product/date filters.

Source: app/v1/controller/user_review_controller.ts:67 → getAllUserReviews; routes: routes/v1/user_review_route.ts:19; service: _getAllUserReviews (app/v1/service/user_review_service.ts:182).

Get user review by ID ​

MethodURL pathRequired access
GET/api/v1/user/user-reviews/:idOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
path.idstringyesNo controller schema

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/user-reviews/<ID>" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/user_review_controller.ts:104 → getUserReviewById; routes: routes/v1/user_review_route.ts:29; service: _getUserReviewById (app/v1/service/user_review_service.ts:287).

Update user review ​

MethodURL pathRequired access
PUT/api/v1/user/user-review/:userReviewIdOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.titlestringoptionalWhitespace trimmed
body.payload.descriptionstringoptionalWhitespace trimmed
body.payload.overall_ratingnumberoptionalMinimum (1); Maximum (5)
body.payload.statusstringoptionalWhitespace trimmed; Allowed values ("locked", "open", "submitted")
body.payload.review_metricarray of objectoptional—
body.payload.review_metric[].idnumberyes—
body.payload.review_metric[].ratingnumberyes—
body.payload.review_metric[].commentsstringoptional—
path.userReviewIdstringyesNo controller schema

Example:

bash
curl -X PUT "$BASE_URL/api/v1/user/user-review/<USERREVIEWID>" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/user_review_controller.ts:127 → updateUserReview; routes: routes/v1/user_review_route.ts:39; service: _updateUserReview (app/v1/service/user_review_service.ts:375).

Delete user review ​

MethodURL pathRequired access
DELETE/api/v1/user/user-review/:userReviewIdOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
path.userReviewIdstringyesNo controller schema

Example:

bash
curl -X DELETE "$BASE_URL/api/v1/user/user-review/<USERREVIEWID>" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/user_review_controller.ts:182 → deleteUserReview; routes: routes/v1/user_review_route.ts:49; service: _deleteUserReview (app/v1/service/user_review_service.ts:498).

Get all review metric for product ​

Fetch the review questions or rating metrics configured for the product.

MethodURL pathRequired access
GET/api/v1/user/review_metric/:productIdOrigin + Brand key + Customer
GET/api/v1/brand/review_metric/:productIdOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
path.productIdnumberyesInteger

Example (first URL):

bash
curl -X GET "$BASE_URL/api/v1/user/review_metric/1" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, data.

Source: app/v1/controller/user_review_controller.ts:204 → getAllReviewMetricForProduct; routes: routes/v1/user_review_route.ts:69; service: _getAllReviewMetricForProduct (app/v1/service/user_review_service.ts:526).

Batch platform, Shopify app and API documentation