Intro to API Reference

Intro to API reference

Yotpo provides a simple and powerful REST API to integrate rewards into your business or application. This API reference provides information on available endpoints and how to interact with them.

Under each API reference page, you can view code examples on the right, and switch the programming language of the examples using the tabs above. We provide examples in Curl, Ruby, Java - and for Events, JavaScript.

Rate limiting

We impose a rate limit of 25 requests/second (1,500 requests/minute) per merchant on all API requests. You’ll receive a 429 Too Many Requests error message if you reach this limit.

To improve the experience for all of our users, beginning July 1, 2022 we will reduce our rate limit to 5 requests/second.

You can check how many requests you have left using the RateLimit-Remaining header. This header is sent in response to your API request.

To avoid rate limit errors, we recommend you follow these best practices:

  • Optimize your code to only get the data that your app requires
  • Use caching for data that your app uses often
  • Regulate the rate of your requests for smoother distribution
  • Include code that catches errors. If you ignore these errors and keep trying to make requests, then your app
    won’t be able to recover as it should
  • To manage your app’s behavior dynamically, be sure to include metadata about your app’s API usage with all
    API responses
  • Optimize your code to stop making additional API requests until enough time has passed to retry