Skip to main content
POST
/
reviews
Add a new review
curl --request POST \
  --url https://api.rechain.co/public/v1/reviews \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Review name",
  "orderId": "123e4567-e89b-12d3-a456-426614174000",
  "productId": "123e4567-e89b-12d3-a456-426614174000",
  "sizes": [
    "123e4567-e89b-12d3-a456-426614174000",
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "status": 0,
  "generalComment": "This is a general comment about the review.",
  "position": 1,
  "developmentStageId": "123e4567-e89b-12d3-a456-426614174000",
  "milestoneId": "123e4567-e89b-12d3-a456-426614174000"
}
'
{
  "name": "Review name",
  "orderId": "123e4567-e89b-12d3-a456-426614174000",
  "productId": "123e4567-e89b-12d3-a456-426614174000",
  "sizes": [
    "123e4567-e89b-12d3-a456-426614174000",
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "status": 0,
  "generalComment": "This is a general comment about the review.",
  "position": 1,
  "developmentStageId": "123e4567-e89b-12d3-a456-426614174000",
  "milestoneId": "123e4567-e89b-12d3-a456-426614174000",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2024-09-01T12:34:56Z",
  "hasPendingRevisions": true,
  "reviewPhotos": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "uuid": "123e4567-e89b-12d3-a456-426614174000",
      "fileUrl": "https://example.com/photos/photo.jpg",
      "reviewed": false,
      "position": 1,
      "commentedFileUrl": "https://example.com/photos/commented_photo.jpg",
      "initialFileUrl": "https://example.com/photos/initial_photo.jpg",
      "pinturaState": "<string>",
      "shapes": "<string>"
    }
  ],
  "sampleReviewMeasures": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "measure": "50 cm",
      "productDimensionId": "123e4567-e89b-12d3-a456-426614174000",
      "productSizeId": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "fullName": "John Doe",
    "firstName": "John"
  },
  "developmentStage": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Development Stage Name",
    "color": "gray"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create a new review

name
string
required
Example:

"Review name"

orderId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

productId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

sizes
string<uuid>[]
Example:
[
"123e4567-e89b-12d3-a456-426614174000",
"123e4567-e89b-12d3-a456-426614174000"
]
status
enum<integer>

Review status, can be any of { approved: 0, approved_with_comments: 1, rejected: 2 }

Available options:
0,
1,
2
generalComment
string
Example:

"This is a general comment about the review."

position
integer
Example:

1

developmentStageId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

milestoneId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Successful operation

id
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

userId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

createdAt
string<date-time>
Example:

"2024-09-01T12:34:56Z"

hasPendingRevisions
boolean
Example:

true

reviewPhotos
object[]
sampleReviewMeasures
object[]
user
object
developmentStage
object