01Jobs it does
Each one is a real command line. Copy it, or open it in the builder below to change it.
affiliate networks
Also: offer categories
p202 aff-network list02What you get
Captured from the real binary, run against a demo store with 30 days of traffic. Switch tabs to see the same run as JSON, the shape scripts and agents parse.
$ p202 aff-network list aff_network_id aff_network_name dni_network_id etag user_id version -------------- ---------------- -------------- ------------------------------------------ ------- ---------------------------------------- 4 Local Bakery "b5880c20f05f5d0ed5664a41557fdcd31f072784" 1 b5880c20f05f5d0ed5664a41557fdcd31f072784 3 Retail "7a6f2b843d3b43eed24ac8027d62d5f4820df399" 1 7a6f2b843d3b43eed24ac8027d62d5f4820df399 2 SaaS Signups "9ae555881e02d890b44c1bceb385657affa5c6c4" 1 9ae555881e02d890b44c1bceb385657affa5c6c4 1 Online Store "a54b836587ffabd08cbde93405e60c1b5610ad52" 1 a54b836587ffabd08cbde93405e60c1b5610ad52 Total: 4 | Limit: 50 | Offset: 0
$ p202 aff-network list --json { "data": [ { "aff_network_id": 4, "aff_network_name": "Local Bakery", "dni_network_id": null, "etag": "\"b5880c20f05f5d0ed5664a41557fdcd31f072784\"", "user_id": 1, "version": "b5880c20f05f5d0ed5664a41557fdcd31f072784" }, { "aff_network_id": 3, "aff_network_name": "Retail", "dni_network_id": null, "etag": "\"7a6f2b843d3b43eed24ac8027d62d5f4820df399\"", "user_id": 1, "version": "7a6f2b843d3b43eed24ac8027d62d5f4820df399" }, { "aff_network_id": 2, "aff_network_name": "SaaS Signups", "dni_network_id": null, "etag": "\"9ae555881e02d890b44c1bceb385657affa5c6c4\"", "user_id": 1, "version": "9ae555881e02d890b44c1bceb385657affa5c6c4" }, { "aff_network_id": 1, "aff_network_name": "Online Store", "dni_network_id": null, "etag": "\"a54b836587ffabd08cbde93405e60c1b5610ad52\"", "user_id": 1, "version": "a54b836587ffabd08cbde93405e60c1b5610ad52" } ], "pagination": { "cursor": null, "cursor_expires_at": null, "limit": 50, "offset": 0, "total": 4 } }
03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 aff-network listSet flags below; the command updates as you type.
04Flags
5 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --allbool | Fetch all rows across pages |
| --limit, -lstring | Max results |
| --offset, -ostring | Pagination offset |
| --pagestring | Page number |
| --resolve-namesbool | Resolve foreign key IDs to names |
05For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands aff-network list --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
{
"path": "p202 aff-network list",
"use": "list",
"short": "List categories (affiliate networks)",
"runnable": true,
"tasks": [
{
"run": "p202 aff-network list",
"ui_pages": [
"Setup › Categories"
],
"phrases": [
"affiliate networks",
"offer categories"
]
}
],
"flags": [
{
"name": "all",
"type": "bool",
"default": "false",
"usage": "Fetch all rows across pages",
"required": false
},
{
"name": "limit",
"shorthand": "l",
"type": "string",
"default": "",
"usage": "Max results",
"required": false
},
{
"name": "offset",
"shorthand": "o",
"type": "string",
"default": "",
"usage": "Pagination offset",
"required": false
},
{
"name": "page",
"type": "string",
"default": "",
"usage": "Page number",
"required": false
},
{
"name": "resolve-names",
"type": "bool",
"default": "false",
"usage": "Resolve foreign key IDs to names",
"required": false
}
]
}