Make specific JSON API request
How to include the relationship on GET JSON API requests ?
In order to avoid making several calls when only one can be enough, you can on each resources include adequate relationships.
For example if you want to retrieve a product with its tracks and label you can do :
https//api.idol.io/api/v2/products/1?include=tracks,label
How to filter on GET JSON API requests ?
As describe on each resource list endpoints you can filter on one or several attributes.
For example if you want to retrieve all the acrtive products from a specific label, you can do :
https//api.idol.io/api/v2/products?filter[label-id]=1&filter[active]=true
How to sort on GET JSON API requests ?
You can also ask specific sort on attribute resources.
For example if you want to retrieve your products sorting by name you can do :
https//api.idol.io/api/v2/products/1?sort=name
Last updated