Pagination & filtering
How to narrow, page through, and project result sets across Shoplazza CLI commands.
Filtering with shortcuts
Search shortcuts accept named filter flags. For example, customers +search:
shoplazza customers +search --email [email protected]
shoplazza customers +search --since 2026-01-01 --until 2026-01-31
Each domain exposes its own filters — run shoplazza <topic> +search --help to see them. Discover what a leaf command accepts with schema introspection:
shoplazza schema orders.list --view request
The API ignores query parameters it does not recognize, so a filter that never reaches it returns the unfiltered set with "ok": true. Before trusting a filtered read, check which parameters go on the wire with --dry-run, and compare +count with and without the filter:
shoplazza orders +search --email [email protected] --dry-run
shoplazza orders +count
shoplazza orders +count --email [email protected]
Paging
Search shortcuts return a single page (the API default is 10 records). Set the page size with --page-limit (1–250):
shoplazza customers +search --page-limit 50
The response reports has_more and a cursor. Shortcuts have no cursor flag; fetch the next page with the matching API command and pass the cursor in --params:
shoplazza customers list --params '{"page_size": 250, "cursor": "<cursor from the previous page>"}'
Parameter names vary by endpoint (products list uses per_page); check them with shoplazza schema <module>.list --view request.
Some API and app commands use offset/limit instead:
shoplazza app versions --offset 0 --limit 20
Always check whether a response reports more pages before assuming a list is complete, and page until it is exhausted — treat any has_more other than true as the last page.
Projecting fields
products +search asks the API for specific fields with --fields; pair it with --format table:
shoplazza products +search --keyword shirt --fields "id,title,price_min" --format table
Filtering output with --jq
Post-filter any JSON output with a jq expression. At an interactive terminal, where the default format is pretty, add --format json:
# IDs only
shoplazza products list --format json --jq '.data.products[].id'
# Selected fields
shoplazza orders list --format json --jq '.data.orders[] | {id, status, total_price}'
# Count
shoplazza products list --format json --jq '.data.products | length'
--fields (on products +search) limits what the API returns; --jq transforms what you already received. Use --fields to reduce payload, --jq to reshape it.