Fairwayrock API

Welcome to the Fairwayrock API documentation.

Fairwayrock.com have RESTful API for searching products and getting result directly in JSON form.

This is the API URL: https://fairwayrock.com/api/search-products?search=&token=&limit=


Parameters


The API has 3 parameters, 2 are compulsory and 1 is optional.

  • 1) Search (string): It will take a string which will be used to search from database of fairwayrock.com.
  • 2) Token (string): It is a unique token or key you have to send on every request of API, it will be assigned to you from fairwayrock.com once when we have approved the use of this API.
  • 3) Limit (integer): It is an optional parameter, it will restrict the number of products in result and by default it is set to 1000.


Requests are associated with the API key, and not with your IP address.

To keep the Fairwayrock API fast for everyone, requests must be cached for 24 hours. Also, the API is made for real human requests; do not send lots of automated queries. Systematic mass downloads are not allowed. If needed, we can increase this limit at any time - given that you've implemented the API properly.


Example

For testing purpose, you can use “test” as token.

Error handling: In case of invalid request or invalid token, a message will be received in JSON form.

https://fairwayrock.com/api/search-products?search=testerproduct&token=test



Response for this request:

{"data":[{"name":"testerproduct2","parent_category":"Other","sub_parent_category":null,"child_category":null,"price":"1","sku":"","description":"Just a tester","image_url":"https:\/\/www.fairwayrock.com\/siteadmin\/..\/siteadmin\/uploads\/5cdea483a73754.86247778.jpg","product_link":"https:\/\/www.fairwayrock.com\/product\/testerproduct2"}]}