Wocart
Wocart API

Reviews

Server

List reviews

GET
https://api.wocart.store
/api/reviews
X-API-Key (header)

Reviews newest first, with their photos and voice note, filtered by status, product, who entered them, or having media. A review whose files are still being prepared is not listed yet.

List reviews › query Parameters

status
​string · enum

Filter by moderation status

Filter by moderation status

Enum values:
pending
approved
rejected
productId
​string

Filter by product ID

Filter by product ID

source
​string · enum

Sent by a shopper (storefront) or entered by the store (merchant)

Sent by a shopper (storefront) or entered by the store (merchant)

Enum values:
storefront
merchant
withMedia
​string · enum

Only reviews with a photo or a voice note

Only reviews with a photo or a voice note

Enum values:
true
false
limit
​integer · min: 1 · max: 100
Default: 20
offset
​integer | null · min: 0
Default: 0

List reviews › Responses

200

One page of reviews

success
​boolean · required
​Review[] · required
count
​integer · required
total
​integer · required

Matching reviews across all pages

pendingCount
​integer · required

Reviews waiting for a decision, whatever the filters (the badge)


Enter a review a customer gave the store

POST
https://api.wocart.store
/api/reviews
X-API-Key (header)

For a review received by WhatsApp, phone or in person. It names the product and a customer (from the list, or a typed name) and may rest on one of the customer's orders that brought the product — only a delivered one makes it a verified purchase. It carries today's date. Photos and a voice note are sent first to POST /api/reviews/uploads; with them the review is prepared in the background (status: processing, then published or pending).

Enter a review a customer gave the store › Request Body

productId
​string · minLength: 1 · required
rating
​integer · min: 1 · max: 5 · required
customerId
​string | null · minLength: 1

A customer of the list; their name is shown unless customerName is given

customerName
​string | null · maxLength: 80

The name shown; required without a customer

orderId
​string | null · minLength: 1

One of the customer's orders that brought the product — a delivered one makes it a verified purchase

title
​string | null · maxLength: 150
body
​string · maxLength: 2000

At least 10 characters, unless a voice note says it

Default:
uploads
​string[] · maxItems: 8

Upload IDs from POST /api/reviews/uploads

publish
​boolean

Publish at once (default), or keep it pending

Default: true

Enter a review a customer gave the store › Responses

Review entered

success
​boolean · required
​object · required

A customer's orders that brought a product

GET
https://api.wocart.store
/api/reviews/order-options
X-API-Key (header)

What a store review may rest on: the customer's orders that brought this product and that they kept, newest first, each saying whether it was delivered and already reviewed.

A customer's orders that brought a product › query Parameters

customerId
​string · minLength: 1 · required
productId
​string · minLength: 1 · required

A customer's orders that brought a product › Responses

200

The orders

success
​boolean · required
​object[] · required

Send a photo or voice note for a review being entered

POST
https://api.wocart.store
/api/reviews/uploads
X-API-Key (header)

The file itself as the request body (a photo, or a voice note up to 120 s; its length as recorded in X-Media-Duration-Ms when known). Name the returned uploadIds when creating the review.

Send a photo or voice note for a review being entered › Request Body

string · binary

Send a photo or voice note for a review being entered › Responses

Received

success
​boolean · required
​object · required

Get a review

GET
https://api.wocart.store
/api/reviews/{id}
X-API-Key (header)

One review with its photos and voice note.

Get a review › path Parameters

id
​string · required

Review ID

Review ID

Get a review › Responses

The review

success
​boolean · required
​Review · required

A product review, as the merchant moderates it


Approve, reject, or re-queue a review

PATCH
https://api.wocart.store
/api/reviews/{id}
X-API-Key (header)

approved shows it on the storefront and counts it in the product's rating; rejected hides it; pending puts it back in the queue.

Approve, reject, or re-queue a review › path Parameters

id
​string · required

Review ID

Review ID

Approve, reject, or re-queue a review › Request Body

status
​string · enum · required

New moderation status

Enum values:
pending
approved
rejected

Approve, reject, or re-queue a review › Responses

The review with its new status

success
​boolean · required
​Review · required

A product review, as the merchant moderates it


Delete a review

DELETE
https://api.wocart.store
/api/reviews/{id}
X-API-Key (header)

Removes the review for good, its photos and voice note with it.

Delete a review › path Parameters

id
​string · required

Review ID

Review ID

Delete a review › Responses

Review deleted

success
​boolean · required

Remove a review's photo or voice note

DELETE
https://api.wocart.store
/api/reviews/{id}/media/{mediaId}
X-API-Key (header)

Takes one file off the review — a face, a phone number — and keeps the review.

Remove a review's photo or voice note › path Parameters

id
​string · required
mediaId
​string · required

Remove a review's photo or voice note › Responses

The review without that file

success
​boolean · required
​Review · required

A product review, as the merchant moderates it