Изменить пиксель
Changes a pixel, same as Edit in Tools -> Pixels. Send pixel_id and only the fields to change: a field left out keeps its value. An empty string clears pixel_name, test_event_code and event_source_url. access_token left out or empty keeps the stored token. events, when sent, replaces the whole mapping. The platform of a pixel cannot be changed.
Every campaign the pixel is attached to picks the change up at once. A check is sent to the platform after the save, like on create.
Typical use: clear test_event_code when the test is done, replace an expired token, or give renewals their own event.
Errors (status: "error", HTTP 200):
404Pixel not found: unknown id or not your pixel.422pixel_id is required.422platform_pixel_id cannot be empty.422the event, address and length messages of the create endpoint.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, read the pixel list before repeating it.
pixel_id и только то, что меняется.
Как читаются поля
Что происходит дальше
Все кампании, к которым привязан пиксель, получают изменение сразу, привязывать его заново не нужно. После каждого сохранения на платформу уходит проверка, см. проверку пикселя.Типовые запросы
new_renewal. Как считаются продления, описано в статье Пиксели рекламных платформ.
Ошибки
Авторизации
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.