Skip to content

Expand Queries

Some of our endpoints allow you to request additional information. This is done using the expand parameter.

The expand parameter allows you to get the information you need with fewer API calls. This works because all the objects Salable have unique IDs and we link related objects together.

Tip

Using this expand parameter can help to improve overall performance, but it can slow the performance of a single response. It's best practice to limit the use to only what you need, and avoid expanding all the parameters in a long list.

Using an Expand Query

If you need to find a list of all the plans and capabilities associated to a single product, you could make two separate calls to get both of those sets of information. Or, you could make a single call using an expand parameter to get it all at once.

https://api.salable.app/products/{Product UUID}?expand=[plans,capabilities]

With this one call you will get a response with all the information you need.

You can also dot (.) separate parameters in the expand query to get recursive information. For example expand=[plans.feature] in the call above would return all details of the features inside the plans in the product you specified.