Publish
curl --request PATCH \
--url https://{defaultHost}/v1/reviews/{id}/publish \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/reviews/{id}/publish"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/reviews/{id}/publish', 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/reviews/{id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/reviews/{id}/publish"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/reviews/{id}/publish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/reviews/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "9c7c192d-5ffd-4ee5-bcbd-c818d2a48cb9",
"object": "review",
"body": "Really enjoyed using this.",
"status": "published",
"title": "Great Product",
"stars": 4.5,
"verified": false,
"customer": "ec7a8482-71c8-4d74-b58b-1a7e10fe9ae1",
"product": "acec534e-de1b-4f92-9294-047250953d1e",
"purchase": null,
"created_at": 1796063985,
"updated_at": 1796063985
}Reviews
Publish
Publishes a specific review.
PATCH
/
v1
/
reviews
/
{id}
/
publish
Publish
curl --request PATCH \
--url https://{defaultHost}/v1/reviews/{id}/publish \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/reviews/{id}/publish"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/reviews/{id}/publish', 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/reviews/{id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/reviews/{id}/publish"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/reviews/{id}/publish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/reviews/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "9c7c192d-5ffd-4ee5-bcbd-c818d2a48cb9",
"object": "review",
"body": "Really enjoyed using this.",
"status": "published",
"title": "Great Product",
"stars": 4.5,
"verified": false,
"customer": "ec7a8482-71c8-4d74-b58b-1a7e10fe9ae1",
"product": "acec534e-de1b-4f92-9294-047250953d1e",
"purchase": null,
"created_at": 1796063985,
"updated_at": 1796063985
}Authorizations
Response
200 - application/json
Success
Expandable – The associated customer ID.
Expandable – The associated product ID.
Expandable – The associated purchase ID.
Expandable – Property not returned unless expanded.
Was this page helpful?