{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarify/json-schema/clarify-resources-response-schema.json",
  "title": "ResourcesResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarify-resources-api-openapi.yml#/components/schemas/ResourcesResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The resource type, e.g. `person` or `deal`."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the resource."
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {},
            "description": "Field values keyed by field name; available fields depend on the object’s schema."
          },
          "relationships": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "data": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the referenced resource."
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique ID of the referenced resource."
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ]
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The type of the referenced resource."
                          },
                          "id": {
                            "type": "string",
                            "description": "The unique ID of the referenced resource."
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  ],
                  "nullable": true,
                  "description": "A single resource reference, an array of references, or `null` when the relationship is empty."
                },
                "meta": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Total number of related records for a to-many relationship, independent of the number embedded in `data` (which is capped)."
                    }
                  },
                  "description": "Metadata about the relationship."
                }
              },
              "required": [
                "data"
              ]
            },
            "description": "Related resources keyed by relationship name, present when requested via `include`."
          }
        },
        "required": [
          "type",
          "id",
          "attributes"
        ]
      },
      "description": "The page of resources."
    },
    "included": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The resource type, e.g. `person` or `deal`."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the resource."
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {},
            "description": "Field values keyed by field name; available fields depend on the object’s schema."
          },
          "relationships": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "data": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the referenced resource."
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique ID of the referenced resource."
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ]
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The type of the referenced resource."
                          },
                          "id": {
                            "type": "string",
                            "description": "The unique ID of the referenced resource."
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  ],
                  "nullable": true,
                  "description": "A single resource reference, an array of references, or `null` when the relationship is empty."
                },
                "meta": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Total number of related records for a to-many relationship, independent of the number embedded in `data` (which is capped)."
                    }
                  },
                  "description": "Metadata about the relationship."
                }
              },
              "required": [
                "data"
              ]
            },
            "description": "Related resources keyed by relationship name, present when requested via `include`."
          }
        },
        "required": [
          "type",
          "id",
          "attributes"
        ]
      },
      "description": "Related resources requested via `include`."
    },
    "meta": {
      "type": "object",
      "properties": {
        "total_records": {
          "type": "number",
          "description": "Total number of records across all pages."
        }
      },
      "description": "Response metadata."
    }
  },
  "required": [
    "data",
    "included",
    "meta"
  ]
}