Skip to content
For developers

Code samples

1 min read

Every sample sends one invitation and prints the response. Replace YOUR_API_KEY with your key. Start with the test key: you will get 202 and "test": true, and no email is sent.

The language you choose stays chosen on all the pages.

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"}'

The details (customer@example.gr, Maria, 1001) are made up. Send your own.

  • Call it after the order is completed, and do not let an error or a slow answer stop the customer’s order. All the samples have a time limit of 10 seconds.
  • The key stays on the server. Never in code that runs in the customer’s browser.
  • Retrying is safe: the same order is not sent twice.
  • For the response codes, see responses and errors.