Like comment
curl --request POST \
--url https://store.salesive.com/api/v1/comments/{commentId}/like \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/comments/{commentId}/like"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/comments/{commentId}/like', 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://store.salesive.com/api/v1/comments/{commentId}/like",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-shop-id: <api-key>"
],
]);
$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://store.salesive.com/api/v1/comments/{commentId}/like"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://store.salesive.com/api/v1/comments/{commentId}/like")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/comments/{commentId}/like")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_bodyComments
Like comment
Like a comment.
POST
/
comments
/
{commentId}
/
like
Like comment
curl --request POST \
--url https://store.salesive.com/api/v1/comments/{commentId}/like \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/comments/{commentId}/like"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/comments/{commentId}/like', 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://store.salesive.com/api/v1/comments/{commentId}/like",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-shop-id: <api-key>"
],
]);
$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://store.salesive.com/api/v1/comments/{commentId}/like"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://store.salesive.com/api/v1/comments/{commentId}/like")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/comments/{commentId}/like")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_bodyRequest
POST /comments/696cec2f1f6748186587748e/like
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Headers
| Header | Type | Description |
|---|---|---|
Authorization | string | Provide the customer token as Bearer <jwt>. |
x-shop-id | string | Identify the shop. |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
commentId | string | Yes | Comment identifier to like. |
Successful response
{
"status": 200,
"success": true,
"message": "Comment like toggled",
"data": {
"likes": 1,
"dislikes": 0,
"isLiked": true,
"isDisliked": false
}
}
Error response
{
"status": 404,
"success": false,
"message": "Comment not found",
"data": {}
}
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Path Parameters
Response
200
Comment liked successfully
Was this page helpful?
⌘I

