Привязать пиксель к кампании
Attaches one of your pixels to a campaign. Same as ticking the pixel under Ad platforms in the campaign’s Postbacks window. From then on the campaign sends its events to the pixel, with the event mapping set in Tools -> Pixels.
Only this pixel changes: custom postbacks and other pixels of the campaign stay as they are. Attaching a pixel that is already attached is not an error.
Pixels work on OT tracking-link campaigns only: type smartlink_tracking or smartlink_trial on revshare/campaigns, or the OT tracking link behind a CPL campaign. campaign_id is a revc_… RevShare campaign id or a cplo_… CPL campaign id (the campaign behind that order). Completed campaigns can be changed too: they keep sending the purchases of the fans they brought.
Returns the campaign row with its new ad_pixels: the shape of revshare/campaigns for a revc_… id, of cpl/campaigns for a cplo_… id.
Errors (status: "error", HTTP 200):
404Campaign not found: unknown id or not your campaign.404Pixel not found: unknown id or not your pixel.422Ad platform pixels are only available for tracking-link campaigns.422Pixel is archived: restore it in Tools -> Pixels first.422Pixel has no enabled events: switch on at least one event in Tools -> Pixels.422Too many pixels on the campaign: 20 max.422campaign_id is requiredorpixel_id is required.409The campaign postbacks are being changed right now, try again: someone is saving the same campaign at this moment.403Access denied: missing / unknown key, or the account is not an active partner.429Rate limit exceeded (30 writes per minute per key, see theRetry-Afterheader).503Service is temporarily unavailable: the platform did not answer in time. The action may still have been applied, checkad_pixelsof the campaign before repeating it.
pixel_id берите из списка пикселей.
Какие кампании подходят
Пикселю нужен click id рекламного клика, поэтому он работает только на Smart Link кампаниях:- RevShare: кампании с
typesmartlink_trackingилиsmartlink_trial. Передавайте id видаrevc_…. - CPL: кампании, которые идут через трекинговую ссылку OT. Передавайте id вида
cplo_….
422 Ad platform pixels are only available for tracking-link campaigns. Завершённые кампании тоже можно менять: они продолжают отправлять покупки фанов, которых привели.
Что меняется
Только названный пиксель. Кастомные постбэки кампании и её остальные пиксели остаются как были. У кампании может быть до 20 пикселей. Привязка уже привязанного пикселя отвечает успехом, поэтому запрос можно безопасно повторять. В ответе приходит строка кампании с новымad_pixels: в формате RevShare-кампаний для id revc_… и в формате CPL-кампаний для id cplo_….
Ошибки
Авторизации
API key from the partner cabinet, Tools -> API (https://partners.onlytraffic.com/tools/api): up to 5 named keys per account, each Full or Read-only, ot_partners_ prefix, shown once at creation. Raw value or Bearer form. Read-only keys cannot call the POST endpoints (403 This API key is read-only); expired or revoked keys get 403 Error! Access denied.
Тело
Ответ
Success (check status; errors are also HTTP 200)