{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/adspendspy/main/json-schema/adspendspy-track-brand-response-schema.json",
  "title": "TrackBrandResponse",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/adspendspy-api-openapi.json#/components/schemas/TrackBrandResponse",
  "type": "object",
  "required": [
    "success",
    "message",
    "message_key",
    "brand_id",
    "page_id",
    "already_tracked",
    "reactivated",
    "tracked_count",
    "tracked_limit",
    "remaining_slots",
    "ingestion_state",
    "ads_count"
  ],
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "message": {
      "type": "string",
      "description": "Localized via X-App-Language."
    },
    "message_key": {
      "type": "string",
      "enum": [
        "account_common.api.brands_track.tracked",
        "account_common.api.brands_track.already_tracked"
      ]
    },
    "message_params": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "brand_id": {
      "type": "integer",
      "description": "Internal brand record ID."
    },
    "page_id": {
      "type": "string",
      "pattern": "^[0-9]{5,25}$",
      "description": "Meta advertiser page ID, kept as a string."
    },
    "already_tracked": {
      "type": "boolean",
      "description": "true with HTTP 200: the advertiser was already tracked; no slot was used."
    },
    "reactivated": {
      "type": "boolean",
      "description": "true when an earlier, removed tracking was restored."
    },
    "tracked_count": {
      "type": "integer",
      "description": "Actively tracked brands, counted before this request."
    },
    "tracked_limit": {
      "type": "integer"
    },
    "remaining_slots": {
      "type": "integer"
    },
    "ingestion_state": {
      "type": "string",
      "enum": [
        "ready",
        "pending",
        "no_ads"
      ],
      "description": "ready: stored ads are available. pending: the first check or current processing is unfinished. no_ads: a completed check found no stored ads."
    },
    "ads_count": {
      "type": "integer"
    }
  }
}