{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-experience-cloud/json-schema/salesforce-experience-cloud-query-result-schema.json",
  "title": "QueryResult",
  "description": "Result of a SOQL query",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-experience-cloud-query-api-openapi.yml#/components/schemas/QueryResult",
  "type": "object",
  "properties": {
    "done": {
      "type": "boolean",
      "description": "Whether all results have been returned"
    },
    "nextRecordsUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL for the next page of results (if done is false)"
    },
    "records": {
      "type": "array",
      "description": "Matching records",
      "items": {
        "$ref": "#/$defs/SObjectRecord"
      }
    },
    "totalSize": {
      "type": "integer",
      "description": "Total number of matching records"
    }
  },
  "$defs": {
    "SObjectRecord": {
      "type": "object",
      "description": "A Salesforce sObject record with field values",
      "properties": {
        "attributes": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "sObject type name"
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "REST API URL for this record"
            }
          }
        },
        "Id": {
          "type": "string",
          "description": "The 18-character record ID"
        }
      },
      "additionalProperties": true
    }
  }
}