{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-ads-account-response-with-connection-schema.json",
  "title": "AdsAccountResponseWithConnection",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-ads-api-openapi.yml#/components/schemas/AdsAccountResponseWithConnection",
  "type": "object",
  "properties": {
    "account": {
      "$ref": "#/$defs/AdsAccount"
    },
    "connection": {
      "$ref": "#/$defs/Connection"
    }
  },
  "required": [
    "account",
    "connection"
  ],
  "$defs": {
    "AdsAccount": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The Rutter generated unique ID of the ad account.",
          "x-rutter-platforms": {
            "FACEBOOK": {},
            "GOOGLE": {},
            "TIKTOK": {}
          }
        },
        "platform_id": {
          "type": "string",
          "description": "The platform specific ID of the ad account.",
          "x-rutter-platforms": {
            "FACEBOOK": {},
            "GOOGLE": {},
            "TIKTOK": {}
          }
        },
        "parent_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Rutter ID of the parent ad account."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the ad account.",
          "x-rutter-platforms": {
            "FACEBOOK": {},
            "GOOGLE": {},
            "TIKTOK": {}
          }
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp that the ad account was created.",
          "x-rutter-platforms": {
            "FACEBOOK": {}
          }
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp that the ad account was last updated."
        },
        "last_synced_at": {
          "type": "string",
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp when the ad account was last synced by Rutter.",
          "x-rutter-platforms": {
            "FACEBOOK": {},
            "GOOGLE": {},
            "TIKTOK": {}
          }
        },
        "platform_data": {
          "type": "object",
          "additionalProperties": {},
          "description": "The raw platform data corresponding to the Rutter object."
        }
      },
      "required": [
        "id",
        "platform_id",
        "parent_id",
        "name",
        "created_at",
        "updated_at",
        "last_synced_at"
      ]
    },
    "Connection": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The UUID of the connection. Generated by Rutter."
        },
        "orgId": {
          "type": "string",
          "format": "uuid",
          "description": "Your organization id."
        },
        "platform": {
          "$ref": "#/$defs/Platform"
        }
      },
      "required": [
        "id",
        "orgId",
        "platform"
      ]
    },
    "Platform": {
      "type": "string",
      "enum": [
        "AMAZON",
        "EBAY",
        "ETSY",
        "FNAC",
        "WALMART",
        "SHOPEE",
        "LAZADA",
        "MERCADOLIBRE",
        "ALIBABA",
        "WAYFAIR",
        "SHEIN",
        "NOON",
        "SHOPLINE",
        "PRESTASHOP",
        "SHOPIFY",
        "MAGENTO",
        "WOO_COMMERCE",
        "SQUARESPACE",
        "WIX",
        "SHOPER",
        "SHOPLAZZA",
        "BIG_COMMERCE",
        "SALLA",
        "ZID",
        "TIKTOKSHOP",
        "COMMERCELAYER",
        "WEBFLOW",
        "GUMROAD",
        "ECWID",
        "PAYPAL",
        "SQUARE",
        "STRIPE",
        "CLOVER",
        "MOLLIE",
        "PAYNL",
        "AUTHORIZENET",
        "RECHARGE",
        "CHARGIFY",
        "CHARGEBEE",
        "RECURLY",
        "KASHFLOW",
        "SAGE_INTACCT",
        "SAGE_INTACCT_V2",
        "DYNAMICS365",
        "DYNAMICS365FO",
        "ZOHOBOOKS",
        "EXACTONLINE",
        "FREEAGENT",
        "QUICKBOOKS",
        "QUICKBOOKS_DESKTOP",
        "FRESHBOOKS",
        "XERO",
        "SAGE_BUSINESS_CLOUD",
        "SAGE_50",
        "VISTA",
        "NETSUITE",
        "WAVE",
        "DUALENTRY",
        "CAMPFIRE",
        "RILLET",
        "SOFTLEDGER",
        "VISMA",
        "SPIRIS",
        "LEXWARE",
        "MONEYBIRD",
        "SAGE200CLOUD",
        "MX",
        "PLAID",
        "TELLER",
        "RAMP",
        "ODOO",
        "ACUMATICA",
        "FULFIL",
        "TALLY",
        "SAPBUSINESSONE",
        "SAPS4HANA",
        "WORKDAY",
        "ANFIX",
        "ORACLEFUSION",
        "HOLDED",
        "MYOBBUSINESS",
        "FORTNOX",
        "GOOGLE",
        "FACEBOOK",
        "TIKTOK",
        "INTUIT_BANK_FEEDS",
        "PLAID_BANK_FEEDS",
        "SAGE",
        "SAGE_BANK_FEEDS",
        "YODLEE_BANK_FEEDS",
        "QUICKBOOKS_HRIS",
        "BAMBOO_HR",
        "GUSTO",
        "DEEL",
        "RIPPLING"
      ],
      "description": "The underlying platform."
    }
  }
}