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                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
Real output · p202 1.9.78 · 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
------  -----------  -------  ------  -------  ---------------------  ---------------------  ---------------------------  ---------------  ----------------------  ----------------------------  -------------------  -------------------  ------------------------------------------  ------------------  ------------------  ------------------  ------------------  --------------  -------------------  --------------------  ------------------------------------------  ----------------  -----------  -------  ----------------------------------------
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
Real output · p202 1.9.78 · 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.78 · 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, 6 no Pro licence on the install.
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
    }
  ]
}