{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/gtm/main/json-schema/gtm-exports-list-response-schema.json",
  "title": "ExportsListResponse",
  "description": "Response containing a list of exports.",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gtm-platform-api-v1-api-openapi.yml#/components/schemas/ExportsListResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Export"
      },
      "description": "The primary data of the document"
    },
    "meta": {
      "allOf": [
        {
          "$ref": "#/$defs/ExportsListMeta"
        }
      ],
      "description": "Non-standard meta information about the document"
    },
    "links": {
      "allOf": [
        {
          "$ref": "#/$defs/ExportsListLinks"
        }
      ],
      "description": "Links related to the primary data"
    }
  },
  "$defs": {
    "Export": {
      "type": "object",
      "required": [
        "id",
        "type",
        "attributes"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for the resource"
        },
        "type": {
          "type": "string",
          "description": "The type of the resource",
          "default": "Export",
          "pattern": "Export"
        },
        "attributes": {
          "allOf": [
            {
              "$ref": "#/$defs/ExportAttributes"
            }
          ],
          "description": "The attributes defining the resource"
        }
      },
      "description": "An export you can run, returned as a single API resource."
    },
    "ExportAttributes": {
      "type": "object",
      "required": [
        "name",
        "description",
        "category",
        "integrations"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the export"
        },
        "description": {
          "type": "string",
          "description": "What this export does, in more detail than its name alone."
        },
        "category": {
          "allOf": [
            {
              "$ref": "#/$defs/ExportCategory"
            }
          ],
          "description": "What this export does with the records you send it."
        },
        "integrations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExportIntegration"
          },
          "description": "The external account(s) this export is connected to. Empty if it isn't tied to a specific\naccount."
        }
      },
      "description": "Details about an export you can run: its name, what it does with your records, and which\nexternal account(s), if any, it's connected to."
    },
    "ExportCategory": {
      "type": "string",
      "enum": [
        "RETRIEVE",
        "ENRICH",
        "EXPORT_DATA"
      ],
      "description": "What kind of thing an export does with the records you send it: send data out to another system\n(`exportData`), pull data in (`retrieve`), or add more information to existing records\n(`enrich`)."
    },
    "ExportIntegration": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of this connected account"
        },
        "name": {
          "type": "string",
          "description": "Display name of this connected account (e.g. \"Salesforce - EMEA\")."
        }
      },
      "description": "A specific external account, identified by its id, that an export is connected to — for example,\none particular Salesforce org, if an export can send data to more than one."
    },
    "ExportsListLinks": {
      "type": "object",
      "properties": {
        "first": {
          "type": "string",
          "format": "uri",
          "description": "A link to the first page of data"
        },
        "last": {
          "type": "string",
          "format": "uri",
          "description": "A link to the last page of data"
        },
        "prev": {
          "type": "string",
          "format": "uri",
          "description": "A link to the previous page of data"
        },
        "next": {
          "type": "string",
          "format": "uri",
          "description": "A link to the next page of data"
        }
      },
      "description": "Links describing the various exports paging options"
    },
    "ExportsListMeta": {
      "type": "object",
      "required": [
        "totalResults"
      ],
      "properties": {
        "totalResults": {
          "type": "integer",
          "format": "int32",
          "description": "Total number of exports that matched your search"
        }
      },
      "description": "Extra information about a list of exports."
    }
  }
}