01Jobs it does
Each one is a real command line. Copy it, or open it in the builder below to change it.
Reset Campaign Subids
p202 conversion reset-subids --aff-network-id <aff_network_id>02What you get
--json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 conversion reset-subidsSet flags below; the command updates as you type.
04Flags
4 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --aff-campaign-idstring | Only this campaign of the category (id from p202 campaign list; default: every campaign in it) |
| --aff-network-idstringrequired | The category whose subids to reset (id from p202 aff-network list; required) |
| --dry-runbool | Count the clicks and write nothing |
| --force, -fbool | Reset without asking |
05How it works
Clears every conversion of the category (--aff-network-id), or of one campaign in it (--aff-campaign-id), so a report uploaded by mistake can be uploaded again: each converted click is cleared through the ledger and the data engine rebuilds the hours. Clicks stay.
It counts the clicks first (--dry-run stops there) and asks (--force skips). Running it again is safe: it clears what is left.
Needs a role with access_to_update_section and a key with conversions:write. Cannot be staged.
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands conversion reset-subids --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.
- This command writes and cannot be staged:
--stagedis refused before anything is sent. Have a person run it, or give the agent a key without write scope.
{
"path": "p202 conversion reset-subids",
"use": "reset-subids",
"short": "Clear every conversion of a category or one of its campaigns (the UI's Reset Campaign Subids)",
"long": "Clears every conversion of the category (--aff-network-id), or of one campaign in it\n(--aff-campaign-id), so a report uploaded by mistake can be uploaded again: each converted\nclick is cleared through the ledger and the data engine rebuilds the hours. Clicks stay.\n\nIt counts the clicks first (--dry-run stops there) and asks (--force skips). Running it\nagain is safe: it clears what is left.\n\nNeeds a role with access_to_update_section and a key with conversions:write. Cannot be staged.",
"runnable": true,
"example": "p202 conversion reset-subids --aff-network-id 3 --dry-run\n p202 conversion reset-subids --aff-network-id 3 --aff-campaign-id 12 --force",
"tasks": [
{
"run": "p202 conversion reset-subids",
"ui_pages": [
"Update › Reset Campaign Subids"
]
}
],
"flags": [
{
"name": "aff-campaign-id",
"type": "string",
"default": "",
"usage": "Only this campaign of the category (id from `p202 campaign list`; default: every campaign in it)",
"required": false
},
{
"name": "aff-network-id",
"type": "string",
"default": "",
"usage": "The category whose subids to reset (id from `p202 aff-network list`; required)",
"required": false
},
{
"name": "dry-run",
"type": "bool",
"default": "false",
"usage": "Count the clicks and write nothing",
"required": false
},
{
"name": "force",
"shorthand": "f",
"type": "bool",
"default": "false",
"usage": "Reset without asking",
"required": false
}
]
}