Skip to main content
PATCH
/
v1
/
review_protocol
Update
curl --request PATCH \
  --url https://{defaultHost}/v1/review_protocol \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "review_protocol": {
    "reviews_enabled": true,
    "solicit_reviews": true
  }
}
'
import requests

url = "https://{defaultHost}/v1/review_protocol"

payload = { "review_protocol": {
"reviews_enabled": True,
"solicit_reviews": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({review_protocol: {reviews_enabled: true, solicit_reviews: true}})
};

fetch('https://{defaultHost}/v1/review_protocol', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/v1/review_protocol",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'review_protocol' => [
'reviews_enabled' => true,
'solicit_reviews' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://{defaultHost}/v1/review_protocol"

payload := strings.NewReader("{\n \"review_protocol\": {\n \"reviews_enabled\": true,\n \"solicit_reviews\": true\n }\n}")

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

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://{defaultHost}/v1/review_protocol")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"review_protocol\": {\n \"reviews_enabled\": true,\n \"solicit_reviews\": true\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{defaultHost}/v1/review_protocol")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"review_protocol\": {\n \"reviews_enabled\": true,\n \"solicit_reviews\": true\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "a43f26a1-ffa7-4d6e-97b1-fc0e160c88ed",
  "object": "review_protocol",
  "reviews_enabled": true,
  "solicit_reviews": true,
  "solicit_reviews_after_days": 7,
  "created_at": 1782485896,
  "updated_at": 1782485897
}

Authorizations

Authorization
string
header
required

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

Body

application/json
review_protocol
object

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

reviews_enabled
boolean

If set to true, reviews will be enabled globally for all products in the account. Individual products must also have reviews enabled for reviews to be shown.

solicit_reviews
boolean

If set to true, review solicitation emails will be sent to customers who have purchased products. Individual products must also have solicitation enabled.

solicit_reviews_after_days
integer

The number of days after an order is fulfilled that a review solicitation email will be sent to the customer.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.