p202 campaign list

List campaigns (affiliate offers with URLs, payouts, and postback settings)

Web UISetup › Campaigns
All commands

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 list
Web UISetup › Campaigns

02What 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
$ 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
Real output · p202 1.9.77 · demo dataexit 0
p202 campaign list --with-stats --period last30
$ 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
Real output · p202 1.9.77 · demo dataexit 0
p202 campaign list --fields aff_campaign_id,aff_campaign_name,aff_campaign_payout
$ 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
Real output · p202 1.9.77 · demo dataexit 0

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 campaign list

Set flags below; the command updates as you type.

04Flags

11 flags, plus the global flags every command takes.

FlagWhat it does
--aff-network-idstringFilter by affiliate network ID (from p202 aff-network list)
--allboolFetch all rows across pages
--daysintStats window for --with-stats in days, ending now (ignored when --period is given)
--limit, -lstringMax results
--min-clicksintWith --with-stats: only campaigns with at least N clicks in the window (searches every page)
--offset, -ostringPagination offset
--pagestringPage number
--periodstringStats window for --with-stats (default last30): today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltime
todayyesterdaylast7last14last30last90thismonthlastmonththisyearlastyearalltime
--resolve-namesboolResolve foreign key IDs to names
--url-containsstringOnly 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-statsboolAdd 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, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
p202 commands campaign list --json
{
  "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
    }
  ]
}