Skip to content

Add Review Reply

Create a reply for a review

POST /1.0/review_replies.json

Query parameters

id int (required)

The unique webshop ID.

code string (required)

Your personal API code.

Body Parameters (JSON)

review_id integer (required)

The ID of the review to reply to

reply string (required)

The reply text content

Example:

{
    "review_id": 1234,
    "reply": "Public reply text"
}

Response

Success (200 OK)

{
    "status": "success",
    "message": "Reply successfully added"
}

Error Responses

Bad Request (400)
{
    "status": "error",
    "message": "Review ID and reply text are required"
}
Not Found (404)
{
    "status": "error",
    "message": "Review not found"
}
Unauthorized (401)
{
    "status": "error",
    "message": "Unauthorized"
}

Example code

<?php

$id = 1;
$code = '123456789abc123456789';

$post = [
    'review_id' => 1234,
    'reply' => 'Public reply text'
];

$curl = curl_init(
    sprintf(
        'https://dashboard.webwinkelkeur.nl/api/1.0/review_replies.json?id=%s&code=%s',
        $id,
        $code,
    ),
);

curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Content-Type:application/json'],
    CURLOPT_POSTFIELDS => json_encode($post),
    CURLOPT_TIMEOUT => 10,
]);

$response = curl_exec($curl);

if ($response !== false) {
    $data = json_decode($response, true);

    /*
    $data = [
        "status": "success",
        "message": "Reply successfully added"
    ];
    */
} else {``
    // An error occurred
}

Notes

  • The reply text will be trimmed of whitespace
  • The reply will be saved as a public type reply without sending notification to the customer