Get Campaign

GET /a/campaigns/{campaignId}

Fetch one campaign by ID, in the same shape as an item of the Campaigns API list.

Authentication

Domain ID — your network's tenant ID (header: X-Domain-Id)

API Key (header: X-Api-Key)

Secret Key (header: X-Api-Secret)

No API key yet? Start a 14-day free trial and generate a key from your dashboard's security settings. No credit card required.

Parameters

NameInTypeRequiredDescription
campaignIdpathintegerYes

Responses

StatusDescription
200Campaign fetched
404Campaign not found

Response fields (inside data)

FieldTypeDescription
campaignIdinteger
advertiserIdinteger
advertiseId deprecatedintegerMisspelled duplicate of advertiserId; will be removed.
campaignNamestring
statusstring (active | pending | ended)
visibilitystring (public | requireapproval | private)public: any affiliate can run it; requireapproval: affiliates apply first; private: only affiliates you assign.
previewUrlstring
urlstringDestination (offer) URL, with tracking macros such as {click_id}.
paymentModelstringPayment model code, e.g. CPA, CPL, CPS, CPI.
payoutnumber | stringWhat the affiliate earns per conversion: a number, or a string such as "12.5%" when the payment model is a percentage of the sale (CPS, CPAS, RevShare, IB).
revenuenumber | stringWhat the advertiser pays you per conversion; same format as payout.
currencystring
startDatestringY-m-d H:i:s, in the campaign timezone.
endDatestringY-m-d H:i:s, in the campaign timezone.
descriptionstringPlain text (HTML removed).
termsstringPlain text (HTML removed).
categoriesarray of strings
eventsarray of objectsConversion events (goals) of the campaign.
events[].namestring
events[].tokenstringEvent token to send in postbacks.
targetingRulesarray of objectsActive targeting rules.
targetingRules[].idinteger
targetingRules[].namestring
targetingRules[].action_onstringWhich traffic the rule acts on, e.g. All, Click Only, Conversion only.
targetingRules[].conditionsarray of objectsConditions (field, operator, value).
targetingRules[].fallback_urlstring
targetingRules[].fallback_campaign_idinteger
cappingRulesarray of objectsActive caps.
cappingRules[].idinteger
cappingRules[].namestring
cappingRules[].cap_typestring (shared | individual)shared: one cap for all affiliates together; individual: a cap per affiliate.
cappingRules[].typestring (gross_clicks | unique_clicks | gross_conversions | approved_conversions | pending_conversions)What is counted against the cap.
cappingRules[].periodstring (hourly | daily | weekly | monthly)How often the cap resets.
cappingRules[].valueintegerCap limit per period.
cappingRules[].over_cap_actionstring (stop | conversion_accept | conversion_reject | conversion_pending)Once the cap is reached: stop = stop the campaign; conversion_accept / conversion_reject / conversion_pending = keep tracking and mark further conversions approved, rejected or pending.
cappingRules[].eventstringEvent token(s) the cap counts, if limited to events.
cappingRules[].timezonestringTimezone the cap period resets in.
payoutRulesarray of objectsActive payout rules (prices that override the campaign price when their conditions match).
payoutRules[].idinteger
payoutRules[].namestring
payoutRules[].modelstring
payoutRules[].conditionsarray of objects
payoutRules[].affiliate_pricenumber | stringWhat the affiliate earns under this rule (number, or "x%" for percentage models).
payoutRules[].advertiser_pricenumber | stringWhat the advertiser pays under this rule (number, or "x%").
payoutRules[].currencystring
creativesarray of objectsApproved creatives. file is set for banner_image, video and email; email for email; content for html_ad and sms_text.
creatives[].idinteger
creatives[].titlestring
creatives[].typestringBanner Image, Email Creative, SMS Text, Video or Html ad.
creatives[].fileobject
creatives[].file.urlstring
creatives[].file.namestring
creatives[].file.content_typestring
creatives[].emailobject
creatives[].email.sender_namestring
creatives[].email.subject_linestring
creatives[].contentobject
creatives[].content.codestring
landingPagesarray of objects
landingPages[].namestring
landingPages[].urlstring
landingPages[].typestring