01Jobs it does
Each one is a real command line. Copy it, or open it in the builder below to change it.
affiliate offers
Also: my offers
p202 campaign 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 campaign list aff_campaign_cloaking aff_campaign_currency aff_campaign_foreign_payout aff_campaign_id aff_campaign_id_public aff_campaign_name aff_campaign_payout aff_campaign_rotate aff_campaign_url aff_campaign_url_2 aff_campaign_url_3 aff_campaign_url_4 aff_campaign_url_5 aff_network_id app_registration_id attribution_model_id etag identity_signals payout_mode user_id version --------------------- --------------------- --------------------------- --------------- ---------------------- ---------------------------- ------------------- ------------------- ------------------------------------------ ------------------ ------------------ ------------------ ------------------ -------------- ------------------- -------------------- ------------------------------------------ ---------------- ----------- ------- ---------------------------------------- 0 USD 0 7 476 Holiday Gift Cards / AU 50 0 https://example.com/au/gift-cards 3 "de3405eaa7526786433df3bd463db6e09d1a562d" 1 replace 1 de3405eaa7526786433df3bd463db6e09d1a562d 0 USD 0 6 867 Bakery Pre-orders / Local 24 0 https://example.com/bakery/preorder 4 "34bd8595600224b5a6d8a97a8e2e1bc8d374c601" 1 replace 1 34bd8595600224b5a6d8a97a8e2e1bc8d374c601 0 USD 0 5 952 Free Trial to Paid / CA 29 0 https://app.example.com/signup?plan=trial 2 "f238e96c5d3e0012a76bd71ee7c331fa37f18dee" 1 replace 1 f238e96c5d3e0012a76bd71ee7c331fa37f18dee 0 USD 0 4 946 Project Tool Pro Annual / US 348 0 https://app.example.com/pricing/pro-annual 2 "a36c43d6e03a53c07d4e7464003874f55672738a" 1 replace 1 a36c43d6e03a53c07d4e7464003874f55672738a 0 USD 0 3 136 Standing Desk Launch / UK 480 0 https://example.com/uk/desks/standing-desk 3 "9af221380b880d4dd3aaf81aa2829d0508abbe38" 1 replace 1 9af221380b880d4dd3aaf81aa2829d0508abbe38 0 USD 0 2 421 Coffee Subscription / US 32 0 https://example.com/coffee/subscribe 1 "f05c1879be2546249f1a0fc209f4b2b3a171cc95" 1 replace 1 f05c1879be2546249f1a0fc209f4b2b3a171cc95 0 USD 0 1 217 Spring Collection / US 86 0 https://example.com/shop/spring-collection 1 "94002cb2f45ca3de1d55d5ae413aa9f1da084dbb" 1 replace 1 94002cb2f45ca3de1d55d5ae413aa9f1da084dbb Total: 7 | Limit: 50 | Offset: 0
$ p202 campaign list --json { "data": [ { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 7, "aff_campaign_id_public": 476, "aff_campaign_name": "Holiday Gift Cards / AU", "aff_campaign_payout": 50, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/au/gift-cards", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 3, "app_registration_id": null, "attribution_model_id": null, "etag": "\"de3405eaa7526786433df3bd463db6e09d1a562d\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "de3405eaa7526786433df3bd463db6e09d1a562d" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 6, "aff_campaign_id_public": 867, "aff_campaign_name": "Bakery Pre-orders / Local", "aff_campaign_payout": 24, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/bakery/preorder", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 4, "app_registration_id": null, "attribution_model_id": null, "etag": "\"34bd8595600224b5a6d8a97a8e2e1bc8d374c601\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "34bd8595600224b5a6d8a97a8e2e1bc8d374c601" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 5, "aff_campaign_id_public": 952, "aff_campaign_name": "Free Trial to Paid / CA", "aff_campaign_payout": 29, "aff_campaign_rotate": 0, "aff_campaign_url": "https://app.example.com/signup?plan=trial", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 2, "app_registration_id": null, "attribution_model_id": null, "etag": "\"f238e96c5d3e0012a76bd71ee7c331fa37f18dee\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "f238e96c5d3e0012a76bd71ee7c331fa37f18dee" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 4, "aff_campaign_id_public": 946, "aff_campaign_name": "Project Tool Pro Annual / US", "aff_campaign_payout": 348, "aff_campaign_rotate": 0, "aff_campaign_url": "https://app.example.com/pricing/pro-annual", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 2, "app_registration_id": null, "attribution_model_id": null, "etag": "\"a36c43d6e03a53c07d4e7464003874f55672738a\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "a36c43d6e03a53c07d4e7464003874f55672738a" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 3, "aff_campaign_id_public": 136, "aff_campaign_name": "Standing Desk Launch / UK", "aff_campaign_payout": 480, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/uk/desks/standing-desk", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 3, "app_registration_id": null, "attribution_model_id": null, "etag": "\"9af221380b880d4dd3aaf81aa2829d0508abbe38\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "9af221380b880d4dd3aaf81aa2829d0508abbe38" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 2, "aff_campaign_id_public": 421, "aff_campaign_name": "Coffee Subscription / US", "aff_campaign_payout": 32, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/coffee/subscribe", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 1, "app_registration_id": null, "attribution_model_id": null, "etag": "\"f05c1879be2546249f1a0fc209f4b2b3a171cc95\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "f05c1879be2546249f1a0fc209f4b2b3a171cc95" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 1, "aff_campaign_id_public": 217, "aff_campaign_name": "Spring Collection / US", "aff_campaign_payout": 86, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/shop/spring-collection", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 1, "app_registration_id": null, "attribution_model_id": null, "etag": "\"94002cb2f45ca3de1d55d5ae413aa9f1da084dbb\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "94002cb2f45ca3de1d55d5ae413aa9f1da084dbb" } ], "pagination": { "cursor": null, "cursor_expires_at": null, "limit": 50, "offset": 0, "total": 7 } }
$ p202 campaign list --with-stats --period last30 Clicks Conversions Revenue Cost Profit aff_campaign_cloaking aff_campaign_currency aff_campaign_foreign_payout aff_campaign_id aff_campaign_id_public aff_campaign_name aff_campaign_payout aff_campaign_rotate aff_campaign_url aff_campaign_url_2 aff_campaign_url_3 aff_campaign_url_4 aff_campaign_url_5 aff_network_id app_registration_id attribution_model_id etag identity_signals payout_mode user_id version ------ ----------- ------- ------ ------- --------------------- --------------------- --------------------------- --------------- ---------------------- ---------------------------- ------------------- ------------------- ------------------------------------------ ------------------ ------------------ ------------------ ------------------ -------------- ------------------- -------------------- ------------------------------------------ ---------------- ----------- ------- ---------------------------------------- 288 13 1450 119.54 1330.46 0 USD 0 7 476 Holiday Gift Cards / AU 50 0 https://example.com/au/gift-cards 3 "de3405eaa7526786433df3bd463db6e09d1a562d" 1 replace 1 de3405eaa7526786433df3bd463db6e09d1a562d 238 18 1380 27 1353 0 USD 0 6 867 Bakery Pre-orders / Local 24 0 https://example.com/bakery/preorder 4 "34bd8595600224b5a6d8a97a8e2e1bc8d374c601" 1 replace 1 34bd8595600224b5a6d8a97a8e2e1bc8d374c601 298 18 522 391.90 130.10 0 USD 0 5 952 Free Trial to Paid / CA 29 0 https://app.example.com/signup?plan=trial 2 "f238e96c5d3e0012a76bd71ee7c331fa37f18dee" 1 replace 1 f238e96c5d3e0012a76bd71ee7c331fa37f18dee 308 10 4440 499.20 3940.80 0 USD 0 4 946 Project Tool Pro Annual / US 348 0 https://app.example.com/pricing/pro-annual 2 "a36c43d6e03a53c07d4e7464003874f55672738a" 1 replace 1 a36c43d6e03a53c07d4e7464003874f55672738a 438 8 3551 424.30 3126.70 0 USD 0 3 136 Standing Desk Launch / UK 480 0 https://example.com/uk/desks/standing-desk 3 "9af221380b880d4dd3aaf81aa2829d0508abbe38" 1 replace 1 9af221380b880d4dd3aaf81aa2829d0508abbe38 544 30 1116 214.59 901.41 0 USD 0 2 421 Coffee Subscription / US 32 0 https://example.com/coffee/subscribe 1 "f05c1879be2546249f1a0fc209f4b2b3a171cc95" 1 replace 1 f05c1879be2546249f1a0fc209f4b2b3a171cc95 787 24 3378 356.45 3021.55 0 USD 0 1 217 Spring Collection / US 86 0 https://example.com/shop/spring-collection 1 "94002cb2f45ca3de1d55d5ae413aa9f1da084dbb" 1 replace 1 94002cb2f45ca3de1d55d5ae413aa9f1da084dbb Total: 7 | Limit: 50 | Offset: 0
$ p202 campaign list --with-stats --period last30 --json { "data": [ { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 7, "aff_campaign_id_public": 476, "aff_campaign_name": "Holiday Gift Cards / AU", "aff_campaign_payout": 50, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/au/gift-cards", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 3, "app_registration_id": null, "attribution_model_id": null, "etag": "\"de3405eaa7526786433df3bd463db6e09d1a562d\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 288, "total_cost": 119.54, "total_income": 1450, "total_leads": 13, "total_net": 1330.46, "user_id": 1, "version": "de3405eaa7526786433df3bd463db6e09d1a562d" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 6, "aff_campaign_id_public": 867, "aff_campaign_name": "Bakery Pre-orders / Local", "aff_campaign_payout": 24, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/bakery/preorder", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 4, "app_registration_id": null, "attribution_model_id": null, "etag": "\"34bd8595600224b5a6d8a97a8e2e1bc8d374c601\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 238, "total_cost": 27, "total_income": 1380, "total_leads": 18, "total_net": 1353, "user_id": 1, "version": "34bd8595600224b5a6d8a97a8e2e1bc8d374c601" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 5, "aff_campaign_id_public": 952, "aff_campaign_name": "Free Trial to Paid / CA", "aff_campaign_payout": 29, "aff_campaign_rotate": 0, "aff_campaign_url": "https://app.example.com/signup?plan=trial", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 2, "app_registration_id": null, "attribution_model_id": null, "etag": "\"f238e96c5d3e0012a76bd71ee7c331fa37f18dee\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 298, "total_cost": 391.9, "total_income": 522, "total_leads": 18, "total_net": 130.1, "user_id": 1, "version": "f238e96c5d3e0012a76bd71ee7c331fa37f18dee" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 4, "aff_campaign_id_public": 946, "aff_campaign_name": "Project Tool Pro Annual / US", "aff_campaign_payout": 348, "aff_campaign_rotate": 0, "aff_campaign_url": "https://app.example.com/pricing/pro-annual", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 2, "app_registration_id": null, "attribution_model_id": null, "etag": "\"a36c43d6e03a53c07d4e7464003874f55672738a\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 308, "total_cost": 499.2, "total_income": 4440, "total_leads": 10, "total_net": 3940.8, "user_id": 1, "version": "a36c43d6e03a53c07d4e7464003874f55672738a" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 3, "aff_campaign_id_public": 136, "aff_campaign_name": "Standing Desk Launch / UK", "aff_campaign_payout": 480, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/uk/desks/standing-desk", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 3, "app_registration_id": null, "attribution_model_id": null, "etag": "\"9af221380b880d4dd3aaf81aa2829d0508abbe38\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 438, "total_cost": 424.3, "total_income": 3551, "total_leads": 8, "total_net": 3126.7, "user_id": 1, "version": "9af221380b880d4dd3aaf81aa2829d0508abbe38" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 2, "aff_campaign_id_public": 421, "aff_campaign_name": "Coffee Subscription / US", "aff_campaign_payout": 32, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/coffee/subscribe", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 1, "app_registration_id": null, "attribution_model_id": null, "etag": "\"f05c1879be2546249f1a0fc209f4b2b3a171cc95\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 544, "total_cost": 214.59, "total_income": 1116, "total_leads": 30, "total_net": 901.41, "user_id": 1, "version": "f05c1879be2546249f1a0fc209f4b2b3a171cc95" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 1, "aff_campaign_id_public": 217, "aff_campaign_name": "Spring Collection / US", "aff_campaign_payout": 86, "aff_campaign_rotate": 0, "aff_campaign_url": "https://example.com/shop/spring-collection", "aff_campaign_url_2": null, "aff_campaign_url_3": null, "aff_campaign_url_4": null, "aff_campaign_url_5": null, "aff_network_id": 1, "app_registration_id": null, "attribution_model_id": null, "etag": "\"94002cb2f45ca3de1d55d5ae413aa9f1da084dbb\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 787, "total_cost": 356.45, "total_income": 3378, "total_leads": 24, "total_net": 3021.55, "user_id": 1, "version": "94002cb2f45ca3de1d55d5ae413aa9f1da084dbb" } ], "pagination": { "cursor": null, "cursor_expires_at": null, "limit": 50, "offset": 0, "total": 7 } }
$ p202 campaign list --fields aff_campaign_id,aff_campaign_name,aff_campaign_payout aff_campaign_id aff_campaign_name aff_campaign_payout --------------- ---------------------------- ------------------- 7 Holiday Gift Cards / AU 50 6 Bakery Pre-orders / Local 24 5 Free Trial to Paid / CA 29 4 Project Tool Pro Annual / US 348 3 Standing Desk Launch / UK 480 2 Coffee Subscription / US 32 1 Spring Collection / US 86 Total: 7 | Limit: 50 | Offset: 0
03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 campaign listSet flags below; the command updates as you type.
04Flags
11 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --aff-network-idstring | Filter by affiliate network ID (from p202 aff-network list) |
| --allbool | Fetch all rows across pages |
| --daysint | Stats window for --with-stats in days, ending now (ignored when --period is given) |
| --limit, -lstring | Max results |
| --min-clicksint | With --with-stats: only campaigns with at least N clicks in the window (searches every page) |
| --offset, -ostring | Pagination offset |
| --pagestring | Page number |
| --periodstring | Stats window for --with-stats (default last30): today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltimetodayyesterdaylast7last14last30last90thismonthlastmonththisyearlastyearalltime |
| --resolve-namesbool | Resolve foreign key IDs to names |
| --url-containsstring | Only campaigns with a URL containing this text (case-insensitive; searches every page; fields: aff_campaign_url, aff_campaign_url_2, aff_campaign_url_3, aff_campaign_url_4, aff_campaign_url_5) |
| --with-statsbool | Add each campaign's traffic in the window: total_clicks, total_leads, total_income, total_cost, total_net (0 when none; needs the reports:read scope) |
05For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands campaign 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 campaign list",
"use": "list",
"short": "List campaigns (affiliate offers with URLs, payouts, and postback settings)",
"runnable": true,
"tasks": [
{
"run": "p202 campaign list",
"ui_pages": [
"Setup › Campaigns"
],
"phrases": [
"affiliate offers",
"my offers"
]
}
],
"flags": [
{
"name": "aff-network-id",
"type": "string",
"default": "",
"usage": "Filter by affiliate network ID (from `p202 aff-network list`)",
"required": false
},
{
"name": "all",
"type": "bool",
"default": "false",
"usage": "Fetch all rows across pages",
"required": false
},
{
"name": "days",
"type": "int",
"default": "0",
"usage": "Stats window for --with-stats in days, ending now (ignored when --period is given)",
"required": false
},
{
"name": "limit",
"shorthand": "l",
"type": "string",
"default": "",
"usage": "Max results",
"required": false
},
{
"name": "min-clicks",
"type": "int",
"default": "0",
"usage": "With --with-stats: only campaigns with at least N clicks in the window (searches every page)",
"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": "period",
"type": "string",
"default": "",
"usage": "Stats window for --with-stats (default last30): today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltime",
"allowed_values": [
"today",
"yesterday",
"last7",
"last14",
"last30",
"last90",
"thismonth",
"lastmonth",
"thisyear",
"lastyear",
"alltime"
],
"required": false
},
{
"name": "resolve-names",
"type": "bool",
"default": "false",
"usage": "Resolve foreign key IDs to names",
"required": false
},
{
"name": "url-contains",
"type": "string",
"default": "",
"usage": "Only campaigns with a URL containing this text (case-insensitive; searches every page; fields: aff_campaign_url, aff_campaign_url_2, aff_campaign_url_3, aff_campaign_url_4, aff_campaign_url_5)",
"required": false
},
{
"name": "with-stats",
"type": "bool",
"default": "false",
"usage": "Add each campaign's traffic in the window: total_clicks, total_leads, total_income, total_cost, total_net (0 when none; needs the reports:read scope)",
"required": false
}
]
}