Skip to main content
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>'

Request

POST /comments/696cec2f1f6748186587748e/like
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token as Bearer <jwt>.
x-shop-idstringIdentify the shop.

Path parameters

ParameterTypeRequiredDescription
commentIdstringYesComment 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

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Path Parameters

commentId
string
required

Response

200

Comment liked successfully