{"openapi":"3.1.0","info":{"title":"iProspect API Gateway","description":"API Gateway для інтеграції Microsoft Teams з Mage.AI для перевірки рекламних кампаній","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Root","description":"Головна сторінка API.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","description":"Health check endpoint.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/crosscheck/":{"get":{"tags":["Crosscheck"],"summary":"Crosscheck Info","description":"Інформація про сервіс Crosscheck.","operationId":"crosscheck_info_crosscheck__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/crosscheck/health":{"get":{"tags":["Crosscheck"],"summary":"Crosscheck Health","description":"Health check сервісу Crosscheck.","operationId":"crosscheck_health_crosscheck_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/crosscheck/platforms":{"get":{"tags":["Crosscheck"],"summary":"Get Platforms","description":"Отримує список доступних рекламних платформ.\n\nReturns:\n    Список платформ (Google Ads, Meta Ads)","operationId":"get_platforms_crosscheck_platforms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformsResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/crosscheck/accounts/{platform}":{"get":{"tags":["Crosscheck"],"summary":"Get Accounts","description":"Отримує список рекламних акаунтів для обраної платформи.\n\nArgs:\n    platform: Назва платформи (google_ads або meta_ads)\n\nReturns:\n    Список акаунтів з ID та назвами","operationId":"get_accounts_crosscheck_accounts__platform__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/crosscheck/campaigns/{platform}/{account_id}":{"get":{"tags":["Crosscheck"],"summary":"Get Campaigns","description":"Отримує список кампаній для обраного акаунта.\n\nArgs:\n    platform: Назва платформи\n    account_id: ID рекламного акаунта\n\nReturns:\n    Список кампаній з ID, назвами та статусами","operationId":"get_campaigns_crosscheck_campaigns__platform___account_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/crosscheck/report/{platform}/{account_id}/{campaign_id}":{"get":{"tags":["Crosscheck"],"summary":"Get Report","description":"Генерує звіт з граматичними помилками в рекламних текстах кампанії.\n\nArgs:\n    platform: Назва платформи\n    account_id: ID рекламного акаунта\n    campaign_id: ID кампанії\n\nReturns:\n    Звіт з переліком оголошень та знайдених помилок","operationId":"get_report_crosscheck_report__platform___account_id___campaign_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Account":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"Account","description":"Рекламний акаунт."},"AccountsResponse":{"properties":{"platform":{"type":"string","title":"Platform"},"accounts":{"items":{"$ref":"#/components/schemas/Account"},"type":"array","title":"Accounts"}},"type":"object","required":["platform","accounts"],"title":"AccountsResponse","description":"Відповідь зі списком акаунтів."},"AdError":{"properties":{"ad_id":{"type":"string","title":"Ad Id"},"ad_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ad Name"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues"}},"type":"object","required":["ad_id","issues"],"title":"AdError","description":"Помилка в рекламному оголошенні."},"Campaign":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["id","name"],"title":"Campaign","description":"Рекламна кампанія."},"CampaignsResponse":{"properties":{"platform":{"type":"string","title":"Platform"},"account_id":{"type":"string","title":"Account Id"},"campaigns":{"items":{"$ref":"#/components/schemas/Campaign"},"type":"array","title":"Campaigns"}},"type":"object","required":["platform","account_id","campaigns"],"title":"CampaignsResponse","description":"Відповідь зі списком кампаній."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PlatformsResponse":{"properties":{"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"}},"type":"object","required":["platforms"],"title":"PlatformsResponse","description":"Відповідь зі списком платформ."},"ReportResponse":{"properties":{"platform":{"type":"string","title":"Platform"},"account_id":{"type":"string","title":"Account Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"total_ads":{"type":"integer","title":"Total Ads"},"ads_with_errors":{"type":"integer","title":"Ads With Errors"},"errors":{"items":{"$ref":"#/components/schemas/AdError"},"type":"array","title":"Errors"},"details_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details Md"},"ads_texts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ads Texts"},"ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ok"}},"type":"object","required":["platform","account_id","campaign_id","total_ads","ads_with_errors","errors"],"title":"ReportResponse","description":"Звіт з помилками в рекламних текстах."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}