api
Raw HTTP escape hatch for any Shoplazza API endpoint. Use this when you need to call an endpoint not covered by other commands.
rest
Send a raw HTTP request to any Shoplazza API endpoint.
shoplazza api rest <METHOD> <PATH> [flags]
Positional arguments
<method>— HTTP method (GET,POST,PUT,DELETE,PATCH)<path>— API path (e.g./openapi/2026-01/products)
Flags
| Flag | Type | Description |
|---|---|---|
--params <json> | string | Query parameters as JSON (supports - for stdin or @file) |
--data <json> | string | Request body as JSON (supports - for stdin or @file) |
--jq, -q <expr> | string | jq expression to filter JSON output |
--dry-run | bool | Print the request that would be sent without executing it |
Examples
# GET request
shoplazza api rest GET /openapi/2026-01/products
shoplazza api rest GET /openapi/2026-01/products --params '{"page_size":10}'
# POST with inline JSON
shoplazza api rest POST /openapi/2026-01/products --data '{"product":{"title":"Test"}}'
# POST with file
shoplazza api rest POST /openapi/2026-01/products --data @product.json
# POST with stdin
echo '{"product":{"title":"Test"}}' | shoplazza api rest POST /openapi/2026-01/products --data -
# PUT request
shoplazza api rest PUT /openapi/2026-01/products/123 --data '{"product":{"title":"Updated"}}'
# DELETE request
shoplazza api rest DELETE /openapi/2026-01/products/123
# With jq filtering
shoplazza api rest GET /openapi/2026-01/products --jq '.products[].title'
# Dry run (preview request without executing)
shoplazza api rest GET /openapi/2026-01/orders --dry-run
When to use raw API
Use api rest when:
- You need to call an endpoint not yet covered by API commands
- You want full control over request parameters
- You are experimenting with new API features
For most use cases, prefer shortcuts or API commands which provide type checking and smart defaults.