> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.papertracc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.papertracc.com/_mcp/server.

# Create Review

POST https://api.papertracc.com/v1/store/products/{handle}/reviews
Content-Type: application/json

Submits a review from the signed-in shopper. Only shoppers who have ordered the product can review it, and each shopper has one review per product: sending another replaces it. Reviews wait for the merchant's approval before they are listed.

**Keys:** public key or secret key.

Reference: https://api-docs.papertracc.com/storefront/reviews/create-review

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `identity` header (required) — The identity for the active workspace.

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Path parameters

- `handle` (string, required) — The record's handle.

### Headers

- `shopper-token` (string, required) — The `token` returned when the shopper signed in. Treat it as a secret: never put it in a URL or a log.
- `client-ip` (string, optional) — The shopper's IP address. Read only when the request is signed with a secret key, so a server calling on behalf of many shoppers does not share one rate limit. Ignored for public keys.

### Body (application/json)

This endpoint expects a ReviewRequest.

- `rating` (integer, required) — Stars, 1 to 5.
- `body` (string, required) — Plain text. Markup is removed.
- `title` (string, optional)

## Response

### 201

Successfully submitted review

- `status` (boolean, required) — Always `true` on success.
- `message` (string, required) — Human-readable outcome.
- `data` (ReviewReceipt, required)

## Errors

### 400 Bad Request Error

The `channel` header is missing, the body is not valid JSON, or a field failed validation.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 401 Unauthorized Error

The `shopper-token` header is missing, the session has expired, or the shopper signed out.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 404 Not Found Error

The sales channel, or the record the request names, does not exist or is not published to this channel.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 422 Unprocessable Entity Error

The request was understood but a rule stopped it. The message says which.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 429 Too Many Requests Error

Too many attempts from this shopper or on this store. Wait for the time in the message before trying again.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

## Types

### ReviewReceipt

- `status` (enum, required) — New and edited reviews wait for the merchant's approval.
  - Allowed values: `PENDING`

## Examples

**Request**

```json
{
  "rating": 5,
  "body": "string"
}
```

**Response**

```json
{
  "status": true,
  "message": "Successfully submitted review",
  "data": {
    "status": "PENDING"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.papertracc.com/v1/store/products/handle/reviews"

payload = {
    "rating": 5,
    "body": "string"
}
headers = {
    "channel": "channel",
    "shopper-token": "shopper-token",
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.papertracc.com/v1/store/products/handle/reviews';
const options = {
  method: 'POST',
  headers: {
    channel: 'channel',
    'shopper-token': 'shopper-token',
    Authorization: 'Bearer <apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"rating":5,"body":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/store/products/handle/reviews"

	payload := strings.NewReader("{\n  \"rating\": 5,\n  \"body\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("channel", "channel")
	req.Header.Add("shopper-token", "shopper-token")
	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/store/products/handle/reviews")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["channel"] = 'channel'
request["shopper-token"] = 'shopper-token'
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"rating\": 5,\n  \"body\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.papertracc.com/v1/store/products/handle/reviews")
  .header("channel", "channel")
  .header("shopper-token", "shopper-token")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"rating\": 5,\n  \"body\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/store/products/handle/reviews', [
  'body' => '{
  "rating": 5,
  "body": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
    'channel' => 'channel',
    'shopper-token' => 'shopper-token',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/store/products/handle/reviews");
var request = new RestRequest(Method.POST);
request.AddHeader("channel", "channel");
request.AddHeader("shopper-token", "shopper-token");
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"rating\": 5,\n  \"body\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "channel": "channel",
  "shopper-token": "shopper-token",
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "rating": 5,
  "body": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/store/products/handle/reviews")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```