Mevcut kampanyaları değiştirme
Metin, bağlantı, teklif, günlük sınır, zamanlama, bütçe ve yayını yönetin. Toplu istek 1.000 kampanyaya kadar destekler. Görevde kısmi hataları kontrol edin.
Tüm aramalar burada Kampanyaları Yönetmek ve Manager (veya sahibi) kabine erişimi ile bir anahtar gerektirir. Onlar bir kampanya üzerinde hareket, (account_id, ad_id) : geç account_id vücuda veya anahtar birkaç kabine ulaştığında sorgulama. Her değişiklik kampanyanın geçmişinde görünür panelde işaretlenmiş 🔌 API .
| İletişim | ne yapıyor | Cevaplar |
|---|---|---|
PATCH /v1/campaigns/{ad_id} | metin, link, bid, cap, program değişikliği, on/off | Hızlıca |
POST /v1/campaigns/{ad_id}/pause | Sıkıştırma | Hızlıca |
POST /v1/campaigns/{ad_id}/resume | Swit on | Hızlıca |
POST /v1/campaigns/{ad_id}/budget | Bütçeyi eklemek veya geri çekmek | Hızlıca |
DELETE /v1/campaigns/{ad_id} | silin | Hızlıca |
POST /v1/campaigns/{ad_id}/copy | 1 - 100 kopya | 202 + Görev |
POST /v1/campaigns/bulk | 1000 kampanyaya kadar bir eylem | 202 + Görev |
Doğrudan cevaplar data'de güncellenmiş Kampanya Object'i iade eder.
Düzenleme
PATCH /v1/campaigns/{ad_id} - Sadece değişiklikleri gönderin.
curl -s -X PATCH https://orbitoads.pro/api/v1/campaigns/90412 \
-H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \
-d '{ "account_id": 53, "cpm": 1.8, "text": "Daily market notes in 3 minutes." }'| alanı | anlamı |
|---|---|
title, text, promote_url | Yaratıcı ve bağlantı |
cpm | Yeni teklif, 0'dan daha büyük. |
daily_budget | Günlük kapı |
views_per_user | 1–4. |
active | true / false - tekrar / dinlenme gibi. |
schedule | Reklamı göstermek için günler ve saatler; null kaldırır — bakınız Programı . |
media, picture, button, website_name | Tıpkı Yaratmak'de olduğu gibi. |
Telegram’ın incelemesi ne olacak? Değiştirmek cpm , active veya schedule değil - onlar tek seferde uygulanır ve kampanya devam ediyor. herhangi bir diğer alan ( title , text , promote_url , media , picture , button , website_name , views_per_user , daily_budget ) ile kaydedilir Telegram 's tam reklam formu, ve Telegram yeniden reklamı incelemek: onaylanana kadar In Review gösterir. teklif göndermek, on/off ve zamanlama değişiklikleri kendi, bu alanlarla birlikte değil.
Hedef ( channels, countries, ...) mevcut bir reklamda değişemez - Telegram buna izin vermez. yeni hedef ile yeni bir kampanya oluşturun, ya da kopyalan ve ayarlayın.
meta cevap için:
| alanı | anlamı |
|---|---|
status_warning | Alanlar kaydedildi, ancak Telegram açma / kapatma anahtarı uygulanmadı (örneğin, bütçe yok). |
status_intent_only | On/off seçeneğiniz kaydedilir ve Telegram'in yapabileceği zaman geçerlidir (yorumda, bütçe yok). |
status_already_set | Kampanya zaten istediğiniz devletteydi. |
Bu hedef için Telegram’in altındaki bir teklif, param: "cpm", min_cpm ve currency ile 400 PLATFORM_REJECTED’yi geri getirir.
Durdurma ve sürdürme
curl -s -X POST "https://orbitoads.pro/api/v1/campaigns/90412/pause?account_id=53" -H "X-API-Key: $ORBITO_API_KEY"
curl -s -X POST "https://orbitoads.pro/api/v1/campaigns/90412/resume?account_id=53" -H "X-API-Key: $ORBITO_API_KEY"meta.intent_only: true Telegram’ın bu kampanyaya hala harekete geçemediği anlamına gelir – kampanya inceleniyor, reddediliyor ya da bütçeden çıkıyor – ve seçiminiz kaydedildi: mümkün olduğunca çabucak çalışıyor. Eğer durum değiştiğinde, gerçek Webhook Durumu İtfaiye
Reklam yayın takvimi
Bir kampanyayı yalnızca seçilen haftalarda ve saatlerde gösterin - örneğin haftalarda 9:00-18:00, ya da sadece akşamları. bu saatlerin dışında Telegram reklamı göstermez. bir program ayarlamak, değiştirmek veya kaldırmak kampanyayı durdurmaz veya kapatmaz - status ve active olduğu gibi kalır. her kabin tipi üzerinde çalışır.
curl -s -X PATCH https://orbitoads.pro/api/v1/campaigns/90412 \
-H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \
-d '{ "account_id": 53, "schedule": {
"days": { "mon": [9,10,11,12,13,14,15,16,17], "tue": [9,10,11,12,13,14,15,16,17],
"wed": [9,10,11,12,13,14,15,16,17], "thu": [9,10,11,12,13,14,15,16,17],
"fri": [9,10,11,12,13,14,15,16,17] },
"timezone": "+03:00" } }'| alanı | anlamı |
|---|---|
days | mon, tue, wed, thu, fri, sat, sun - Her biri o gün yürüyen saatleri (0-23) tutar. 9 anlamı 09:00–09:59Böylece [9, …, 17] O kadar 9:00–18:00. Bir gün ayrılır ya da gönderilir []Ama koşmuyor. En az 1 saat toplamda. |
timezone | "viewer" - izleyicinin kendi yerel saat; sadece seyirci hedeflemek için ( target_type: "users" ). Aksi takdirde bir UTC offset: "+03:00" , "-05:00" , "+05:30" . offset Telegram sunuyor: tam saat -12:00 ile +14:00 , artı -09:30 , -03:30 , -02:30 , +03:30 , +04:30 , +05:30 , +05:45 , +06:30 , +08:45 , +09:30 , +10:30 , +12:45 , +13:45 . "UTC+3" ve "+3" da kabul edilir. |
"schedule": null programı kaldırır - reklam tekrar saatin etrafında çalışır.
Bütçe olmayan bir kampanya bir program yapamaz. Telegram, yalnızca bir kampanyada yürütebilen bir programı kabul eder, bu nedenle Stopped Kampanya hiçbir şey bırakmadık 400 PLATFORM_REJECTED ile param: "schedule" Ve hiçbir şey değişmiyor - öncelikle bütçe eklemek, sonra programı ayarlamak. Bir gün geçirmiş (On HoldKampanya iyi gidiyor.
Kampanya nesnesi aynı biçimde zamanlamayı geri getirir, her zaman tüm yedi gün ve "+03:00" olarak yazılmış bir indirim ile - böylece okuyabilirsiniz, bir gün değiştirebilirsiniz ve geri gönderebilirsiniz. GET /v1/campaigns/{ad_id} doğrudan Telegram'te değiştirildiğinde bile geçerli zamanlamayı verir - Tebrik'e bakın. 0-23 dışındaki saatler, bilinmeyen bir gün, boş bir zamanlama, bir kanal/bot/search adında "viewer" veya bir indirim Telegram sunmuyor → 400 VALIDATION_ERROR param'de doğru alanı (örneğin schedule.days.mon).
kopyaları ve yeniden düzenlenmiş kampanyalar, gelen kampanyaların programını tutar. birden fazla kampanyaya tek seferde bir program koymak için, toplu eylem set_schedule'yi kullanın.
Kampanya bütçesi
POST /v1/campaigns/{ad_id}/budget para birim dengesi ile kampanya arasında hareket eder. Idempotency-Key gerektirir.
curl -s -X POST https://orbitoads.pro/api/v1/campaigns/90412/budget \
-H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "account_id": 53, "action": "add", "amount": 10 }'action | amount | Etkisi |
|---|---|---|
add | İhtiyaç | Kabin Eşitliği Kampanyası. |
withdraw | İhtiyaç | Kampanya → kabine dengesi. kampanyadan daha fazlası → 400 INSUFFICIENT_AD_BALANCE . |
withdraw_all | — | Kampanyaya kalan her şey kabine dengesidir. |
meta.moved Gerçekten hareket eden şey; meta.partial O kadar true Daha az talep edilen durumlar geri çekilebilir. Para asla reklam hesabını bırakmaz API.
Kampanyayı kopyalama
POST /v1/campaigns/{ad_id}/copy aynı hedefi olan kopyaları oluşturur; gönderdiğiniz her şey orijinalini aşar. Idempotency-Key gerektirir. ad_ids kopyaları olan bir görevi geri getirir.
{ "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 }| alanı | anlamı |
|---|---|
copies | 1 - 100 default 1. |
title, text, promote_url, cpm, budget, media, picture, views_per_user | budget : 0 veya en azından kabinetin min_budget kopyası için geçerlidir. |
schedule | Kopyalar orijinal Programı'i tutar; değiştirmek için birini gönderir, ya da null'yi hiçbirine karşı tutar. |
group_id / new_group_name | Kopyaları bir grupta yerleştirin. |
Silme
curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY"{ "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } }Görüntüleri olan kaldırılmış bir kampanya istatistikleri içinde kalır status: "Deleted"Hiçbir zaman koşmadığı kişi kaldırılır. Yine geri dönüşler silin 404 CAMPAIGN_NOT_FOUND.
Toplu işlemler
POST /v1/campaigns/bulk tek bir eylem için 1000 kampanyaya kadar uygulanır. Idempotency-Key gerektirir.
curl -s -X POST https://orbitoads.pro/api/v1/campaigns/bulk \
-H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "account_id": 53, "action": "set_cpm", "cpm": 1.2, "ad_ids": [90412, 90413, 90414] }'action | Ekstra alan | Etkisi |
|---|---|---|
pause | — | Sıkıştırma |
resume | — | Swit on |
add_budget | amount | Her kampanyaya katılın |
withdraw_budget | amount | Her kampanyadan çekilme |
withdraw_all_budget | — | Her kampanyadan her şeyi çıkarın |
set_cpm | cpm | Her birinde aynı teklifi yapın |
set_schedule | schedule | Programı'i her birine ayarlayın; "schedule": null onu kaldırır |
delete | — | Her birini silin |
Her ad_id bu kabinetin canlı bir kampanyası olmalıdır; aksi takdirde hiçbir şey yok ve missing'te suçlularla 400 UNKNOWN_AD_IDS'yi alıyorsunuz. Çoğaltmalar göz ardı ediliyor. Görev errors listesi kampanyaları Telegram reddediyor - set_schedule ile , aynı zamanda bütçesiz kampanyalar ve "timezone": "viewer"'nin bir seyirci hedeflemediği için başvuramayacağı kampanyalar.
İşlem başına maliyeti yüksek kampanyaları durdurma
import os, uuid, requests
API = "https://orbitoads.pro/api/v1"
H = {"X-API-Key": os.environ["ORBITO_API_KEY"]}
ACCOUNT, MAX_CPA = 53, 4.0
stats = requests.get(f"{API}/stats", params={"period": "1d"}, headers=H, timeout=60).json()["data"]
# cost per action = spend / actions, computed here so the rule means exactly that
expensive = [int(ad_id) for ad_id, s in stats.get(str(ACCOUNT), {}).items()
if s["actions"] > 0 and s["spent"] / s["actions"] > MAX_CPA]
if expensive:
r = requests.post(f"{API}/campaigns/bulk",
headers={**H, "Idempotency-Key": str(uuid.uuid4())},
json={"account_id": ACCOUNT, "action": "pause", "ad_ids": expensive},
timeout=60)
print(r.status_code, r.json()["data"]["id"])API başvurusu
Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir.
PATCH /api/v1/campaigns/{ad_id}
Kampanyada yalnızca gönderilen ayarları günceller.
| Parametre | Konum | Biçim | Zorunlu |
|---|---|---|---|
ad_id | path | integer | Evet |
account_id | query | integer | — |
X-API-Key | header | string | Evet |
Idempotency-Key | header | string | — |
curl -X PATCH 'https://orbitoads.pro/api/v1/campaigns/38017?account_id=7401' \
-H 'X-API-Key: YOUR_ORBITO_KEY' \
-H 'Content-Type: application/json' \
--data '{
"cpm": 1.4
}'{
"success": true,
"data": {
"account_id": 7401,
"ad_id": 38017,
"title": "Conversation club · November",
"text": "See this month’s language club schedule.",
"status": "Active",
"active": true,
"promote_url": "https://school.example/club",
"tme_path": null,
"target_type": "users",
"targets": [],
"cpm": "1.40",
"budget": "36.00",
"spent": "4.00",
"daily_budget": "8.00",
"views": 3200,
"opens": 0,
"clicks": 32,
"actions": 4,
"ctr": "1.00",
"cvr": "12.50",
"cpc": "0.125",
"cpa": "1.00",
"views_per_user": 2,
"schedule": null,
"has_media": false,
"media_type": null,
"button": "learn_more",
"website_name": "Example language school",
"group_id": 516,
"auto_cpm_enabled": false,
"date": "1793620800",
"synced_at": "2026-11-03T12:00:00Z",
"status_changed_at": "2026-11-03T12:00:00Z"
}
}İstek gövdesi şeması
{
"minProperties": 1,
"properties": {
"account_id": {
"type": "integer"
},
"active": {
"type": "boolean"
},
"button": {
"enum": [
"subscribe",
"view",
"read",
"learn_more",
"download",
"open",
"sign_up",
"buy",
"order",
"play",
"try",
"leave_request"
],
"type": "string"
},
"cpm": {
"exclusiveMinimum": 0,
"type": "number"
},
"daily_budget": {
"minimum": 0,
"type": "number"
},
"media": {
"type": "string"
},
"picture": {
"type": "boolean"
},
"promote_url": {
"maxLength": 2048,
"type": "string"
},
"schedule": {
"additionalProperties": false,
"properties": {
"days": {
"additionalProperties": false,
"properties": {
"fri": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"mon": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"sat": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"sun": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"thu": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"tue": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"wed": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
}
},
"type": "object"
},
"timezone": {
"type": "string"
}
},
"required": [
"days",
"timezone"
],
"type": [
"object",
"null"
]
},
"text": {
"maxLength": 4096,
"type": "string"
},
"title": {
"maxLength": 255,
"type": "string"
},
"views_per_user": {
"maximum": 4,
"minimum": 1,
"type": "integer"
},
"website_name": {
"maxLength": 255,
"type": "string"
}
},
"type": "object"
}| API | Anlamı |
|---|---|
| status_warning | Alanlar kaydedildi ancak örneğin bütçe yokluğu nedeniyle yayın durumu değişmedi. |
| status_intent_only | İstenen durum kaydedildi. İnceleme veya bütçe elverdiğinde uygulanabilir. |
| status_already_set | Kampanya zaten istenen durumdaydı. |
POST /api/v1/campaigns/{ad_id}/pause
Bir kampanyanın gösterimlerini duraklatmayı ister.
| Parametre | Konum | Biçim | Zorunlu |
|---|---|---|---|
ad_id | path | integer | Evet |
account_id | query | integer | — |
X-API-Key | header | string | Evet |
Idempotency-Key | header | string | — |
curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/pause?account_id=7401' \
-H 'X-API-Key: YOUR_ORBITO_KEY'{
"success": true,
"data": {
"account_id": 7401,
"ad_id": 38017,
"title": "Conversation club · November",
"text": "See this month’s language club schedule.",
"status": "On Hold",
"active": false,
"promote_url": "https://school.example/club",
"tme_path": null,
"target_type": "users",
"targets": [],
"cpm": "1.25",
"budget": "36.00",
"spent": "4.00",
"daily_budget": "8.00",
"views": 3200,
"opens": 0,
"clicks": 32,
"actions": 4,
"ctr": "1.00",
"cvr": "12.50",
"cpc": "0.125",
"cpa": "1.00",
"views_per_user": 2,
"schedule": null,
"has_media": false,
"media_type": null,
"button": "learn_more",
"website_name": "Example language school",
"group_id": 516,
"auto_cpm_enabled": false,
"date": "1793620800",
"synced_at": "2026-11-03T12:00:00Z",
"status_changed_at": "2026-11-03T12:00:00Z"
},
"meta": {
"intent_only": false
}
}POST /api/v1/campaigns/{ad_id}/resume
Gösterim mümkün olduğunda kampanyayı sürdürmeyi ister.
| Parametre | Konum | Biçim | Zorunlu |
|---|---|---|---|
ad_id | path | integer | Evet |
account_id | query | integer | — |
X-API-Key | header | string | Evet |
Idempotency-Key | header | string | — |
curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/resume?account_id=7401' \
-H 'X-API-Key: YOUR_ORBITO_KEY'{
"success": true,
"data": {
"account_id": 7401,
"ad_id": 38017,
"title": "Conversation club · November",
"text": "See this month’s language club schedule.",
"status": "Active",
"active": true,
"promote_url": "https://school.example/club",
"tme_path": null,
"target_type": "users",
"targets": [],
"cpm": "1.25",
"budget": "36.00",
"spent": "4.00",
"daily_budget": "8.00",
"views": 3200,
"opens": 0,
"clicks": 32,
"actions": 4,
"ctr": "1.00",
"cvr": "12.50",
"cpc": "0.125",
"cpa": "1.00",
"views_per_user": 2,
"schedule": null,
"has_media": false,
"media_type": null,
"button": "learn_more",
"website_name": "Example language school",
"group_id": 516,
"auto_cpm_enabled": false,
"date": "1793620800",
"synced_at": "2026-11-03T12:00:00Z",
"status_changed_at": "2026-11-03T12:00:00Z"
},
"meta": {
"intent_only": false
}
}POST /api/v1/campaigns/{ad_id}/budget
Hesap bakiyesi ile bir kampanya arasında bütçe taşır.
| Parametre | Konum | Biçim | Zorunlu |
|---|---|---|---|
ad_id | path | integer | Evet |
account_id | query | integer | — |
Idempotency-Key | header | string | Evet |
X-API-Key | header | string | Evet |
curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/budget?account_id=7401' \
-H 'X-API-Key: YOUR_ORBITO_KEY' \
-H 'Idempotency-Key: 2033d50c-b32b-44aa-8e40-3e236c474810' \
-H 'Content-Type: application/json' \
--data '{
"action": "add",
"amount": 5
}'{
"success": true,
"data": {
"account_id": 7401,
"ad_id": 38017,
"title": "Conversation club · November",
"text": "See this month’s language club schedule.",
"status": "Active",
"active": true,
"promote_url": "https://school.example/club",
"tme_path": null,
"target_type": "users",
"targets": [],
"cpm": "1.25",
"budget": "41.00",
"spent": "4.00",
"daily_budget": "8.00",
"views": 3200,
"opens": 0,
"clicks": 32,
"actions": 4,
"ctr": "1.00",
"cvr": "12.50",
"cpc": "0.125",
"cpa": "1.00",
"views_per_user": 2,
"schedule": null,
"has_media": false,
"media_type": null,
"button": "learn_more",
"website_name": "Example language school",
"group_id": 516,
"auto_cpm_enabled": false,
"date": "1793620800",
"synced_at": "2026-11-03T12:00:00Z",
"status_changed_at": "2026-11-03T12:00:00Z"
},
"meta": {
"action": "add",
"moved": 5,
"partial": false
}
}İstek gövdesi şeması
{
"properties": {
"account_id": {
"type": "integer"
},
"action": {
"enum": [
"add",
"withdraw",
"withdraw_all"
],
"type": "string"
},
"amount": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"action"
],
"type": "object"
}POST /api/v1/campaigns/{ad_id}/copy
Aynı hedeflemeyle en çok 100 kopyayı isteğe bağlı değişikliklerle sıraya alır.
| Parametre | Konum | Biçim | Zorunlu |
|---|---|---|---|
ad_id | path | integer | Evet |
account_id | query | integer | — |
Idempotency-Key | header | string | Evet |
X-API-Key | header | string | Evet |
curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/copy?account_id=7401' \
-H 'X-API-Key: YOUR_ORBITO_KEY' \
-H 'Idempotency-Key: 2033d50c-b32b-44aa-8e40-3e236c474811' \
-H 'Content-Type: application/json' \
--data '{
"copies": 2,
"budget": 0,
"title": "Club · second draft",
"group_id": 516
}'{
"success": true,
"data": {
"id": 96203,
"type": "copy",
"status": "pending",
"account_id": 7401,
"total": 2,
"ad_ids": []
}
}İstek gövdesi şeması
{
"properties": {
"account_id": {
"type": "integer"
},
"budget": {
"minimum": 0,
"type": "number"
},
"copies": {
"default": 1,
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"cpm": {
"exclusiveMinimum": 0,
"type": "number"
},
"group_id": {
"type": "integer"
},
"media": {
"type": "string"
},
"new_group_name": {
"type": "string"
},
"picture": {
"type": "boolean"
},
"promote_url": {
"type": "string"
},
"schedule": {
"additionalProperties": false,
"properties": {
"days": {
"additionalProperties": false,
"properties": {
"fri": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"mon": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"sat": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"sun": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"thu": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"tue": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"wed": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
}
},
"type": "object"
},
"timezone": {
"type": "string"
}
},
"required": [
"days",
"timezone"
],
"type": [
"object",
"null"
]
},
"text": {
"type": "string"
},
"title": {
"type": "string"
},
"views_per_user": {
"maximum": 4,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}POST /api/v1/campaigns/bulk
Aynı hesaptaki en çok 1.000 kampanya için tek işlemi sıraya alır.
| Parametre | Konum | Biçim | Zorunlu |
|---|---|---|---|
Idempotency-Key | header | string | Evet |
X-API-Key | header | string | Evet |
curl -X POST https://orbitoads.pro/api/v1/campaigns/bulk \
-H 'X-API-Key: YOUR_ORBITO_KEY' \
-H 'Idempotency-Key: 2033d50c-b32b-44aa-8e40-3e236c474812' \
-H 'Content-Type: application/json' \
--data '{
"account_id": 7401,
"action": "set_cpm",
"cpm": 1.4,
"ad_ids": [
38017,
38018
]
}'{
"success": true,
"data": {
"id": 96203,
"type": "cpm",
"status": "pending",
"account_id": 7401,
"total": 2,
"ad_ids": []
}
}İstek gövdesi şeması
{
"properties": {
"account_id": {
"type": "integer"
},
"action": {
"enum": [
"pause",
"resume",
"add_budget",
"withdraw_budget",
"withdraw_all_budget",
"set_cpm",
"set_schedule",
"delete"
],
"type": "string"
},
"ad_ids": {
"items": {
"type": "integer"
},
"maxItems": 1000,
"minItems": 1,
"type": "array"
},
"amount": {
"exclusiveMinimum": 0,
"type": "number"
},
"cpm": {
"exclusiveMinimum": 0,
"type": "number"
},
"schedule": {
"additionalProperties": false,
"properties": {
"days": {
"additionalProperties": false,
"properties": {
"fri": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"mon": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"sat": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"sun": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"thu": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"tue": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
},
"wed": {
"items": {
"maximum": 23,
"minimum": 0,
"type": "integer"
},
"maxItems": 24,
"type": "array"
}
},
"type": "object"
},
"timezone": {
"type": "string"
}
},
"required": [
"days",
"timezone"
],
"type": [
"object",
"null"
]
}
},
"required": [
"action",
"ad_ids"
],
"type": "object"
}DELETE /api/v1/campaigns/{ad_id}
Kampanyayı kaldırıp varsa geçmiş gösterim verilerini korur.
| Parametre | Konum | Biçim | Zorunlu |
|---|---|---|---|
ad_id | path | integer | Evet |
account_id | query | integer | — |
X-API-Key | header | string | Evet |
Idempotency-Key | header | string | — |
curl -X DELETE 'https://orbitoads.pro/api/v1/campaigns/38017?account_id=7401' \
-H 'X-API-Key: YOUR_ORBITO_KEY'{
"success": true,
"data": {
"ad_id": 38017,
"account_id": 7401,
"deleted": true
}
}Uygulama notları
Değişebilir alanlar ve saatler
cpm, active veya schedule değişikliği yeni kreatif incelemesi başlatmaz. Kreatif değişikliği başlatabilir. Mevcut hedefleme sabittir. Gün, 0–23 saat ve UTC farkı kullanın. viewer yalnızca users içindir, null programı kaldırır.
Hesap içi bütçe aktarımı
add kampanyaya fon aktarır. withdraw tutarı, withdraw_all kalan bütçeyi hesaba döndürür. meta.moved ve meta.partial kontrol edilir. Dış yükleme, fatura ve iade ödeme akışındadır.
Kabul ve tamamlanma
Oluşturma, kopyalama ve toplu istekler HTTP 202 ve iş kimliği döndürür. Retry-After'a uyarak GET /api/v1/tasks/{id} sorgulayın. completed durumunda da failed ve errors alanlarını kontrol edin.
İşlemler ve alanlar
PATCH /api/v1/campaigns/{ad_id} POST /api/v1/campaigns/{ad_id}/pause POST /api/v1/campaigns/{ad_id}/resume POST /api/v1/campaigns/{ad_id}/budget POST /api/v1/campaigns/{ad_id}/copy POST /api/v1/campaigns/bulk
- PATCH /api/v1/campaigns/{ad_id}
- POST /api/v1/campaigns/{ad_id}/pause
- POST /api/v1/campaigns/{ad_id}/resume
- POST /api/v1/campaigns/{ad_id}/budget
- POST /api/v1/campaigns/{ad_id}/copy
- POST /api/v1/campaigns/bulk
İstek örneği
GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key}
Şema alanları ve sınırları
Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir.
Protokol başvurusu
| Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları |
|---|---|---|---|---|
| PATCH | /api/v1/campaigns/{ad_id} | ad_id, account_id | application/json · UpdateRequest | 200, 400, 401, 403, 404, 409, 429 |
| POST | /api/v1/campaigns/{ad_id}/pause | ad_id, account_id | — | 200, 400, 401, 403, 404, 409, 429 |
| POST | /api/v1/campaigns/{ad_id}/resume | ad_id, account_id | — | 200, 400, 401, 403, 404, 409, 429 |
| POST | /api/v1/campaigns/{ad_id}/budget | ad_id, account_id, Idempotency-Key | application/json · BudgetRequest | 200, 400, 401, 403, 404, 409, 422, 429 |
| POST | /api/v1/campaigns/{ad_id}/copy | ad_id, account_id, Idempotency-Key | application/json · CopyRequest | 202, 400, 401, 403, 404, 409, 422, 429 |
| POST | /api/v1/campaigns/bulk | Idempotency-Key | application/json · BulkRequest | 202, 400, 401, 403, 404, 409, 422, 429 |
| DELETE | /api/v1/campaigns/{ad_id} | ad_id, account_id | — | 200, 400, 401, 403, 404, 409, 429 |
Kaynak · Veri kaynağı
Şema alanları ve sınırları · Mevcut kampanyaları değiştirme
| Alan | Belgelenen değer |
|---|---|
| BulkRequest.ad_ids[] | 1 … 1,000 |
| CopyRequest.copies | 1 … 100 |
| BudgetRequest.action | add | withdraw | withdraw_all |
| BulkRequest.action | pause | resume | add_budget | withdraw_budget | withdraw_all_budget | set_cpm | set_schedule | delete |
| Schedule | days, timezone |
Kaynak · Veri kaynağı
UpdateRequest
| Alan | Alan türü |
|---|---|
| title | string |
| text | string |
| promote_url | string |
| cpm | number |
| daily_budget | number · 0 … ∞ |
| views_per_user | integer · 1 … 4 |
| media | string |
| picture | boolean |
| button | subscribe | view | read | learn_more | download | open | sign_up | buy | order | play | try | leave_request |
| website_name | string |
| schedule | Schedule |
| account_id | integer |
| active | boolean |
Kaynak · Veri kaynağı
BudgetRequest
| Alan | Alan türü |
|---|---|
| account_id | integer |
| action | add | withdraw | withdraw_all |
| amount | number |
Kaynak · Veri kaynağı
CopyRequest
| Alan | Alan türü |
|---|---|
| account_id | integer |
| copies | integer · 1 … 100 · = 1 |
| title | string |
| text | string |
| promote_url | string |
| cpm | number |
| budget | number · 0 … ∞ |
| media | string |
| picture | boolean |
| views_per_user | integer · 1 … 4 |
| schedule | Schedule |
| group_id | integer |
| new_group_name | string |
Kaynak · Veri kaynağı
BulkRequest
| Alan | Alan türü |
|---|---|
| account_id | integer |
| action | pause | resume | add_budget | withdraw_budget | withdraw_all_budget | set_cpm | set_schedule | delete |
| ad_ids | array · [integer] · 1 … 1000 |
| amount | number |
| cpm | number |
| schedule | Schedule |
Kaynak · Veri kaynağı
Schedule
| Alan | Alan türü |
|---|---|
| days | object |
| timezone | string |
Kaynak · Veri kaynağı
Kaynağın güncellenme tarihi