Skip to content
For developers

Create an invitation

POSThttps://api.reviewit.gr/v1/invitations

Authenticate with the business's API key (Authorization: Bearer rvk_...), not with a session. With the test key (rvk_test_...) the response is the same, with test: true, but nothing is stored, sent or counted against the limit.

Send only the customer's email, their first name (optional) and the order number. The email is sent after the delay the business has set (24 hours by default) and the address is deleted as soon as it is sent, at the latest within 30 days. The same order is not sent twice, so retrying a call is safe.

If the order or the customer has already been invited (by the same business in the last 90 days), the response is 200 with state: skipped and a reason (duplicate, repeat). Nothing is sent to anyone who has asked not to receive invitations (from any business) or who has already written a review of the business, but the response is the same 202 as for a real invitation: no business is told who has reviewed it or opted out.

The business must have turned on invitations and confirmed that it tells its customers (403 invitations_disabled), have a plan (403 plan_required), and not have reached its plan's monthly limit (429 monthly_limit: Basic 300, Pro 1000, Premium 5000, Enterprise no limit).

Parameters

Headers

  • Authorization string required

    Bearer YOUR_API_KEY

    The business's API key (rvk_...), which the owner creates on the «My business» page

  • Content-Type string required

    application/json

    The body of the request is JSON.

Request body

  • email stringemailrequired

    The customer's email

  • firstName stringup to 80 characters

    The customer's first name (optional)

  • orderRef stringup to 100 charactersrequired

    Your shop's order number: one invitation per order

Example request

Terminal window
curl -X POST https://api.reviewit.gr/v1/invitations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"customer@example.gr","firstName":"Maria","orderRef":"1001"}'

Replace YOUR_API_KEY. Start with the test key: nothing is sent.

Responses

200

Nothing will be sent (skipped): the order or the customer has already been invited

  • state stringskipped
  • reason stringduplicaterepeat
  • test boolean
Example response
{
"state": "skipped",
"reason": "duplicate"
}

202

The invitation was queued for sending

  • state stringqueued
  • test boolean

    Only with the test key: nothing was queued

Example response
{
"state": "queued"
}

401

The API key is missing or wrong

403

invitations_disabled or plan_required

422

Invalid field: validation_failed, with the field and a message

  • error stringvalidation_failed
  • field string
  • message string
Example response
{
"error": "validation_failed",
"field": "email",
"message": "Invalid email address"
}

429

monthly_limit: the plan's monthly limit has been reached

What to do for each response: responses and errors.