Skip to main content

Recipes

Copy-ready snippets that combine multiple commands for common tasks. All rely on the default JSON output and --jq filtering.

Export all product IDs

shell
shoplazza products list --jq '.data.products[].id'

Chain: get details for each product

stdout is safe to pipe, so you can feed IDs into another command:

shell
shoplazza products list --jq '.data.products[].id' \
| xargs -I {} shoplazza products get --id {}

Count open orders

shell
shoplazza orders +count --jq '.data.count'

Preview a bulk discount before creating it

shell
shoplazza discounts +rebate --target order --tiers "200:20,500:50,1000:120" --dry-run

Create a customer and capture the new ID

shell
shoplazza customers +create --email [email protected] --jq '.data.id'

Search with a table view for quick scanning

shell
shoplazza orders +search --fields "id,status,total_price" --format table

Non-interactive run in CI

shell
export SHOPLAZZA_UAT=your-token
export SHOPLAZZA_STORE=my-store.myshoplazza.com
shoplazza products +search --keyword "shirt" --jq '.data.products | length'

See also