[
  {
    "folder": "Auth",
    "name": "Login",
    "longContext": "Authenticates user with username/password. Returns session token (8-hour TTL). Must be followed by SelectTenant before making API calls.",
    "relatedDocs": [
      {
        "title": "Authentication Guide",
        "href": "/docs/Integrators/Authentication"
      }
    ]
  },
  {
    "folder": "Auth",
    "name": "SelectTenant",
    "longContext": "Selects tenant context. Issued after Login. Sets TenantId in response token for all subsequent calls.",
    "relatedDocs": [
      {
        "title": "Authentication Guide",
        "href": "/docs/Integrators/Authentication"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Create User",
    "longContext": "Creates user with email, language, timezone, roles. Roles control capabilities (DataView, DataImport, DataEdit, etc.)",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "examples": [
      {
        "title": "Create",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var (c,b)=await PostAsync(ApiKey.Acme,\"/api/v1/tenants/users\",new{email=\"u@example.com\",language=\"en-US\",roles=new[]{\"DataView\"}});\nassert(c==200);"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Create User (German speaker)",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "longContext": "Provisions new user account with email, language, timezone, and initial role assignments."
  },
  {
    "folder": "User API",
    "name": "List Users",
    "longContext": "Lists tenant users with names, emails, roles, and activity status.",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "examples": [
      {
        "title": "List",
        "source": "Tests.DataServices/PublicApi/ApiTestBase.cs",
        "lang": "csharp",
        "code": "var (c,b)=await PostAsync(ApiKey.Acme, \"/api/v1/tenants/users/list\", new {});\nassert(b.ValueKind == JsonValueKind.Array);"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Get User Detail",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "longContext": "Retrieves detailed user profile: permissions, language/timezone, contact methods, and audit trail."
  },
  {
    "folder": "User API",
    "name": "Update Language",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "examples": [
      {
        "title": "Update",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var (c,_)=await PutAsync(ApiKey.Acme,$\"/api/v1/tenants/users/123/language\",new{language=\"de\"});\nassert(c==200);"
      }
    ],
    "longContext": "Modifies user profile: name, language, timezone, roles, or contact info."
  },
  {
    "folder": "User API",
    "name": "Update Timezone",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Update Username",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Add Email Contact",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "longContext": "Adds a new contact method (email or phone) to an existing user account."
  },
  {
    "folder": "User API",
    "name": "Add Phone Contact",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Lock User",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "longContext": "Locks a user account, preventing login. Account can be reactivated via unlock."
  },
  {
    "folder": "User API",
    "name": "Unlock User",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Find-or-Create (new user)",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ],
    "longContext": "Idempotent user provisioning: creates user if missing, returns existing user if found."
  },
  {
    "folder": "User API",
    "name": "Find-or-Create (existing user)",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ]
  },
  {
    "folder": "User API",
    "name": "Find-or-Create (no tenant)",
    "relatedDocs": [
      {
        "title": "Users API Reference",
        "href": "/docs/Integrators/Users-API"
      }
    ]
  },
  {
    "folder": "Schema & Reference",
    "name": "WhoAmI",
    "relatedDocs": [
      {
        "title": "Entities API — Schema Discovery",
        "href": "/docs/Integrators/Entities-API#schema-discovery"
      }
    ],
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/schema/whoami",
        "lang": "json",
        "code": "{\n  \"tenantId\": 1,\n  \"tenantUserId\": 4,\n  \"userId\": 2,\n  \"userName\": \"kbarrett\",\n  \"displayName\": \"Acme Corporation\",\n  \"roleFlag\": 134217215,\n  \"languageRegionId\": 69,\n  \"timeZoneId\": 24,\n  \"timeZoneIana\": \"America/Guatemala\",\n  \"timeZoneAbbrev\": \"CST\",\n  \"standardOffsetMinutes\": -360,\n  \"currentOffsetMinutes\": -360,\n  \"serverTimeUtc\": \"2026-04-30T05:20:31Z\",\n  \"serverTimeLocal\": \"2026-04-29T23:20:31\",\n  \"tenantHost\": \"localhost\",\n  \"tenantSubDomain\": \"acme\",\n  \"tenantName\": \"Acme Corporation\"\n\n  ..."
      }
    ],
    "longContext": "Returns authenticated caller context: user ID, tenant ID, role flags, timezone, current server time. Used to initialize client session."
  },
  {
    "folder": "Schema & Reference",
    "name": "GET Languages",
    "relatedDocs": [
      {
        "title": "Entities API — Schema Discovery",
        "href": "/docs/Integrators/Entities-API#schema-discovery"
      }
    ],
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/languages",
        "lang": "json",
        "code": "// total items: 4 (showing 1)\n{\n  \"languageRegionId\": 69,\n  \"languageCode\": \"en\",\n  \"displayName\": \"English (United States)\"\n}"
      }
    ]
  },
  {
    "folder": "Schema & Reference",
    "name": "GET Schema (all)",
    "relatedDocs": [
      {
        "title": "Entities API — Schema Discovery",
        "href": "/docs/Integrators/Entities-API#schema-discovery"
      }
    ],
    "examples": [
      {
        "title": "SchemaDictionary ReturnsTenantVocabulary",
        "source": "Tests.DataServices/PublicApi/SchemaTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/schema/dictionary\");\nAssertOk(code);\nAssert.IsTrue(body.GetProperty(\"entities\").GetArrayLength() > 0,\n    \"Dictionary should include at least one entity for a seeded tenant.\");\nAssert.IsTrue(body.GetProperty(\"properties\").GetArrayLength() > 0);"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/schema",
        "lang": "json",
        "code": "{\n  \"dataTypes\": [\n    {\n      \"dataTypeId\": 1,\n      \"internalName\": \"Number\"\n    },\n    {\n      \"dataTypeId\": 2,\n      \"internalName\": \"DateTime\"\n    },\n    {\n      \"dataTypeId\": 3,\n      \"internalName\": \"DateOnly\"\n    },\n    {\n      \"dataTypeId\": 4,\n      \"internalName\": \"TimeOnly\"\n    },\n    {\n      \"dataTypeId\": 5,\n      \"internalName\": \"Text\"\n    },\n    {\n      \"dataTypeId\": 6,\n      \"internalName\": \"Choice\"\n    },\n    {\n      \"dataTypeId\": 7,\n      \"internalName\": \"Attachment\"\n    },\n    {\n      \"dataTypeId\": 8,\n      \"internalName\": \"Signature\"\n    },\n    {\n      \"dataTypeId\": 9,\n     "
      }
    ]
  },
  {
    "folder": "Schema & Reference",
    "name": "GET Schema (filtered)",
    "relatedDocs": [
      {
        "title": "Entities API — Schema Discovery",
        "href": "/docs/Integrators/Entities-API#schema-discovery"
      }
    ],
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/schema",
        "lang": "json",
        "code": "{\n  \"dataTypes\": [\n    {\n      \"dataTypeId\": 1,\n      \"internalName\": \"Number\"\n    },\n    {\n      \"dataTypeId\": 2,\n      \"internalName\": \"DateTime\"\n    },\n    {\n      \"dataTypeId\": 3,\n      \"internalName\": \"DateOnly\"\n    },\n    {\n      \"dataTypeId\": 4,\n      \"internalName\": \"TimeOnly\"\n    },\n    {\n      \"dataTypeId\": 5,\n      \"internalName\": \"Text\"\n    },\n    {\n      \"dataTypeId\": 6,\n      \"internalName\": \"Choice\"\n    },\n    {\n      \"dataTypeId\": 7,\n      \"internalName\": \"Attachment\"\n    },\n    {\n      \"dataTypeId\": 8,\n      \"internalName\": \"Signature\"\n    },\n    {\n      \"dataTypeId\": 9,\n     "
      }
    ]
  },
  {
    "folder": "Schema & Reference",
    "name": "GET Verticals",
    "relatedDocs": [
      {
        "title": "Entities API — Schema Discovery",
        "href": "/docs/Integrators/Entities-API#schema-discovery"
      }
    ],
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/verticals",
        "lang": "json",
        "code": "// total items: 6 (showing 1)\n{\n  \"verticalId\": 1,\n  \"internalName\": \"General\"\n}"
      }
    ]
  },
  {
    "folder": "Schema & Reference",
    "name": "GET Categories",
    "relatedDocs": [
      {
        "title": "Entities API — Schema Discovery",
        "href": "/docs/Integrators/Entities-API#schema-discovery"
      }
    ],
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/categories",
        "lang": "json",
        "code": "// total items: 15 (showing 1)\n{\n  \"categoryId\": 0,\n  \"internalName\": \"Core\"\n}"
      }
    ]
  },
  {
    "folder": "Schema & Reference",
    "name": "GET Catalog (browse templates)",
    "relatedDocs": [
      {
        "title": "Entities API — Schema Discovery",
        "href": "/docs/Integrators/Entities-API#schema-discovery"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create Text (with displays)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create Number",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create DateTime",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create Currency",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create Choice (with options)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create Sensitive (with regex)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create DateOnly",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Create Binary (toggle)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "List Properties",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ],
    "examples": [
      {
        "title": "PropertiesList ReturnsSeededProperties",
        "source": "Tests.DataServices/PublicApi/PropertyTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/properties/list\");\nAssertOk(code);\nAssert.IsTrue(ArrayLength(body) > 0);"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/properties/list",
        "lang": "json",
        "code": "[\n  {\n    \"propertyId\": 100057,\n    \"dataTypeId\": 5,\n    \"internalName\": \"AccessInstructions\",\n    \"name\": \"Access Instructions\",\n    \"description\": \"How to reach the service point\",\n    \"isSensitive\": false,\n    \"isFullyTranslated\": true,\n    \"categoryId\": 3,\n    \"verticalId\": 0,\n    \"globalSourceId\": 921,\n    \"displays\": [\n      {\n        \"languageRegionId\": 69,\n        \"languageDisplayName\": \"English (United States)\",\n        \"name\": \"Access Instructions\",\n        \"description\": \"How to reach\n  ..."
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/PropertyList.sql",
    "longContext": "Lists all entity properties with metadata including data types, categories, and display settings. Properties define the schema for entity instances."
  },
  {
    "folder": "Properties",
    "name": "Get Property Detail",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ],
    "examples": [
      {
        "title": "PropertyDetail FriendlyName ResolvesCustomerNumber",
        "source": "Tests.DataServices/PublicApi/PropertyTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/properties/CustomerNumber\");\nAssertOk(code);\nAssert.AreEqual(5,\n    body.GetProperty(\"property\").GetProperty(\"dataTypeId\").GetInt32(),\n    \"CustomerNumber is a Text property — dataTypeId 5.\");"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/properties/CustomerNumber",
        "lang": "json",
        "code": "{\n  \"property\": {\n    \"propertyId\": 100062,\n    \"dataTypeId\": 5,\n    \"internalName\": \"CustomerNumber\",\n    \"maxDecimalPlaces\": null,\n    \"maxValueOrLength\": null,\n    \"minValueOrLength\": null,\n    \"regEx\": null,\n    \"isSensitive\": false,\n    \"globalSourceId\": 950,\n    \"verticalId\": 0,\n    \"categoryId\": 0\n  },\n  \"languages\": [\n    {\n      \"languageRegionId\": 69,\n      \"languageDisplayName\": \"English (United States)\",\n      \"name\": \"Customer Number\",\n      \"description\": \"External system customer ID\",\n      \"regEx\": null,\n      \"isTranslationLocked\": false\n    },\n    {\n      \"languageRegionId\": "
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Update Property (constraints)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Update Property (category)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Set Display (German, locked)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Set Display (Spanish)",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Translate Property",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Properties",
    "name": "Delete Property",
    "relatedDocs": [
      {
        "title": "Entities API — Properties",
        "href": "/docs/Integrators/Entities-API#properties"
      }
    ]
  },
  {
    "folder": "Entities",
    "name": "Create Entity (with displays)",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ]
  },
  {
    "folder": "Entities",
    "name": "Create Entity (minimal)",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ]
  },
  {
    "folder": "Entities",
    "name": "List Entities",
    "longContext": "Lists all entities with properties for schema discovery. Returns friendly names, descriptions, parent/child composition links.",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ],
    "examples": [
      {
        "title": "EntitiesList ReturnsSeededEntities",
        "source": "Tests.DataServices/PublicApi/EntityTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/entities/list\");\nAssertOk(code);\nAssert.IsTrue(ArrayLength(body) > 0, \"List should return at least one entity for a seeded tenant.\");"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/entities/list",
        "lang": "json",
        "code": "[\n  {\n    \"entityId\": 100002,\n    \"internalName\": \"Address\",\n    \"name\": \"Address\",\n    \"description\": \"Physical or mailing address\",\n    \"propertyCount\": 5,\n    \"categoryId\": 3,\n    \"verticalId\": 0,\n    \"globalSourceId\": 102,\n    \"displays\": [\n      {\n        \"languageRegionId\": 69,\n        \"name\": \"Address\",\n        \"description\": \"Physical or mailing address\"\n      }\n    ]\n  },\n  {\n    \"entityId\": 100004,\n    \"internalName\": \"Appointment\",\n    \"name\": \"Appointment\",\n    \"description\": \"Schedu\n  ..."
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityList.sql"
  },
  {
    "folder": "Entities",
    "name": "List Entities (German default)",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ],
    "longContext": "Enumerates all entities with property and instance counts.",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/entities/list",
        "lang": "json",
        "code": "// total items: 18 (showing 1)\n{\n  \"entityId\": 100002,\n  \"internalName\": \"Address\",\n  \"name\": \"Address\",\n  \"description\": \"Physical or mailing address\",\n  \"propertyCount\": 5,\n  \"categoryId\": 3,\n  \"verticalId\": 0,\n  \"globalSourceId\": 102,\n  \"displays\": [\n    {\n      \"languageRegionId\": 69,\n      \"name\": \"Address\",\n      \"description\": \"Physical or mailing address\"\n    }\n  ]\n}"
      }
    ]
  },
  {
    "folder": "Entities",
    "name": "Get Entity Detail",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ],
    "examples": [
      {
        "title": "EntityDetail FriendlyName ResolvesCustomer",
        "source": "Tests.DataServices/PublicApi/EntityTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/entities/\" + EntityCustomer);\nAssertOk(code);\nAssert.AreEqual(EntityCustomer,\n    body.GetProperty(\"entity\").GetProperty(\"internalName\").GetString(),\n    \"Friendly-name lookup should round-trip the same InternalName.\");"
      },
      {
        "title": "EntityDetail NumericId AlsoResolvesToSameEntity",
        "source": "Tests.DataServices/PublicApi/EntityTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\n// Ask via friendly name first to discover the numeric id.\nvar (fc, fbody) = await PostAsync(ApiKey.Acme, \"/api/v1/entities/\" + EntityCustomer);\nAssertOk(fc);\nvar numericId = fbody.GetProperty(\"entity\").GetProperty(\"entityId\").GetInt64();\n\nvar (code, body) = await PostAsync(ApiKey.Acme, $\"/api/v1/entities/{numericId}\");\nAssertOk(code);\nAssert.AreEqual(EntityCustomer,\n    body.GetProperty(\"entity\").GetProperty(\"internalName\").GetString());"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/entities/Customer",
        "lang": "json",
        "code": "{\n  \"entity\": {\n    \"entityId\": 100013,\n    \"internalName\": \"Customer\",\n    \"name\": \"Customer\",\n    \"description\": \"A customer organization that owns one or more service locations\"\n  },\n  \"properties\": [\n    {\n      \"entityPropertyId\": 100083,\n      \"propertyId\": 100062,\n      \"propertyInternalName\": \"CustomerNumber\",\n      \"dataTypeId\": 5,\n      \"propertyName\": \"Customer Number\",\n      \"propertyDescription\": \"External system customer ID\",\n      \"childEntityId\": null,\n      \"childEntityInternalName\": null,\n      \"childEntityName\": null,\n      \"propertyOptionFilterId\": null,\n      \"isRequired\":"
      }
    ]
  },
  {
    "folder": "Entities",
    "name": "Update Entity (metadata + displays)",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ]
  },
  {
    "folder": "Entities",
    "name": "Update Entity (category only)",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ]
  },
  {
    "folder": "Entities",
    "name": "Delete Entity",
    "relatedDocs": [
      {
        "title": "Entities API Reference",
        "href": "/docs/Integrators/Entities-API"
      }
    ]
  },
  {
    "folder": "Entity Composition",
    "name": "Attach Property (required, single)",
    "relatedDocs": [
      {
        "title": "Entities API — Composition",
        "href": "/docs/Integrators/Entities-API#composition"
      }
    ]
  },
  {
    "folder": "Entity Composition",
    "name": "Attach Property (optional, list)",
    "relatedDocs": [
      {
        "title": "Entities API — Composition",
        "href": "/docs/Integrators/Entities-API#composition"
      }
    ]
  },
  {
    "folder": "Entity Composition",
    "name": "Update Cardinality",
    "relatedDocs": [
      {
        "title": "Entities API — Composition",
        "href": "/docs/Integrators/Entities-API#composition"
      }
    ]
  },
  {
    "folder": "Entity Composition",
    "name": "Reorder Property",
    "relatedDocs": [
      {
        "title": "Entities API — Composition",
        "href": "/docs/Integrators/Entities-API#composition"
      }
    ]
  },
  {
    "folder": "Entity Composition",
    "name": "Detach Property",
    "relatedDocs": [
      {
        "title": "Entities API — Composition",
        "href": "/docs/Integrators/Entities-API#composition"
      }
    ]
  },
  {
    "folder": "Entity Composition",
    "name": "Attach Child Entity (1:many)",
    "relatedDocs": [
      {
        "title": "Entities API — Composition",
        "href": "/docs/Integrators/Entities-API#composition"
      }
    ]
  },
  {
    "folder": "Entity Composition",
    "name": "Translate Entity Properties",
    "relatedDocs": [
      {
        "title": "Entities API — Composition",
        "href": "/docs/Integrators/Entities-API#composition"
      }
    ]
  },
  {
    "folder": "Import",
    "name": "Import from Catalog",
    "relatedDocs": [
      {
        "title": "Entity Data API",
        "href": "/docs/Integrators/Entity-Data-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Create Tenant",
    "longContext": "Full tenant provisioning. Creates tenant, clones settings/languages, adds users, syncs DB, copies storage. Requires global admin.",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "List Tenants",
    "longContext": "Lists all tenants with user counts and status.",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ],
    "examples": [
      {
        "title": "Tenants List ReturnsTenants",
        "source": "Tests.DataServices/PublicApi/TenantAdminTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.GlobalTenant);\nvar (code, _) = await PostAsync(ApiKey.GlobalTenant, \"/api/v1/tenants/list\");\nAssertOk(code);"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/tenants/list",
        "lang": "json",
        "code": "{\n  \"returnValue\": 1,\n  \"resultData\": [\n    {\n      \"tenantId\": 1,\n      \"name\": \"Acme Corporation\",\n      \"subDomain\": \"acme\",\n      \"host\": \"localhost\",\n      \"description\": \"Acme Corporation\",\n      \"verticalId\": 2,\n      \"createdDate\": \"2026-04-30T00:42:10.230Z\",\n      \"activeStart\": \"2026-04-30T00:42:10.230Z\",\n      \"activeEnd\": \"9999-12-31T00:00:00.000Z\",\n      \"isDeactivated\": 0,\n      \"userCount\": 4,\n      \"logoKey\": null\n    },\n    {\n      \"tenantId\": 3,\n      \"name\": \"Acme Insurance\",\n      \"subDomain\": \"acmeins\",\n      \"host\": \"localhost\",\n      \"description\": \"Acme Insurance\",\n    "
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Get Tenant",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ],
    "longContext": "Admin-only: fetches full tenant configuration including enabled features, storage settings, and user counts."
  },
  {
    "folder": "Tenant Admin API",
    "name": "Update Tenant",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Suspend Tenant",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ],
    "longContext": "Pauses all activity in a tenant. Preserves data; new logins and API calls are rejected."
  },
  {
    "folder": "Tenant Admin API",
    "name": "Activate Tenant",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ],
    "longContext": "Reactivates a suspended tenant. Only admins can perform this action."
  },
  {
    "folder": "Tenant Admin API",
    "name": "List Users",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ],
    "longContext": "Admin-only: lists all system tenants with metadata. Requires global administrative privileges."
  },
  {
    "folder": "Tenant Admin API",
    "name": "Add User",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Update Roles",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Remove User",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Send Invite",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "List Languages",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Add Language",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "List Email Templates",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Clone Email Template",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Tenant Admin API",
    "name": "Send Email",
    "relatedDocs": [
      {
        "title": "Tenant Admin API Reference",
        "href": "/docs/Integrators/TenantAdmin-API"
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "List Assets",
    "longContext": "Lists asset catalog with pagination and filtering (page, pageSize, sourceId, folderId, search). Returns summaries with key, filename, MIME type, size, folder path.",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "examples": [
      {
        "title": "Assets List ReturnsOk",
        "source": "Tests.DataServices/PublicApi/AssetTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, _) = await PostAsync(ApiKey.Acme, \"/api/v1/assets/list\",\n    new { page = 1, pageSize = 10 });\nAssertOk(code);"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/assets/list",
        "lang": "json",
        "code": "[\n  {\n    \"assetKey\": \"c71fa0e2-2b26-4d60-8870-23c1f2cc7081\",\n    \"originalFileName\": \"20251027_OBGA.OIGP.JackoLatern_bing.jpg\",\n    \"title\": \"20251027_OBGA.OIGP.JackoLatern_bing\",\n    \"mimeType\": \"image/jpeg\",\n    \"fileExtension\": \".jpg\",\n    \"fileSize\": 125175,\n    \"subPath\": \"\",\n    \"isSensitive\": false,\n    \"assetFolderId\": null,\n    \"folderPath\": \"\",\n    \"workflowId\": null,\n    \"stepId\": null,\n    \"propertyId\": 100083,\n    \"createdDate\": \"2026-04-30T02:51:04.950Z\",\n    \"modifiedDate\": \"2026\n  ..."
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/AssetFolderList.sql"
  },
  {
    "folder": "Asset API",
    "name": "Search Assets",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "examples": [
      {
        "title": "AssetSearch TextQuery Returns200AndArray",
        "source": "Tests.DataServices/PublicApi/AssetTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme,\n    \"/api/v1/assets/search/query?q=test\");\nAssertOk(code, \"search with q=test should 200 even when nothing matches\");\nAssert.AreEqual(System.Text.Json.JsonValueKind.Array, body.ValueKind,\n    \"search response should be a JSON array (empty is acceptable)\");"
      },
      {
        "title": "AssetSearch FolderFilter Returns200AndArray",
        "source": "Tests.DataServices/PublicApi/AssetTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme,\n    \"/api/v1/assets/search/query?folder=Root\");\nAssertOk(code, \"search with folder=Root should succeed even if folder has no hits\");\nAssert.AreEqual(System.Text.Json.JsonValueKind.Array, body.ValueKind,\n    \"folder-filtered search should return an array\");"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/assets/search/query",
        "lang": "json",
        "code": "// total items: 4 (showing 1)\n{\n  \"assetKey\": \"c71fa0e2-2b26-4d60-8870-23c1f2cc7081\",\n  \"originalFileName\": \"20251027_OBGA.OIGP.JackoLatern_bing.jpg\",\n  \"title\": \"20251027_OBGA.OIGP.JackoLatern_bing\",\n  \"mimeType\": \"image/jpeg\",\n  \"fileExtension\": \".jpg\",\n  \"fileSize\": 125175,\n  \"subPath\": \"\",\n  \"isSensitive\": false,\n  \"assetFolderId\": null,\n  \"folderPath\": \"\",\n  \"workflowId\": null,\n  \"stepId\": null,\n  \"propertyId\": 100083,\n  \"createdDate\": \"2026-04-30T02:51:04.950Z\",\n  \"modifiedDate\": \"2026-04-30T02:51:04.950Z\"\n}"
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Get Asset",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Upload Asset",
    "longContext": "Uploads binary file via multipart/form-data. Returns assetKey GUID referenced in entity/form saves. Falls back to tenant default storage. Sensitive assets block directUrl.",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Update Asset",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Delete Asset",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Get Metadata",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Update Metadata",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "List Sources",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "examples": [
      {
        "title": "StorageSources List ReturnsConfigured",
        "source": "Tests.DataServices/PublicApi/AssetTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/assets/sources\");\nAssertOk(code);\nAssert.IsTrue(ArrayLength(body) > 0, \"Acme seed configures at least one storage source.\");"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/assets/sources",
        "lang": "json",
        "code": "// total items: 4 (showing 1)\n{\n  \"sourceId\": 100000,\n  \"internalName\": \"Acme Images\",\n  \"description\": \"Image storage for Acme Corporation\",\n  \"storageProviderTypeId\": 8,\n  \"storageAccessModeId\": 1,\n  \"subPath\": \"acme-corp\",\n  \"isSensitive\": false,\n  \"isDefault\": true,\n  \"isDefaultSensitive\": false,\n  \"isActive\": true\n}"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/AssetFolderList.sql",
    "longContext": "Enumerates asset folders in the tenant. Assets are files stored in configured storage sources."
  },
  {
    "folder": "Asset API",
    "name": "List Folders",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/AssetFolderList.sql",
    "longContext": "Returns the folder hierarchy for asset organization—navigate the virtual filesystem.",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/assets/folders/list",
        "lang": "json",
        "code": "// total items: 1 (showing 1)\n{\n  \"folderId\": 100000,\n  \"parentFolderId\": null,\n  \"name\": \"New Folder\",\n  \"path\": \"New Folder\",\n  \"position\": 0,\n  \"subfolderCount\": 0,\n  \"fileCount\": 2\n}"
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Create Folder",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "longContext": "Navigate the folder hierarchy for asset organization—list, create, and manage directories."
  },
  {
    "folder": "Asset API",
    "name": "Delete Folder",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "List Shortcuts",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/AssetFolderList.sql",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/assets/shortcuts/list",
        "lang": "json",
        "code": "{\n  \"shortcuts\": []\n}"
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Get Shortcut",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "List Sync Jobs",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/AssetFolderList.sql",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/assets/sync-jobs/list",
        "lang": "json",
        "code": "{\n  \"syncJobs\": []\n}"
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Get Sync Job",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Update Sync Job",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Run Sync Job",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Sync Job Runs",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Asset API",
    "name": "Extract ZIP",
    "relatedDocs": [
      {
        "title": "Assets API Reference",
        "href": "/docs/Integrators/Assets-API"
      },
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "List Global Sources",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/TenantStorageSourceList.sql"
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "List Tenant Sources",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/TenantStorageSourceList.sql"
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "Get Tenant Source Detail",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/TenantStorageSourceDetail.sql"
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "Save Tenant Source",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "Set Default Source",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "Set Default Sensitive",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "Test Connection",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Storage Sources (Admin)",
    "name": "Delete Tenant Source",
    "relatedDocs": [
      {
        "title": "Storage Architecture (internal)",
        "href": "/docs-pdf/public/Developers/Storage-Architecture.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Storage Explorer",
    "name": "List Files",
    "relatedDocs": [
      {
        "title": "Assets API",
        "href": "/docs/Integrators/Assets-API"
      }
    ]
  },
  {
    "folder": "Storage Explorer",
    "name": "Upload File",
    "relatedDocs": [
      {
        "title": "Assets API",
        "href": "/docs/Integrators/Assets-API"
      }
    ]
  },
  {
    "folder": "Storage Explorer",
    "name": "Download File",
    "relatedDocs": [
      {
        "title": "Assets API",
        "href": "/docs/Integrators/Assets-API"
      }
    ]
  },
  {
    "folder": "Storage Explorer",
    "name": "Download as ZIP",
    "relatedDocs": [
      {
        "title": "Assets API",
        "href": "/docs/Integrators/Assets-API"
      }
    ]
  },
  {
    "folder": "Storage Explorer",
    "name": "Create Folder",
    "relatedDocs": [
      {
        "title": "Assets API",
        "href": "/docs/Integrators/Assets-API"
      }
    ]
  },
  {
    "folder": "Storage Explorer",
    "name": "Delete Folder",
    "relatedDocs": [
      {
        "title": "Assets API",
        "href": "/docs/Integrators/Assets-API"
      }
    ]
  },
  {
    "folder": "Storage Explorer",
    "name": "Delete File",
    "relatedDocs": [
      {
        "title": "Assets API",
        "href": "/docs/Integrators/Assets-API"
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "List Assets",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/BinaryAssetList.sql"
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Get Detail",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/BinaryAssetDetail.sql"
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Get by Key",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/BinaryAssetDetail.sql"
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Update Metadata",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Delete Asset",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Move Asset",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Verify Asset",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Import Asset",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Sync Asset",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Folder List",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/BinaryAssetList.sql"
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Folder Save",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Folder Delete",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Binary Assets (Internal)",
    "name": "Folder Move",
    "relatedDocs": [
      {
        "title": "STORAGE.md (internal)",
        "href": "/docs-pdf/claude/STORAGE.pdf",
        "internal": true
      }
    ]
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "List Shortcuts",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntitySyncProfileList.sql"
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Save Shortcut",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ]
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Delete Shortcut",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ]
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Get Pending Jobs",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntitySyncProfileDetail.sql"
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Toggle Sync Job",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ]
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Run History",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ]
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Run Logs",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ]
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Run All (Engine)",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ]
  },
  {
    "folder": "Sync Jobs & Shortcuts",
    "name": "Run Tenant (Engine)",
    "relatedDocs": [
      {
        "title": "Sync Setup Guide",
        "href": "/docs/Integrators/Sync-Setup-Guide"
      }
    ]
  },
  {
    "folder": "API Keys",
    "name": "List API Keys",
    "relatedDocs": [
      {
        "title": "Authentication",
        "href": "/docs/Integrators/Authentication"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/ApiKeyList.sql"
  },
  {
    "folder": "API Keys",
    "name": "Create API Key",
    "relatedDocs": [
      {
        "title": "Authentication",
        "href": "/docs/Integrators/Authentication"
      }
    ]
  },
  {
    "folder": "API Keys",
    "name": "Revoke API Key",
    "relatedDocs": [
      {
        "title": "Authentication",
        "href": "/docs/Integrators/Authentication"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "List Workflows",
    "longContext": "Lists all workflows with display names and descriptions.",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "List workflows",
        "source": "Tools/WorkflowApiTest/Program.cs",
        "lang": "csharp",
        "code": "var workflows = await Post<JsonElement[]>(\"/api/v1/workflows/list\", new { });\nassert(workflows is not null);"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/workflows/list",
        "lang": "json",
        "code": "[\n  {\n    \"workflowId\": 100001,\n    \"tenantId\": 1,\n    \"internalName\": \"123123123\",\n    \"name\": \"Dog is great\",\n    \"description\": \"My Dog has fleas\",\n    \"categoryId\": null\n  },\n  {\n    \"workflowId\": 100000,\n    \"tenantId\": 1,\n    \"internalName\": \"Demo_HVAC_ServiceCall\",\n    \"name\": \"HVAC Service Call (Demo)\",\n    \"description\": \"Demo workflow for the Acme FieldService tenant \\u00e2\\u20ac\\u201d 3-step Info walkthrough plus a WorkflowCompleted broadcast action. Used by integration tests + Data S\n  ..."
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/WorkflowList.sql"
  },
  {
    "folder": "Workflow API",
    "name": "Create Workflow",
    "longContext": "Creates workflow definition. Builder-facing. Defines canvas, steps, branches, decision logic for mobile execution.",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Get Workflow Detail",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Get workflow",
        "source": "Tools/WorkflowApiTest/Program.cs",
        "lang": "csharp",
        "code": "var detail = await Post<JsonElement>($\"/api/v1/workflows/{wid}\", new { });\nassert(detail.TryGetProperty(\"workflow\", out _));"
      },
      {
        "title": "Get detail",
        "source": "Tools/WorkflowApiTest/Program.cs",
        "lang": "csharp",
        "code": "var d=await Post<JsonElement>($\"/api/v1/workflows/{wid}\", new {});\nassert(d.TryGetProperty(\"workflow\", out _));"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/workflows/100000",
        "lang": "json",
        "code": "{\n  \"workflow\": {\n    \"workflowId\": 100000,\n    \"tenantId\": 1,\n    \"internalName\": \"Demo_HVAC_ServiceCall\",\n    \"name\": \"HVAC Service Call (Demo)\",\n    \"description\": \"Demo workflow for the Acme FieldService tenant \\u00e2\\u20ac\\u201d 3-step Info walkthrough plus a WorkflowCompleted broadcast action. Used by integration tests + Data Studio copilot examples.\"\n  }\n  ..."
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/WorkflowDetail.sql",
    "longContext": "Retrieves the full definition of a workflow: canvas, steps, actions, branches, and runtime configuration."
  },
  {
    "folder": "Workflow API",
    "name": "Update Workflow",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Update",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var ok=await Put($\"/api/v1/workflows/{wid}\",new{internalName=\"UPDATED\"});\nassert(ok);"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Delete Workflow",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Delete",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var dr=await DeleteRaw($\"/api/v1/workflows/{wid}\");\nassert(dr.StatusCode==System.Net.HttpStatusCode.OK);"
      }
    ],
    "longContext": "Removes workflow definition. Existing workflow instances are preserved."
  },
  {
    "folder": "Workflow API",
    "name": "Save Workflow Display",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Save Display",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var r=await Post<JsonElement>($\"/api/v1/workflows/{wid}/displays\",new{languageRegionId=69,name=\"Name\"});\nassert(r.TryGetProperty(\"saved\",out _));"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Add Step",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Add workflow step",
        "source": "Tools/WorkflowApiTest/Program.cs",
        "lang": "csharp",
        "code": "var result = await Post<JsonElement>($\"/api/v1/workflows/{wid}/steps\", new { internalName = \"Step\", stepTypeId = 1, position = 1 });\nassert(result.TryGetProperty(\"stepId\", out _));"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Get Step Detail",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Get Step",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var d=await Post<JsonElement>($\"/api/v1/workflows/{wid}/steps/{sid}\",new{});\nassert(d.TryGetProperty(\"step\",out _));"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/WorkflowDetail.sql",
    "longContext": "Fetches a specific workflow by ID with complete definition and current status."
  },
  {
    "folder": "Workflow API",
    "name": "Update Step",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Update Step",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var ok=await Put($\"/api/v1/workflows/{wid}/steps/{sid}\",new{internalName=\"UPDATED\"});\nassert(ok);"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Delete Step",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Delete Step",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var dr=await DeleteRaw($\"/api/v1/workflows/{wid}/steps/{sid}\");\nassert(dr.StatusCode==System.Net.HttpStatusCode.OK);"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Duplicate Step",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Duplicate",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var r=await Post<JsonElement>($\"/api/v1/workflows/{wid}/steps/{sid}/duplicate\",new{});\nassert(r.TryGetProperty(\"newStepId\",out _));"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Move Step Up",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Move Up",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var r=await Post<JsonElement>($\"/api/v1/workflows/{wid}/steps/{sid}/move\",new{direction=-1});\nassert(r.TryGetProperty(\"moved\",out _));"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Move Step Down",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Move Down",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var r=await Post<JsonElement>($\"/api/v1/workflows/{wid}/steps/{sid}/move\",new{direction=1});\nassert(r.TryGetProperty(\"moved\",out _));"
      }
    ]
  },
  {
    "folder": "Workflow API",
    "name": "Reorder Steps",
    "relatedDocs": [
      {
        "title": "Workflow API Reference",
        "href": "/docs/Integrators/Workflows-API"
      }
    ],
    "examples": [
      {
        "title": "Reorder",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var r=await Post<JsonElement>($\"/api/v1/workflows/{wid}/steps/reorder\",new{});\nassert(r.TryGetProperty(\"reordered\",out _));"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Save Instance",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "examples": [
      {
        "title": "InstanceUpsert FriendlyDataJsonKeys CreatesRow",
        "source": "Tests.DataServices/PublicApi/InstanceTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar testKey = \"TST_\" + Guid.NewGuid().ToString(\"N\")[..10];\n\nvar dataJson = JsonSerializer.Serialize(new\n{\n    CustomerNumber = testKey,\n    OrgName = \"Test Org — MSTest Harness\",\n    OrgPhone = \"555-0199\"\n});\n\nvar (createCode, createBody) = await PostAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityCustomer}/instances\",\n    new { key1 = testKey, dataJson, importMode = \"upsert\" });\nAssertOk(createCode);\nvar eiRecordId = createBody.GetProperty(\"eiRecordId\").GetInt64();\nAssert.IsTrue(eiRecordId > 0);\n\n// Cleanup — always delete even if subsequent assertions fail.\nvar (delCode, _) = await DeleteAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityCustomer}/instances/{eiRecordId}\");\nAssertOk(delCode);"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Save Instance â€” child via parentKey1 (resolve parent by composite key)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Bulk Save Instances",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "longContext": "Batch operation for creating, updating, or deleting multiple instances atomically. Enforces constraints and triggers validation for each record."
  },
  {
    "folder": "Entity Data",
    "name": "Bulk Save Instances â€” Equipment under CUST-001/LOC-001 (parent resolved by composite key)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "List Instances",
    "longContext": "Lists instances with pagination/filtering. Supports changedSince (ISO8601) for incremental sync and includeDeleted flag. Returns full DataJson.",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "examples": [
      {
        "title": "InstancesList Customer ReturnsSeededRows",
        "source": "Tests.DataServices/PublicApi/InstanceTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityCustomer}/instances/list\",\n    new { page = 1, pageSize = 5 });\nAssertOk(code);\nAssert.IsTrue(ArrayLength(body) > 0, \"Acme seed includes CUST-001/2/3.\");"
      },
      {
        "title": "InstancesList Equipment ReturnsAtLeastOneRow",
        "source": "Tests.DataServices/PublicApi/InstanceTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityEquipment}/instances/list\", new { page = 1, pageSize = 5 });\nAssertOk(code);\nAssert.IsTrue(ArrayLength(body) > 0);"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/entities/Customer/instances/list",
        "lang": "json",
        "code": "// total items: 2 (showing 1)\n{\n  \"eiRecordId\": 2,\n  \"entityId\": 100013,\n  \"parentEIRecordId\": null,\n  \"key1\": \"CUST-002\",\n  \"key2\": \"\",\n  \"key3\": \"\",\n  \"externalKey\": \"CUST-002\",\n  \"dataJson\": \"{\\\"100083\\\":\\\"CUST-002\\\",\\\"100010\\\":\\\"Metro Medical Group\\\",\\\"100012\\\":\\\"312-555-0002\\\"}\",\n  \"data\": {\n    \"CustomerNumber\": \"CUST-002\",\n    \"OrgName\": \"Metro Medical Group\",\n    \"OrgPhone\": \"312-555-0002\"\n  },\n  \"rowHash\": \"14B592A2AFC3B784437E861F4AE49798E4665B20\",\n  \"workflowInstanceId\": null,\n  \"modifiedDate\": \"2026-04-30T00:43:07.353Z\"\n}"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityList.sql"
  },
  {
    "folder": "Entity Data",
    "name": "Get Instance",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "examples": [
      {
        "title": "InstanceDetail FriendlyExternalKey ResolvesCustomer",
        "source": "Tests.DataServices/PublicApi/InstanceTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityCustomer}/instances/{Acme_CustomerExternalKey}\");\nAssertOk(code);\nAssert.IsTrue(body.TryGetProperty(\"eiRecordId\", out _),\n    \"Instance detail must include eiRecordId.\");"
      },
      {
        "title": "InstanceDetail EquipmentCompositeKey ResolvesCorrectly",
        "source": "Tests.DataServices/PublicApi/InstanceTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\n\n// Equipment uses a 3-part composite key (EQUIP-N / CUST-N / LOC-N).\n// Discover the real key + numeric id from /instances/list so the test\n// isn't brittle to seed reshuffles.\nvar (listCode, listBody) = await PostAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityEquipment}/instances/list\", new { page = 1, pageSize = 1 });\nAssertOk(listCode);\nAssert.IsTrue(ArrayLength(listBody) > 0, \"Need at least one seeded Equipment row.\");\n\nvar firstEquipment = listBody[0];\nvar externalKey = firstEquipment.GetProperty(\"externalKey\").GetString()!;\nAssert.IsTrue(externalKey.Contains(\" / \"),\n    $\"Equipment externalKey should be 3-part composite with ' / ' separator. Got: {externalKey}\");\nvar eiRecordId = firstEquipment.GetProperty(\"eiRecordId\").GetInt64();\n\n// Try the composite-key path first. URL-encoded '/' is rejected by\n// default Kestrel routing (AllowDoubleEscaping is off), so the\n// composite-key variant returns 404 unless the server explicitly\n// opts in. Fall back to the numeric eiRecordId — still validates\n// the detail endpoint itself round-trips the same externalKey.\nvar encoded = Uri.EscapeDataString(externalKey);\nvar (compositeCode, compositeBody) = await PostAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityEquipment}/instances/{encoded}\");"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityDetail.sql",
    "longContext": "Fetches a single entity instance by composite key (Key1, Key2, Key3). Returns DataJson with all property values and metadata (EIRecordId, ExternalKey, RowHash, ModifiedDate)."
  },
  {
    "folder": "Entity Data",
    "name": "Delete Instance",
    "longContext": "Soft-deletes instance (sets ActiveEnd). Requires DataDelete role. Historical data preserved for variance/time-travel.",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "examples": [
      {
        "title": "Delete",
        "source": "Tests.DataServices/PublicApi/InstanceTests.cs",
        "lang": "csharp",
        "code": "var (c,_)=await DeleteAsync(ApiKey.Acme, $\"/api/v1/entities/Customer/instances/123\");\nassert(c == 200 || c == 404);"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Delete Instance â€” by composite key (POST body)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "longContext": "Soft-deletes entity instances without purging historical data. Respects cascading rules and maintains audit trails for compliance."
  },
  {
    "folder": "Entity Data",
    "name": "Delete Instance â€” by externalKey (POST body)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Bulk Delete Instances â€” composite-key TVP",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Instance History",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "List Views",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityList.sql",
    "longContext": "Retrieves paginated entity instances with optional filtering, sorting, and incremental sync via `ModifiedSinceUtc` watermark. Delegates to `EntityInstanceListFiltered` for complex queries with dynamic predicates and custom sort orders.",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/entities/Customer/views/list",
        "lang": "json",
        "code": "// total items: 1 (showing 1)\n{\n  \"entityInstanceViewId\": 9,\n  \"entityId\": 100013,\n  \"internalName\": \"All Customers\",\n  \"isShared\": true,\n  \"isSystem\": false,\n  \"isApiVisible\": true,\n  \"viewJson\": \"{\\\"columns\\\":[],\\\"sort\\\":null,\\\"filters\\\":{\\\"externalKeyFilter\\\":null,\\\"propertyFilters\\\":null},\\\"pageSize\\\":50}\",\n  \"syncEnabled\": false,\n  \"syncFrequencyMinutes\": null,\n  \"lastExportUtc\": null,\n  \"modifiedDate\": \"2026-04-30T00:43:08.096Z\",\n  \"ownerName\": \"kbarrett\",\n  \"validation\": null\n}"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Save View",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Delete View",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Get Instance (friendly â€” by externalKey in URL)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityDetail.sql"
  },
  {
    "folder": "Entity Data",
    "name": "Save Instance (friendly DataJson keys)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ],
    "examples": [
      {
        "title": "Save",
        "source": "Tests.DataServices/PublicApi/FormsApiTests.cs",
        "lang": "csharp",
        "code": "var (c,b)=await PostAsync(ApiKey.Acme,$\"/api/v1/entities/Customer/instances\",new{key1=\"TST\",dataJson=JsonSerializer.Serialize(new{CustomerNumber=\"TST\"}),importMode=\"upsert\"});\nassert(c==200);"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Bulk Save Instances (friendly DataJson keys)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Cookbook view: OR (Carrier OR Trane) â€” per-rule conjunction",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Cookbook view: AND (high-hours AND Compressor note)",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Cookbook view: 3-way OR brands",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Cookbook error: save with unknown property name â†’ 400",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Entity Data",
    "name": "Cookbook error: cross-entity key â†’ 404",
    "relatedDocs": [
      {
        "title": "Entity Data API Reference",
        "href": "/docs/Integrators/Entity-Data-API"
      },
      {
        "title": "Operator Cookbook",
        "href": "/docs/Integrators/Operator-Cookbook"
      }
    ]
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "AsOf: Equipment snapshot at 2026-02-01 (by EntityId)",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "examples": [
      {
        "title": "AsOf Equipment ReturnsSnapshots",
        "source": "Tests.DataServices/PublicApi/VarianceTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, _) = await PostAsync(ApiKey.Acme,\n    $\"/api/v1/entities/{EntityEquipment}/instances/as-of\",\n    new { asOfDate = \"2026-02-01T00:00:00Z\" });\nAssertOk(code);"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceAsOf.sql",
    "longContext": "Point-in-time snapshot of entity instances at a specific date. Queries both current and historical rows to reconstruct state—critical for compliance and dispute resolution."
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "AsOf: Customer snapshot at 2026-01-15 (by InternalName)",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceAsOf.sql"
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "Variance: Single Equipment record (EIRecordId 12, no date filter)",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql",
    "longContext": "Returns chronological snapshots plus per-property diffs between versions. Shows what changed, when, and by whom—essential for audit and change-tracking workflows."
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "Variance: Q1 2026 window only",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "Variance: Single Equipment record by externalKey",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "Variance: RDG-00100 probe (6 snapshots, all properties)",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "Variance: RDG-00100 probe â€” Temperature only (by propertyNames)",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "Variance: RDG-00100 probe â€” multiple props (by propertyIds)",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Variance & Time-Travel",
    "name": "Variance Discovery: RDG-00100 per-property stats",
    "relatedDocs": [
      {
        "title": "Entity Data API — Variance",
        "href": "/docs/Integrators/Entity-Data-API#variance-detection"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Reports",
    "name": "List Reports",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "examples": [
      {
        "title": "ReportsList ReturnsSavedReports",
        "source": "Tests.DataServices/PublicApi/ReportTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/reports/list\");\nAssertOk(code);\nAssert.IsTrue(ArrayLength(body) > 0, \"Acme seed deploys a handful of sample reports.\");"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/reports/list",
        "lang": "json",
        "code": "[\n  {\n    \"reportDefinitionId\": 2,\n    \"internalName\": \"Carrier Units - Full Chain\",\n    \"description\": \"All Carrier-brand equipment broken down by customer and location. Shows 3-entity chain + cascading filter.\",\n    \"isShared\": true,\n    \"isApiVisible\": true,\n    \"definitionJson\": \"{\\\"primaryEntityId\\\":100013,\\\"joinMode\\\":\\\"inner\\\",\\\"pageSize\\\":50,\\\"joins\\\":[{\\\"entityId\\\":100011,\\\"parentEntityId\\\":null,\\\"joinType\\\":\\\"child\\\"},{\\\"entityId\\\":100010,\\\"parentEntityId\\\":100011,\\\"joinType\\\":\\\"child\\\n  ..."
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/ReportDefinitionList.sql",
    "longContext": "Enumerates all report definitions in the tenant. Reports execute queries against entity data."
  },
  {
    "folder": "Reports",
    "name": "Save Report â€” canonical ID form (showcase)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Save Report â€” 3-entity chain",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Save Report â€” parents-as-joins",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Get Report Detail",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Update Existing Report",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Delete Report",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "examples": [
      {
        "title": "Delete",
        "source": "Tests.DataServices/PublicApi/ApiTestBase.cs",
        "lang": "csharp",
        "code": "var (c,_)=await DeleteAsync(ApiKey.Acme,\"/api/v1/reports/123\");\nassert(c==200||c==404);"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Execute Saved Report",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/ReportExecute.sql",
    "longContext": "Runs a report query against entity data. Executes the stored report definition and returns result set in paginated JSON format."
  },
  {
    "folder": "Reports",
    "name": "Execute Ad-Hoc â€” canonical ID form (showcase)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/ReportExecute.sql"
  },
  {
    "folder": "Reports",
    "name": "Execute Ad-Hoc â€” 3-entity chain + cascading filter",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/ReportExecute.sql"
  },
  {
    "folder": "Reports",
    "name": "Execute Ad-Hoc â€” parents-as-joins",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/ReportExecute.sql"
  },
  {
    "folder": "Reports",
    "name": "Execute Ad-Hoc â€” pagination (page 2)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/ReportExecute.sql"
  },
  {
    "folder": "Reports",
    "name": "HVAC: Carrier Units at CT Locations",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "HVAC: Work Order Dispatch Board",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "HVAC: Billy's Visits",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "HVAC: Service Location Inventory",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "HVAC: Left-Join Demo (all customers even without matching equipment)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Schema Dictionary (tenant vocabulary in one call)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ],
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/schema/dictionary",
        "lang": "json",
        "code": "{\n  \"entities\": [\n    {\n      \"entityId\": 100002,\n      \"internalName\": \"Address\",\n      \"name\": \"Address\",\n      \"description\": \"Physical or mailing address\",\n      \"categoryId\": 3,\n      \"verticalId\": 0,\n      \"globalSourceId\": 102\n    },\n    {\n      \"entityId\": 100004,\n      \"internalName\": \"Appointment\",\n      \"name\": \"Appointment\",\n      \"description\": \"Scheduled appointment\",\n      \"categoryId\": 6,\n      \"verticalId\": 0,\n      \"globalSourceId\": 106\n    },\n    {\n      \"entityId\": 100008,\n      \"internalName\": \"ChecklistItem\",\n      \"name\": \"Checklist Item\",\n      \"description\": \"Individua"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Friendly: Customer â†’ ServiceLocation â†’ Equipment (Carrier)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Friendly: Equipment Drill-Up by Name",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Aggregation: Equipment COUNT per ServiceLocation",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Aggregation: Customer rollup with COUNT + MIN/MAX warranty",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Aggregation: Multi-field group (Location Ãƒâ€” Make) with count",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Aggregation: Equipment by LastServiceDate (date as group key)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Friendly: 400 error demo â€” unknown entity name",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: Filter AND â€” Carrier only",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: AND chain â€” CUST-001 AND Carrier (intersection)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: OR â€” Carrier OR Trane (both brands returned)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: OR 3-way â€” Carrier OR Trane OR Lennox",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: OR with deadweight â€” Carrier OR ZZZNoSuch",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: OR all-miss â†’ empty (not whole table)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: Numeric filter â€” OperatingHours > 10000",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: GroupBy â€” Equipment COUNT per customer",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: Multi-Aggregate â€” Readings rollup (COUNT + SUM + AVG + MAX)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: Temporal â€” Equipment with history Q1 2026",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: 4-Level chain â€” Readings for CUST-001",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: Variance mode â€” Equipment monthly (Q1 2026)",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: Walk UP â€” Equipment with Customer ancestry",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Reports",
    "name": "Cookbook: Error â€” ad-hoc with garbage definitionJson",
    "relatedDocs": [
      {
        "title": "Entity Reports API Reference",
        "href": "/docs/Integrators/Entity-Reports-API"
      }
    ]
  },
  {
    "folder": "Phase P2 â€” Variance Reports",
    "name": "Variance: Equipment monthly cadence (grouped, flat flags)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Phase P2 â€” Variance Reports",
    "name": "Variance: Equipment weekly with includeValues (from/to objects)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Phase P2 â€” Variance Reports",
    "name": "Variance: Customer explicit snapshots (audit/quarter cutoffs)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Phase P2 â€” Variance Reports",
    "name": "Variance: 4-level chain monthly, FLAT paging (export shape)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Phase P2 â€” Variance Reports",
    "name": "Variance: Daily cadence, hits 500-snapshot safety cap",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Phase P2 â€” Variance Reports",
    "name": "Variance: combined with filter (only Carrier equipment, monthly)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Phase P2 â€” Variance Reports",
    "name": "Variance: includeProperties (narrow cross-entity variance)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceVariance.sql"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Universal {ok, issues[]} envelope reference"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Describe form (schema)"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "List records (baseline, no filter)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceList.sql"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "List records â€” filter-as-lock demo (CT only)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceList.sql"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "List records â€” report-backed (Carrier chain)",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceList.sql"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Get single record by externalKey",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntityInstanceDetail.sql"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Create record"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Create record â€” child-entity form via _parentKey1 metadata"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Update record (partial)"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Delete record"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Validate record (dry-run)"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Multi-section save â€” create primary + child rows atomically"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Multi-section save â€” update existing primary + child rows"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Multi-section validate (dry-run create)"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Multi-section validate (dry-run update)"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Update record â€” composite-key 422 (Wave 1 demo)"
  },
  {
    "folder": "Forms API â€” Records",
    "name": "Create record â€” stale expectedLayoutVersion 422 (Wave 1 demo)"
  },
  {
    "folder": "Forms API â€” Shortcuts",
    "name": "List shortcuts on a form",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/StorageShortcutList.sql"
  },
  {
    "folder": "Forms API â€” Shortcuts",
    "name": "Get shortcut by friendly name"
  },
  {
    "folder": "Forms API â€” Shortcuts",
    "name": "Save shortcut (create)"
  },
  {
    "folder": "Forms API â€” Shortcuts",
    "name": "Delete shortcut"
  },
  {
    "folder": "Forms API â€” Shortcuts",
    "name": "Apply shortcut â€” list records through the saved filter"
  },
  {
    "folder": "Menu Manager",
    "name": "List Menu Items",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ],
    "examples": [
      {
        "title": "List ReturnsSeededTenantNav WithDisplays",
        "source": "Tests.DataServices/PublicApi/MenuItemApiTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\nvar (code, body) = await PostAsync(ApiKey.Acme, \"/api/v1/menu-items/list\");\nAssertOk(code);\n\nAssert.IsTrue(body.TryGetProperty(\"items\", out var items));\nAssert.IsTrue(body.TryGetProperty(\"count\", out var count));\nAssert.IsTrue(count.GetInt32() >= SeededItemCount,\n    $\"Should surface at least the {SeededItemCount} seeded TenantNav items.\");\n\nvar parent = FindByInternalName(items, SeedParent);\nAssert.IsNotNull(parent, $\"{SeedParent} must be in the list.\");\nAssert.AreEqual(SeedParentName, parent!.Value.GetProperty(\"name\").GetString());\n\n// Displays[] populated — TenantNav has an EN display seeded\nAssert.IsTrue(parent.Value.TryGetProperty(\"displays\", out var displays));\nAssert.IsTrue(displays.GetArrayLength() >= 1, $\"{SeedParent} should have at least one Displays[] row.\");\nAssert.IsTrue(displays[0].TryGetProperty(\"languageCode\", out _), \"Display row should carry friendly languageCode.\");"
      },
      {
        "title": "List FilterByHomeArea ReturnsOnlyThatArea",
        "source": "Tests.DataServices/PublicApi/MenuItemApiTests.cs",
        "lang": "csharp",
        "code": "SkipIfKeyMissing(ApiKey.Acme);\n// No seeded item has a home_area yet — filter should return zero.\nvar (code, body) = await PostAsync(ApiKey.Acme,\n    \"/api/v1/menu-items/list\", new { homeArea = \"Top\" });\nAssertOk(code);\nAssert.IsTrue(body.TryGetProperty(\"items\", out var items));\nAssert.AreEqual(0, items.GetArrayLength(), \"No items should be featured in Top area by default.\");"
      },
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/menu-items/list",
        "lang": "json",
        "code": "{\n  \"items\": [\n    {\n      \"tenantMenuItemId\": 22,\n      \"tenantId\": 1,\n      \"tenantUserId\": 4,\n      \"parentTenantMenuItemId\": null,\n      \"menuItemTypeId\": 1,\n      \"menuItemType\": \"Form\",\n      \"targetId\": 10,\n      \"externalUrl\": null,\n      \"internalName\": \"CustomerHierarchyForm\",\n      \"name\": \"CustomerHierarchyForm\",\n      \"description\": null,\n      \"iconKey\": \"bi-layout-text-window\",\n      \"displayOrder\": 0,\n      \"isSystem\": false,\n      \"isShared\": false,\n      \"isVisibleInMenu\": true,\n      \"isApiVisible\": false,\n      \"channelFlag\": 3,\n      \"roleFlag\": 0,\n      \"homeAreaId\": null"
      }
    ],
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/TenantMenuItemList.sql",
    "longContext": "Returns the menu hierarchy visible to the current user."
  },
  {
    "folder": "Menu Manager",
    "name": "Get Menu Tree",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ],
    "longContext": "Retrieves full menu definition with all navigation items and their properties.",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/menu-items/tree",
        "lang": "json",
        "code": "{\n  \"roots\": [\n    {\n      \"children\": [],\n      \"tenantMenuItemId\": 22,\n      \"tenantId\": 1,\n      \"tenantUserId\": 4,\n      \"parentTenantMenuItemId\": null,\n      \"menuItemTypeId\": 1,\n      \"menuItemType\": \"Form\",\n      \"targetId\": 10,\n      \"externalUrl\": null,\n      \"internalName\": \"CustomerHierarchyForm\",\n      \"name\": \"CustomerHierarchyForm\",\n      \"description\": null,\n      \"iconKey\": \"bi-layout-text-window\",\n      \"displayOrder\": 0,\n      \"isSystem\": false,\n      \"isShared\": false,\n      \"isVisibleInMenu\": true,\n      \"isApiVisible\": false,\n      \"channelFlag\": 3,\n      \"roleFlag\": 0,\n  "
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Get Menu Targets (AdminSettings)",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ],
    "longContext": "Retrieves navigation targets and links for menu items.",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/menu-items/targets",
        "lang": "json",
        "code": "{\n  \"categories\": [\n    {\n      \"menuItemType\": \"Form\",\n      \"menuItemTypeId\": 1,\n      \"targets\": [\n        {\n          \"targetId\": 9,\n          \"internalName\": \"CarrierChainForm\",\n          \"name\": \"CarrierChainForm\",\n          \"description\": \"Report-backed form \\u2014 Phase 3 target. Bound to the Carrier Units - Full Chain report (Customer ? ServiceLocation ? Equipment filtered to Make=Carrier). Each row carries the full chain; fields reference CombinedPivotJson columns via columnKey rather than property. Primary entity is Customer, so creates land on Customer with children loaded for cont"
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Get Menu Item (by InternalName)",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Create Menu Item (pinned form)",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Create Menu Item (API-only directory entry)",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Update Menu Item (partial)",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Reorder Menu Item",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Save Display (Spanish)",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ]
  },
  {
    "folder": "Menu Manager",
    "name": "Delete Menu Item",
    "relatedDocs": [
      {
        "title": "Forms API",
        "href": "/docs/Integrators/Forms-API"
      }
    ]
  },
  {
    "folder": "EntitySync â€” Dream Wizard",
    "name": "1. Upload file â€” multipart, returns assetKey"
  },
  {
    "folder": "EntitySync â€” Dream Wizard",
    "name": "2. Probe â€” read headers + samples from an uploaded asset",
    "sourceProc": "DB.Tenant/prtl/Stored Procedures/EntitySyncProbeFieldList.sql"
  },
  {
    "folder": "EntitySync â€” Dream Wizard",
    "name": "3. Save profile from import (Crossover)"
  },
  {
    "folder": "EntitySync â€” Dream Wizard",
    "name": "Wipe all instances (testing only â€” destructive)"
  },
  {
    "folder": "WhoAmI â€” caller self-description",
    "name": "Who am I?"
  },
  {
    "folder": "Forms API — Records",
    "name": "Universal {ok, issues[]} envelope reference",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/schema/whoami",
        "lang": "json",
        "code": "{\n  \"tenantId\": 1,\n  \"tenantUserId\": 4,\n  \"userId\": 2,\n  \"userName\": \"kbarrett\",\n  \"displayName\": \"Acme Corporation\",\n  \"roleFlag\": 134217215,\n  \"languageRegionId\": 69,\n  \"timeZoneId\": 24,\n  \"timeZoneIana\": \"America/Guatemala\",\n  \"timeZoneAbbrev\": \"CST\",\n  \"standardOffsetMinutes\": -360,\n  \"currentOffsetMinutes\": -360,\n  \"serverTimeUtc\": \"2026-04-30T05:30:57Z\",\n  \"serverTimeLocal\": \"2026-04-29T23:30:57\",\n  \"tenantHost\": \"localhost\",\n  \"tenantSubDomain\": \"acme\",\n  \"tenantName\": \"Acme Corporation\"\n}"
      }
    ]
  },
  {
    "folder": "Forms API — Records",
    "name": "Describe form (schema)",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/forms/CustomerBasicForm/schema",
        "lang": "json",
        "code": "{\n  \"form\": {\n    \"id\": 1,\n    \"internalName\": \"CustomerBasicForm\",\n    \"description\": \"Starter Customer form \\u2014 CustomerNumber (key) + OrgName + OrgPhone on a single row. Bound to the All Customers view so list mode returns every active customer.\",\n    \"entity\": \"Customer\",\n    \"entityId\": 100013,\n    \"allowNew\": true,\n    \"allowEdit\": true,\n    \"allowDelete\": false,\n    \"canCreate\": true,\n    \"isShared\": true,\n    \"isSystem\": false,\n    \"isApiVisible\": true,\n    \"binding\": {\n      \"type\": \"view\",\n      \"id\": 9,\n      \"name\": \"All Customers\",\n      \"entities\": null\n    }\n  },\n  \"fields\": "
      }
    ]
  },
  {
    "folder": "Forms API — Records",
    "name": "List records (baseline, no filter)",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/forms/CustomerBasicForm/records/list",
        "lang": "json",
        "code": "{\n  \"records\": [\n    {\n      \"eiRecordId\": 2,\n      \"externalKey\": \"CUST-002\",\n      \"parentEIRecordId\": null,\n      \"data\": {\n        \"CustomerNumber\": \"CUST-002\",\n        \"OrgName\": \"Metro Medical Group\",\n        \"OrgPhone\": \"312-555-0002\"\n      },\n      \"modifiedDate\": \"2026-04-30T00:43:07.353Z\"\n    },\n    {\n      \"eiRecordId\": 3,\n      \"externalKey\": \"CUST-003\",\n      \"parentEIRecordId\": null,\n      \"data\": {\n        \"CustomerNumber\": \"CUST-003\",\n        \"OrgName\": \"Sunbelt Real Estate\",\n        \"OrgPhone\": \"512-555-0003\"\n      },\n      \"modifiedDate\": \"2026-04-30T00:43:07.353Z\"\n    }\n  ],"
      }
    ]
  },
  {
    "folder": "Forms API — Records",
    "name": "List records — filter-as-lock demo (CT only)",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/forms/CTOnlyServiceLocationForm/records/list",
        "lang": "json",
        "code": "{\n  \"records\": [],\n  \"page\": 1,\n  \"pageSize\": 50,\n  \"lockedFields\": {\n    \"State\": \"CT\"\n  }\n}"
      }
    ]
  },
  {
    "folder": "Forms API — Records",
    "name": "List records — report-backed (Carrier chain)",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/forms/CarrierChainForm/records/list",
        "lang": "json",
        "code": "{\n  \"records\": [\n    {\n      \"eiRecordId\": 2,\n      \"externalKey\": \"CUST-002\",\n      \"parentEIRecordId\": null,\n      \"data\": {\n        \"Equipment_EIRecordId\": 22,\n        \"Equipment_ExternalKey\": \"EQUIP-011 / CUST-002 / LOC-006\",\n        \"Equipment_EquipmentSerial\": \"SN-87231\",\n        \"Equipment_EquipmentModel\": \"48HC-A24\",\n        \"Equipment_WarrantyExpiration\": \"2027-04-15\",\n        \"Equipment_LastServiceDate\": \"2026-04-05\",\n        \"Equipment_InstallLocation\": \"Main Floor\",\n        \"Equipment_CustomerNumber\": \"CUST-002\",\n        \"Equipment_LocationNumber\": \"LOC-006\",\n        \"Equipment_Equ"
      }
    ]
  },
  {
    "folder": "Forms API — Shortcuts",
    "name": "List shortcuts on a form",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/forms/CTOnlyServiceLocationForm/shortcuts/list",
        "lang": "json",
        "code": "// total items: 1 (showing 1)\n{\n  \"entityFormShortcutId\": 1,\n  \"entityFormLayoutId\": 4,\n  \"internalName\": \"HartfordOnly\",\n  \"description\": \"Narrow the CT-locked locations form to Hartford sites. Demonstrates shortcuts composing on top of filter-as-lock.\",\n  \"isShared\": true,\n  \"isSystem\": false,\n  \"isApiVisible\": true,\n  \"filterJson\": \"{\\\"logic\\\":\\\"AND\\\",\\\"rules\\\":[{\\\"entity\\\":\\\"ServiceLocation\\\",\\\"property\\\":\\\"City\\\",\\\"op\\\":\\\"eq\\\",\\\"value\\\":\\\"Hartford\\\"}],\\\"groups\\\":null}\",\n  \"modifiedDate\": \"2026-04-30T00:43:08.096Z\",\n  \"ownerName\": \"kbarrett\"\n}"
      }
    ]
  },
  {
    "folder": "Forms API — Shortcuts",
    "name": "Apply shortcut — list records through the saved filter",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/forms/CTOnlyServiceLocationForm/shortcuts/HartfordOnly/records/list",
        "lang": "json",
        "code": "{\n  \"records\": [],\n  \"page\": 1,\n  \"pageSize\": 50,\n  \"lockedFields\": {\n    \"State\": \"CT\",\n    \"City\": \"Hartford\"\n  }\n}"
      }
    ]
  },
  {
    "folder": "WhoAmI — caller self-description",
    "name": "Who am I?",
    "examples": [
      {
        "title": "Live response from Acme dev tenant",
        "source": "live: POST /api/v1/schema/whoami",
        "lang": "json",
        "code": "{\n  \"tenantId\": 1,\n  \"tenantUserId\": 4,\n  \"userId\": 2,\n  \"userName\": \"kbarrett\",\n  \"displayName\": \"Acme Corporation\",\n  \"roleFlag\": 134217215,\n  \"languageRegionId\": 69,\n  \"timeZoneId\": 24,\n  \"timeZoneIana\": \"America/Guatemala\",\n  \"timeZoneAbbrev\": \"CST\",\n  \"standardOffsetMinutes\": -360,\n  \"currentOffsetMinutes\": -360,\n  \"serverTimeUtc\": \"2026-04-30T05:30:58Z\",\n  \"serverTimeLocal\": \"2026-04-29T23:30:58\",\n  \"tenantHost\": \"localhost\",\n  \"tenantSubDomain\": \"acme\",\n  \"tenantName\": \"Acme Corporation\"\n}"
      }
    ]
  }
]