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 877 Holiday Gift Cards / AU 50 0 https://example.com/au/gift-cards 3 "bdc883c1cccf4a071363084da10f6f538c721c3a" 1 replace 1 bdc883c1cccf4a071363084da10f6f538c721c3a 0 USD 0 6 663 Bakery Pre-orders / Local 24 0 https://example.com/bakery/preorder 4 "457d6928795ebd0dbbc7d71ff0e8b5435789f4f8" 1 replace 1 457d6928795ebd0dbbc7d71ff0e8b5435789f4f8 0 USD 0 5 256 Free Trial to Paid / CA 29 0 https://app.example.com/signup?plan=trial 2 "b2f55dceb18269db1371441cf226e24aa1c88d1a" 1 replace 1 b2f55dceb18269db1371441cf226e24aa1c88d1a 0 USD 0 4 243 Project Tool Pro Annual / US 348 0 https://app.example.com/pricing/pro-annual 2 "7f9a6eb346a15002ad29b571517463cde6a6eaf5" 1 replace 1 7f9a6eb346a15002ad29b571517463cde6a6eaf5 0 USD 0 3 336 Standing Desk Launch / UK 480 0 https://example.com/uk/desks/standing-desk 3 "c4d1f9ac272622d71693004af36f30c5fdb7f90d" 1 replace 1 c4d1f9ac272622d71693004af36f30c5fdb7f90d 0 USD 0 2 129 Coffee Subscription / US 32 0 https://example.com/coffee/subscribe 1 "ad5b6833f0847c3bccac6ac705cd7c20bbab450e" 1 replace 1 ad5b6833f0847c3bccac6ac705cd7c20bbab450e 0 USD 0 1 118 Spring Collection / US 86 0 https://example.com/shop/spring-collection 1 "ee67d22b23332c79171a569ac1e83160ef84f1b0" 1 replace 1 ee67d22b23332c79171a569ac1e83160ef84f1b0 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": 877, "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": "\"bdc883c1cccf4a071363084da10f6f538c721c3a\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "bdc883c1cccf4a071363084da10f6f538c721c3a" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 6, "aff_campaign_id_public": 663, "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": "\"457d6928795ebd0dbbc7d71ff0e8b5435789f4f8\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "457d6928795ebd0dbbc7d71ff0e8b5435789f4f8" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 5, "aff_campaign_id_public": 256, "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": "\"b2f55dceb18269db1371441cf226e24aa1c88d1a\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "b2f55dceb18269db1371441cf226e24aa1c88d1a" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 4, "aff_campaign_id_public": 243, "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": "\"7f9a6eb346a15002ad29b571517463cde6a6eaf5\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "7f9a6eb346a15002ad29b571517463cde6a6eaf5" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 3, "aff_campaign_id_public": 336, "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": "\"c4d1f9ac272622d71693004af36f30c5fdb7f90d\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "c4d1f9ac272622d71693004af36f30c5fdb7f90d" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 2, "aff_campaign_id_public": 129, "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": "\"ad5b6833f0847c3bccac6ac705cd7c20bbab450e\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "ad5b6833f0847c3bccac6ac705cd7c20bbab450e" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 1, "aff_campaign_id_public": 118, "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": "\"ee67d22b23332c79171a569ac1e83160ef84f1b0\"", "identity_signals": 1, "payout_mode": "replace", "user_id": 1, "version": "ee67d22b23332c79171a569ac1e83160ef84f1b0" } ], "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 ------ ----------- ------- ------ ------- --------------------- --------------------- --------------------------- --------------- ---------------------- ---------------------------- ------------------- ------------------- ------------------------------------------ ------------------ ------------------ ------------------ ------------------ -------------- ------------------- -------------------- ------------------------------------------ ---------------- ----------- ------- ---------------------------------------- 287 13 1650 119.23 1530.77 0 USD 0 7 877 Holiday Gift Cards / AU 50 0 https://example.com/au/gift-cards 3 "bdc883c1cccf4a071363084da10f6f538c721c3a" 1 replace 1 bdc883c1cccf4a071363084da10f6f538c721c3a 237 23 1593 26.82 1566.18 0 USD 0 6 663 Bakery Pre-orders / Local 24 0 https://example.com/bakery/preorder 4 "457d6928795ebd0dbbc7d71ff0e8b5435789f4f8" 1 replace 1 457d6928795ebd0dbbc7d71ff0e8b5435789f4f8 298 15 435 391.90 43.10 0 USD 0 5 256 Free Trial to Paid / CA 29 0 https://app.example.com/signup?plan=trial 2 "b2f55dceb18269db1371441cf226e24aa1c88d1a" 1 replace 1 b2f55dceb18269db1371441cf226e24aa1c88d1a 308 13 5244 499.20 4744.80 0 USD 0 4 243 Project Tool Pro Annual / US 348 0 https://app.example.com/pricing/pro-annual 2 "7f9a6eb346a15002ad29b571517463cde6a6eaf5" 1 replace 1 7f9a6eb346a15002ad29b571517463cde6a6eaf5 438 5 1907 424.30 1482.70 0 USD 0 3 336 Standing Desk Launch / UK 480 0 https://example.com/uk/desks/standing-desk 3 "c4d1f9ac272622d71693004af36f30c5fdb7f90d" 1 replace 1 c4d1f9ac272622d71693004af36f30c5fdb7f90d 545 26 988 214.97 773.03 0 USD 0 2 129 Coffee Subscription / US 32 0 https://example.com/coffee/subscribe 1 "ad5b6833f0847c3bccac6ac705cd7c20bbab450e" 1 replace 1 ad5b6833f0847c3bccac6ac705cd7c20bbab450e 787 25 3532 356.45 3175.55 0 USD 0 1 118 Spring Collection / US 86 0 https://example.com/shop/spring-collection 1 "ee67d22b23332c79171a569ac1e83160ef84f1b0" 1 replace 1 ee67d22b23332c79171a569ac1e83160ef84f1b0 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": 877, "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": "\"bdc883c1cccf4a071363084da10f6f538c721c3a\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 287, "total_cost": 119.23, "total_income": 1650, "total_leads": 13, "total_net": 1530.77, "user_id": 1, "version": "bdc883c1cccf4a071363084da10f6f538c721c3a" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 6, "aff_campaign_id_public": 663, "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": "\"457d6928795ebd0dbbc7d71ff0e8b5435789f4f8\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 237, "total_cost": 26.82, "total_income": 1593, "total_leads": 23, "total_net": 1566.18, "user_id": 1, "version": "457d6928795ebd0dbbc7d71ff0e8b5435789f4f8" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 5, "aff_campaign_id_public": 256, "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": "\"b2f55dceb18269db1371441cf226e24aa1c88d1a\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 298, "total_cost": 391.9, "total_income": 435, "total_leads": 15, "total_net": 43.1, "user_id": 1, "version": "b2f55dceb18269db1371441cf226e24aa1c88d1a" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 4, "aff_campaign_id_public": 243, "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": "\"7f9a6eb346a15002ad29b571517463cde6a6eaf5\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 308, "total_cost": 499.2, "total_income": 5244, "total_leads": 13, "total_net": 4744.8, "user_id": 1, "version": "7f9a6eb346a15002ad29b571517463cde6a6eaf5" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 3, "aff_campaign_id_public": 336, "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": "\"c4d1f9ac272622d71693004af36f30c5fdb7f90d\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 438, "total_cost": 424.3, "total_income": 1907, "total_leads": 5, "total_net": 1482.7, "user_id": 1, "version": "c4d1f9ac272622d71693004af36f30c5fdb7f90d" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 2, "aff_campaign_id_public": 129, "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": "\"ad5b6833f0847c3bccac6ac705cd7c20bbab450e\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 545, "total_cost": 214.97, "total_income": 988, "total_leads": 26, "total_net": 773.03, "user_id": 1, "version": "ad5b6833f0847c3bccac6ac705cd7c20bbab450e" }, { "aff_campaign_cloaking": 0, "aff_campaign_currency": "USD", "aff_campaign_foreign_payout": 0, "aff_campaign_id": 1, "aff_campaign_id_public": 118, "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": "\"ee67d22b23332c79171a569ac1e83160ef84f1b0\"", "identity_signals": 1, "payout_mode": "replace", "total_clicks": 787, "total_cost": 356.45, "total_income": 3532, "total_leads": 25, "total_net": 3175.55, "user_id": 1, "version": "ee67d22b23332c79171a569ac1e83160ef84f1b0" } ], "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, 6 no Pro licence on the install.
{
"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
}
]
}