{"items":[{"type":"link","label":"Aiwyn API","link":"/bundle","routeSlug":"/bundle","content":{"contentType":"overview","meta":{"name":"Aiwyn API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"bundle.json","url":"/_bundle/bundle.json?download"},{"kind":"download","label":"bundle.yaml","url":"/_bundle/bundle.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"URL","titleTranslationKey":"info.contact.url","label":"https://www.aiwyn.ai/","url":"https://www.aiwyn.ai/"},{"kind":"email","title":"Aiwyn API Support","email":"api-support@aiwyn.ai","label":"api-support@aiwyn.ai","withCopyButton":true,"copyContent":"api-support@aiwyn.ai"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Aiwyn API (1.0.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[]}],"sectionId":"/bundle"}],"sectionId":"/bundle"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":1,"id":"section/welcome-to-aiwyn-api"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Welcome to Aiwyn API"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Aiwyn API provides programmatic access to our comprehensive suite of financial automation tools."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Build powerful integrations and automate your accounting workflows with our RESTful APIs."},"children":[]}]}]}]}],"sectionId":"/bundle/section/welcome-to-aiwyn-api"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/welcome-to-aiwyn-api/key-features"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Key Features"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"🔐 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Secure Authentication"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - JWT API key exchange for short-lived bearer JWTs"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"📊 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real-time Data"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Access up-to-date financial information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"🚀 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"High Performance"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Low latency, high throughput API infrastructure"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"📚 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Comprehensive Coverage"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Full access to clients, engagements, expenses, and more"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"🛠️ "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Developer-Friendly"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Extensive documentation, SDKs, and code examples"},"children":[]}]}]}]}]}],"sectionId":"/bundle/section/welcome-to-aiwyn-api/key-features"}],"sectionId":"/bundle/section/welcome-to-aiwyn-api/key-features"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/welcome-to-aiwyn-api/api-versioning"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API Versioning"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"We use URL versioning for our APIs. The current version is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"v1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". All endpoints are prefixed with the version number."},"children":[]}]}]}]}],"sectionId":"/bundle/section/welcome-to-aiwyn-api/api-versioning"}],"sectionId":"/bundle/section/welcome-to-aiwyn-api/api-versioning"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/welcome-to-aiwyn-api/testing-enviornments"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Testing Enviornments"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sandbox"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" runs the latest development branch."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staging"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" mirrors production behavior and stability."},"children":[]}]}]}]}]}],"sectionId":"/bundle/section/welcome-to-aiwyn-api/testing-enviornments"}],"sectionId":"/bundle/section/welcome-to-aiwyn-api/testing-enviornments"}]}]}},{"type":"group","label":"Welcome to Aiwyn API","link":"/bundle/section/welcome-to-aiwyn-api","routeSlug":"/bundle/section/welcome-to-aiwyn-api","items":[{"type":"link","label":"Key Features","link":"/bundle/section/welcome-to-aiwyn-api/key-features","routeSlug":"/bundle/section/welcome-to-aiwyn-api/key-features","content":null},{"type":"link","label":"API Versioning","link":"/bundle/section/welcome-to-aiwyn-api/api-versioning","routeSlug":"/bundle/section/welcome-to-aiwyn-api/api-versioning","content":null},{"type":"link","label":"Testing Enviornments","link":"/bundle/section/welcome-to-aiwyn-api/testing-enviornments","routeSlug":"/bundle/section/welcome-to-aiwyn-api/testing-enviornments","content":null}],"content":null},{"type":"group","label":"🔐 Authentication","link":"/bundle/authentication","routeSlug":"/bundle/authentication","items":[{"label":"Generate API Token","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/authentication/generateapitoken","routeSlug":"/bundle/authentication/generateapitoken","metadata":{"seo":{"title":"Generate API Token","description":"Exchange a JWT API key for a short-lived bearer JWT used to access Product APIs."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"generateApiToken","name":"Generate API Token","isWebhook":false,"pointer":"/paths/~1v1~1auth~1token/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Generate API Token","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange a "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT API key"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for a "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"short-lived bearer JWT"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" used to access Product APIs."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Headers:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Tenant"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": your tenant schema (recommended; required by many endpoints)"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_110"}},"schemaId":"schema_110","pointer":"/paths/~1v1~1auth~1token/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/v1/auth/token","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"requestBody":{"application/json":{"schemaId":"schema_110"}},"responseCodes":["200","400","401"],"pointer":"/v1/auth/token","href":"authentication/generateapitoken","openApiOperationId":"generateApiToken","summary":"Generate API Token"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_110","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_110"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"API Token generated successfully.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_111"}},"schemaId":"schema_111"},{"code":"400","description":"Bad Request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"},{"code":"401","description":"Unauthorized","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"}],"pointer":"/paths/~1v1~1auth~1token/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_111","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_111"}}},{"code":"400","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}},{"code":"401","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/authentication/generateapitoken"}],"panels":[]}]},"httpPath":"/v1/auth/token"}],"content":{"contentType":"group","meta":{"name":"Authentication"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🔐 Authentication","showPageActions":true},{"nodeType":"markdoc","content":"Authentication endpoints for obtaining access tokens and managing API keys."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v1/auth/token","summary":"Generate API Token","prefix":{"name":"post","color":"post"},"badges":[],"link":"/authentication/generateapitoken","deprecated":false}]}]}]}]}},{"type":"group","label":"👤 Client","link":"/bundle/client","routeSlug":"/bundle/client","items":[{"label":"List clients","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client/getclients","routeSlug":"/bundle/client/getclients","metadata":{"seo":{"title":"List clients","description":"Retrieve all clients with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getClients","name":"List clients","isWebhook":false,"pointer":"/paths/~1gql~1v1~1clients/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List clients","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all clients with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides simple client listing capabilities without any filtering restrictions."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"It's designed for scenarios where you need to browse through the entire client database"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"with standard pagination controls."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Key Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Basic pagination with configurable page sizes (default: 50 records)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Default sorting by client name (ascending) then creation date (descending)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete client information including contact details and staff assignments"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Total count aggregation for pagination metadata"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"No filtering logic - returns all clients in the system"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optimized for dashboard displays and data export operations"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Performance Considerations:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Default 50-record pageSize prevents memory issues with large datasets"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Indexed sorting on name and createdAt fields for optimal query performance"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Consider using filtered queries for large client databases (1000+ records)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Suitable for datasets up to 10,000 clients with reasonable response times"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/clients' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/clients' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_112","exampleIds":["paths/~1gql~1v1~1clients/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_112","exampleIds":["paths/~1gql~1v1~1clients/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1clients/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/clients","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_112","exampleIds":["paths/~1gql~1v1~1clients/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","500"],"pointer":"/gql/v1/clients","href":"client/getclients","openApiOperationId":"getClients","summary":"List clients"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_112","exampleIds":["paths/~1gql~1v1~1clients/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_112","exampleIds":["paths/~1gql~1v1~1clients/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved client list","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_113","exampleIds":["paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_113","exampleIds":["paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error","exampleIds":["paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/invalid_page_size","paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/negative_page"]}},"schemaId":"components/schemas/Error","exampleIds":["paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/invalid_page_size","paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/negative_page"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"}],"pointer":"/paths/~1gql~1v1~1clients/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_113","exampleIds":["paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_113","exampleIds":["paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"components/schemas/Error","exampleIds":["paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/invalid_page_size","paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/negative_page"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error","exampleIds":["paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/invalid_page_size","paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/negative_page"]}}},{"code":"500","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client/getclients"}],"panels":[]}]},"httpPath":"/gql/v1/clients"},{"label":"Search clients","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client/filterclientsdynamic","routeSlug":"/bundle/client/filterclientsdynamic","metadata":{"seo":{"title":"Search clients","description":"Advanced client filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterClientsDynamic","name":"Search clients","isWebhook":false,"pointer":"/paths/~1gql~1v1~1clients~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search clients","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced client filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This query provides maximum flexibility for client data retrieval through custom"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"GraphQL-style where clause construction and dynamic ordering specifications."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"It's designed for complex business requirements that need sophisticated filtering logic."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Key Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Custom GraphQL where clause construction for unlimited filtering combinations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dynamic order_by specifications supporting multi-field sorting with custom directions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced boolean logic combining multiple filter conditions with _and, _or, _not"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Relationship-based filtering across connected entities (contacts, staff assignments)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Custom pagination with flexible pageSize and page controls for any result set size"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Full access to GraphQL query capabilities through REST interface abstraction"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Enterprise-grade filtering supporting complex business logic requirements"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Support for nested queries and conditional logic patterns"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced Filtering Capabilities:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Boolean Logic"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": _and, _or, _not operators for complex condition combinations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Text Operations"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": _like, _ilike, _regex for pattern matching and search"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Comparison Operators"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": _gt, _gte, _lt, _lte, _eq, _neq for numerical/date comparisons"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Array Operations"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": _in, _nin for multi-value filtering and inclusion/exclusion"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Null Handling"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": _is_null for empty value detection and filtering"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Relationship Traversal"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Filter on connected entities like contacts and staff"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Date Ranges"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Precision timestamp filtering for time-based analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Case Sensitivity"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Both case-sensitive and case-insensitive text matching"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dynamic Ordering Options:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Multi-field Sorting"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Order by multiple columns with individual sort directions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Relationship Sorting"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Sort by connected entity fields (staff names, contact info)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Custom Directions"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Mix ascending and descending order across different fields"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Priority Ordering"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Define primary, secondary, tertiary sort criteria"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Date-based Sorting"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": createdAt, updatedAt for chronological ordering"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Text Sorting"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Alphabetical ordering with locale-aware collation"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/clients/search' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"name\": {\n              \"_ilike\": \"%tech%\"\n            }\n          },\n          {\n            \"clientRef\": {\n              \"_ilike\": \"%45%\"\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"partnerStaffId\": {\n          \"_in\": [\n            5,\n            6,\n            7,\n            8\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"name\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/clients/search' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"name\": {\n              \"_ilike\": \"%tech%\"\n            }\n          },\n          {\n            \"clientRef\": {\n              \"_ilike\": \"%45%\"\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"partnerStaffId\": {\n          \"_in\": [\n            5,\n            6,\n            7,\n            8\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"name\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_114","exampleIds":["paths/~1gql~1v1~1clients~1search/post/requestBody/content/application~1json/examples/default_search"]}},"schemaId":"schema_114","exampleIds":["paths/~1gql~1v1~1clients~1search/post/requestBody/content/application~1json/examples/default_search"],"pointer":"/paths/~1gql~1v1~1clients~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/clients/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_114","exampleIds":["paths/~1gql~1v1~1clients~1search/post/requestBody/content/application~1json/examples/default_search"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/clients/search","href":"client/filterclientsdynamic","openApiOperationId":"filterClientsDynamic","summary":"Search clients"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_114","exampleIds":["paths/~1gql~1v1~1clients~1search/post/requestBody/content/application~1json/examples/default_search"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_114","exampleIds":["paths/~1gql~1v1~1clients~1search/post/requestBody/content/application~1json/examples/default_search"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered clients with dynamic ordering","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_115","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_115","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid filter parameters or malformed where clause","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_where_clause","paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_order_by"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_where_clause","paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_order_by"]},{"code":"401","description":"Unauthorized - missing or invalid admin secret","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/401/content/application~1json/examples/missing_auth"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/401/content/application~1json/examples/missing_auth"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}},"schemaId":"schema_116"}],"pointer":"/paths/~1gql~1v1~1clients~1search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_115","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_115","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_where_clause","paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_order_by"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_where_clause","paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_order_by"]}}},{"code":"401","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/401/content/application~1json/examples/missing_auth"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1clients~1search/post/responses/401/content/application~1json/examples/missing_auth"]}}},{"code":"500","schemaId":"schema_116","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client/filterclientsdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/clients/search"},{"label":"Get client by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client/getclientbyid","routeSlug":"/bundle/client/getclientbyid","metadata":{"seo":{"title":"Get client by ID","description":"Retrieve a specific client by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getClientById","name":"Get client by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1client~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get client by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific client by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed client information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete client details and demographics"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client status and relationship information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact and address information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement and project portfolio"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial and billing information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Industry and business classification"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Management Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client lifecycle tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Relationship management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact and address management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement portfolio oversight"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial and billing setup"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client name and demographics"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client status and type"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Address and location"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement portfolio"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial information"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement portfolio analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial performance tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business development planning"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/client/789' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/client/789' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 789,\n  \"name\": \"Acme Corporation\",\n  \"legalName\": \"Acme Corporation, Inc.\",\n  \"status\": \"ACTIVE\",\n  \"type\": \"CORPORATE\",\n  \"industry\": \"MANUFACTURING\",\n  \"size\": \"LARGE\",\n  \"website\": \"https://www.acme.com\",\n  \"taxId\": \"12-3456789\",\n  \"phone\": \"+1-555-0123\",\n  \"email\": \"info@acme.com\",\n  \"address\": {\n    \"street\": \"123 Business Ave\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10001\",\n    \"country\": \"USA\"\n  },\n  \"billingAddress\": {\n    \"street\": \"456 Finance Blvd\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10002\",\n    \"country\": \"USA\"\n  },\n  \"primaryContact\": {\n    \"id\": 23456,\n    \"name\": \"John Smith\",\n    \"title\": \"Chief Financial Officer\",\n    \"email\": \"john.smith@acme.com\",\n    \"phone\": \"+1-555-0123\"\n  },\n  \"engagements\": [\n    {\n      \"id\": 34567,\n      \"name\": \"Annual Audit Engagement 2024\",\n      \"status\": \"ACTIVE\",\n      \"type\": \"AUDIT\",\n      \"startDate\": \"2024-01-01T00:00:00Z\",\n      \"endDate\": \"2024-12-31T23:59:59Z\"\n    }\n  ],\n  \"financialSummary\": {\n    \"totalRevenue\": 150000.00,\n    \"outstandingBalance\": 25000.00,\n    \"currency\": \"USD\",\n    \"lastPaymentDate\": \"2024-11-15T10:30:00Z\"\n  },\n  \"notes\": \"Long-term client with excellent payment history and strong relationship\",\n  \"createdAt\": \"2020-01-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 789,\n  \"name\": \"Acme Corporation\",\n  \"legalName\": \"Acme Corporation, Inc.\",\n  \"status\": \"ACTIVE\",\n  \"type\": \"CORPORATE\",\n  \"industry\": \"MANUFACTURING\",\n  \"size\": \"LARGE\",\n  \"website\": \"https://www.acme.com\",\n  \"taxId\": \"12-3456789\",\n  \"phone\": \"+1-555-0123\",\n  \"email\": \"info@acme.com\",\n  \"address\": {\n    \"street\": \"123 Business Ave\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10001\",\n    \"country\": \"USA\"\n  },\n  \"billingAddress\": {\n    \"street\": \"456 Finance Blvd\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10002\",\n    \"country\": \"USA\"\n  },\n  \"primaryContact\": {\n    \"id\": 23456,\n    \"name\": \"John Smith\",\n    \"title\": \"Chief Financial Officer\",\n    \"email\": \"john.smith@acme.com\",\n    \"phone\": \"+1-555-0123\"\n  },\n  \"engagements\": [\n    {\n      \"id\": 34567,\n      \"name\": \"Annual Audit Engagement 2024\",\n      \"status\": \"ACTIVE\",\n      \"type\": \"AUDIT\",\n      \"startDate\": \"2024-01-01T00:00:00Z\",\n      \"endDate\": \"2024-12-31T23:59:59Z\"\n    }\n  ],\n  \"financialSummary\": {\n    \"totalRevenue\": 150000.00,\n    \"outstandingBalance\": 25000.00,\n    \"currency\": \"USD\",\n    \"lastPaymentDate\": \"2024-11-15T10:30:00Z\"\n  },\n  \"notes\": \"Long-term client with excellent payment history and strong relationship\",\n  \"createdAt\": \"2020-01-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the client","required":true,"example":789}],"pointer":"/paths/~1gql~1v1~1client~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/client/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":789,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/client/{id}","href":"client/getclientbyid","openApiOperationId":"getClientById","summary":"Get client by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Client details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_118"}},"schemaId":"schema_118"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this client"},{"code":"404","description":"Client not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_119"}},"schemaId":"schema_119"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1client~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_118","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_118"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_119","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_119"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client/getclientbyid"}],"panels":[]}]},"httpPath":"/gql/v1/client/{id}"},{"label":"Client Onboarding","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client/onboardnewclient","routeSlug":"/bundle/client/onboardnewclient","metadata":{"seo":{"title":"Client Onboarding","description":"Onboard a new client with inline contact creation"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"onboardNewClient","name":"Client Onboarding","isWebhook":false,"pointer":"/paths/~1api~1v1~1clients~1v1~1onboard/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Client Onboarding","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Onboard a new client with inline contact creation"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates a new client record and simultaneously resolves or creates up to three"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"associated contacts (preferred, billing, and secondary). Each contact field accepts"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"either an existing contact ID or a full inline payload to create a brand-new contact."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Required fields:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — client display name"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — practice management system reference"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"clientRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — unique client reference identifier"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"officeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — ID of the office this client belongs to"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact fields"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"prefContact"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingContact"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"secondaryContact"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"):"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each contact field is optional but, when provided, must include "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"either"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" an existing"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"or"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contactInfo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" object — not both."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When supplying "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contactInfo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on the contact payload is required."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"At least one of "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"prefix"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"firstName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"lastName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" must be provided inside"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contactInfo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to form a valid full name."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Classification & billing fields"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (all optional):"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"clientTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"clientBusinessEntityId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (entity type), and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staffBillingManagerId"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"each reference an existing record; an unknown ID is rejected with "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"400"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fiscalYearEndMonth"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (1–12) and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fiscalYearEndDay"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (1–31) capture the client's fiscal"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"year end."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Custom fields"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"customFieldValuesJson"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"): a JSON object, encoded as a string, mapping"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"custom field keys to values. Keys not defined in the tenant's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CLIENT"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" custom-field schema"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"are dropped rather than failing the request, and are echoed back in"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"data.ignoredCustomFields"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (and appended to the response "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"message"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). The onboard still"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"returns "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"201"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax regions"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taxRegionIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"): a list of existing tax region IDs to link to the new"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"client. Duplicate IDs are de-duplicated; an unknown ID is rejected with "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"400"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"assigned IDs are returned in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"data.taxRegionIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Addresses"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"address"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingAddress"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), both optional and stored the same way the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Firm Portal \"Create New Client\" dialog stores them:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"address"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is the client's own address. It is saved as the client's contact info record"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"and shows in the portal's "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Address"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" section; its ID is returned in"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"data.clientContactInfoId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingAddress"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is saved as a client address of type "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billing"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and shows in the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"portal's "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billing Address"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" section; its ID is returned in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"data.billingAddressId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"country"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" must be an ISO 3166-1 alpha-2 code (e.g. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"US"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CA"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GB"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"); it is accepted"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"case-insensitively and stored upper-case."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"country"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"US"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"state"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" must be a US state name or abbreviation and is stored"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"as the abbreviation (e.g. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"North Carolina"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" → "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NC"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). For other countries "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"state"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"stored as given."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is optional on both; when omitted an Aiwyn reference ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"AIWYN_<uuid>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") is"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"generated. A "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" that already exists is rejected with "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"400"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An address object must carry at least one address field; an invalid country, state or"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"duplicate "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" rejects the whole request with "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"400"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and no client is created."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/clients/v1/onboard' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Acme Corporation\",\n  \"pmsRef\": \"ACME-001\",\n  \"clientRef\": \"ACME-001\",\n  \"officeId\": 1,\n  \"prefContact\": {\n    \"pmsRef\": \"CONT-001\",\n    \"contactInfo\": {\n      \"pmsRef\": \"CONT-001\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Smith\",\n      \"email\": \"jane.smith@acme.com\"\n    }\n  },\n  \"address\": {\n    \"address\": \"123 Main St\",\n    \"address2\": \"Suite 400\",\n    \"city\": \"Charlotte\",\n    \"state\": \"NC\",\n    \"country\": \"US\",\n    \"zipCode\": \"28202\"\n  },\n  \"billingAddress\": {\n    \"pmsRef\": \"ACME-001-BILLING\",\n    \"address\": \"PO Box 999\",\n    \"city\": \"Raleigh\",\n    \"state\": \"NC\",\n    \"country\": \"US\",\n    \"zipCode\": \"27601\"\n  }\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/clients/v1/onboard' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Acme Corporation\",\n  \"pmsRef\": \"ACME-001\",\n  \"clientRef\": \"ACME-001\",\n  \"officeId\": 1,\n  \"prefContact\": {\n    \"pmsRef\": \"CONT-001\",\n    \"contactInfo\": {\n      \"pmsRef\": \"CONT-001\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Smith\",\n      \"email\": \"jane.smith@acme.com\"\n    }\n  },\n  \"address\": {\n    \"address\": \"123 Main St\",\n    \"address2\": \"Suite 400\",\n    \"city\": \"Charlotte\",\n    \"state\": \"NC\",\n    \"country\": \"US\",\n    \"zipCode\": \"28202\"\n  },\n  \"billingAddress\": {\n    \"pmsRef\": \"ACME-001-BILLING\",\n    \"address\": \"PO Box 999\",\n    \"city\": \"Raleigh\",\n    \"state\": \"NC\",\n    \"country\": \"US\",\n    \"zipCode\": \"27601\"\n  }\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_120","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/new_contact_inline","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/existing_contact","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/crm_integration_fields","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/with_addresses"]}},"schemaId":"schema_120","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/new_contact_inline","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/existing_contact","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/crm_integration_fields","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/with_addresses"],"pointer":"/paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/clients/v1/onboard","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_120","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/new_contact_inline","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/existing_contact","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/crm_integration_fields","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/with_addresses"]}},"responseCodes":["201","400","401","403","500"],"pointer":"/api/v1/clients/v1/onboard","href":"client/onboardnewclient","openApiOperationId":"onboardNewClient","summary":"Client Onboarding"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_120","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/new_contact_inline","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/existing_contact","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/crm_integration_fields","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/with_addresses"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_120","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/new_contact_inline","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/existing_contact","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/crm_integration_fields","paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/with_addresses"]}},"examples":[{},{},{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client onboarded successfully. Unknown custom field keys are dropped and reported in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"data.ignoredCustomFields"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the write still succeeds."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_121","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_addresses","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_ignored_custom_fields"]}},"schemaId":"schema_121","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_addresses","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_ignored_custom_fields"]},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invalid input data — for example, both "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contactInfo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" were supplied on a contact field, a required field is missing, or an address has an unknown country/US state or a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" that already exists"},"children":[]}]}]}]},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_CLIENT_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1clients~1v1~1onboard/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"201","schemaId":"schema_121","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_addresses","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_ignored_custom_fields"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_121","exampleIds":["paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_addresses","paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_ignored_custom_fields"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client/onboardnewclient"}],"panels":[]}]},"httpPath":"/api/v1/clients/v1/onboard"},{"label":"List client types","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client/getclienttypespaginated","routeSlug":"/bundle/client/getclienttypespaginated","metadata":{"seo":{"title":"List client types","description":"Retrieve all client types with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getClientTypesPaginated","name":"List client types","isWebhook":false,"pointer":"/paths/~1gql~1v1~1client_types/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List client types","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all client types with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura. Use it to resolve the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"clientTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values accepted by the Client Onboarding endpoint"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /api/v1/clients/v1/onboard"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_types/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_types/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1client_types/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/client_types","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_types/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/client_types","href":"client/getclienttypespaginated","openApiOperationId":"getClientTypesPaginated","summary":"List client types"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_types/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_types/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved client types","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_123","exampleIds":["paths/~1gql~1v1~1client_types/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_123","exampleIds":["paths/~1gql~1v1~1client_types/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1client_types/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_123","exampleIds":["paths/~1gql~1v1~1client_types/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_123","exampleIds":["paths/~1gql~1v1~1client_types/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client/getclienttypespaginated"}],"panels":[]}]},"httpPath":"/gql/v1/client_types"},{"label":"List tax regions","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client/gettaxregionspaginated","routeSlug":"/bundle/client/gettaxregionspaginated","metadata":{"seo":{"title":"List tax regions","description":"Retrieve all tax regions with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTaxRegionsPaginated","name":"List tax regions","isWebhook":false,"pointer":"/paths/~1gql~1v1~1tax_regions/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List tax regions","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all tax regions with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura. Use it to resolve the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taxRegionIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values accepted by the Client Onboarding endpoint"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /api/v1/clients/v1/onboard"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1tax_regions/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1tax_regions/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1tax_regions/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/tax_regions","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1tax_regions/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/tax_regions","href":"client/gettaxregionspaginated","openApiOperationId":"getTaxRegionsPaginated","summary":"List tax regions"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1tax_regions/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1tax_regions/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved tax regions","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_124","exampleIds":["paths/~1gql~1v1~1tax_regions/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_124","exampleIds":["paths/~1gql~1v1~1tax_regions/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1tax_regions/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_124","exampleIds":["paths/~1gql~1v1~1tax_regions/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_124","exampleIds":["paths/~1gql~1v1~1tax_regions/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client/gettaxregionspaginated"}],"panels":[]}]},"httpPath":"/gql/v1/tax_regions"}],"content":{"contentType":"group","meta":{"name":"Client"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"👤 Client","showPageActions":true},{"nodeType":"markdoc","content":"Manage client records, profiles, and related operations."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/clients","summary":"List clients","prefix":{"name":"post","color":"post"},"badges":[],"link":"/client/getclients","deprecated":false},{"title":"/gql/v1/clients/search","summary":"Search clients","prefix":{"name":"post","color":"post"},"badges":[],"link":"/client/filterclientsdynamic","deprecated":false},{"title":"/gql/v1/client/{id}","summary":"Get client by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/client/getclientbyid","deprecated":false},{"title":"/api/v1/clients/v1/onboard","summary":"Client Onboarding","prefix":{"name":"post","color":"post"},"badges":[],"link":"/client/onboardnewclient","deprecated":false},{"title":"/gql/v1/client_types","summary":"List client types","prefix":{"name":"post","color":"post"},"badges":[],"link":"/client/getclienttypespaginated","deprecated":false},{"title":"/gql/v1/tax_regions","summary":"List tax regions","prefix":{"name":"post","color":"post"},"badges":[],"link":"/client/gettaxregionspaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"👥 Client Group","link":"/bundle/client-group","routeSlug":"/bundle/client-group","items":[{"label":"List client groups","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client-group/getclientgroups","routeSlug":"/bundle/client-group/getclientgroups","metadata":{"seo":{"title":"List client groups","description":"Retrieve all client groups with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getClientGroups","name":"List client groups","isWebhook":false,"pointer":"/paths/~1gql~1v1~1client_groups/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List client groups","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all client groups with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint returns a paginated list of all client groups in the tenant,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"including assigned partner/manager staff and office information."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Key Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Basic pagination with configurable page sizes (default: 50 records)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Default sorting by client group name (ascending) then creation date (descending)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Total count aggregation for pagination metadata"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/client_groups' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/client_groups' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_125","exampleIds":["paths/~1gql~1v1~1client_groups/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_125","exampleIds":["paths/~1gql~1v1~1client_groups/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1client_groups/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/client_groups","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_125","exampleIds":["paths/~1gql~1v1~1client_groups/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/client_groups","href":"client-group/getclientgroups","openApiOperationId":"getClientGroups","summary":"List client groups"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_125","exampleIds":["paths/~1gql~1v1~1client_groups/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_125","exampleIds":["paths/~1gql~1v1~1client_groups/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved client group list","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_126","exampleIds":["paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_126","exampleIds":["paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"}],"pointer":"/paths/~1gql~1v1~1client_groups/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_126","exampleIds":["paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_126","exampleIds":["paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}},{"code":"401"},{"code":"500","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client-group/getclientgroups"}],"panels":[]}]},"httpPath":"/gql/v1/client_groups"}],"content":{"contentType":"group","meta":{"name":"Client Group"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"👥 Client Group","showPageActions":true},{"nodeType":"markdoc","content":"Manage client group records and associated staff assignments."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/client_groups","summary":"List client groups","prefix":{"name":"post","color":"post"},"badges":[],"link":"/client-group/getclientgroups","deprecated":false}]}]}]}]}},{"type":"group","label":"📇 Contact","link":"/bundle/contact","routeSlug":"/bundle/contact","items":[{"label":"List contacts","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/contact/getcontactspaginated","routeSlug":"/bundle/contact/getcontactspaginated","metadata":{"seo":{"title":"List contacts","description":"Retrieve all contacts with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getContactsPaginated","name":"List contacts","isWebhook":false,"pointer":"/paths/~1gql~1v1~1contacts/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List contacts","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all contacts with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns a paginated list of contacts. Default sort prioritizes last/first name."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/contacts' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/contacts' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_127","exampleIds":["paths/~1gql~1v1~1contacts/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_127","exampleIds":["paths/~1gql~1v1~1contacts/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1contacts/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/contacts","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_127","exampleIds":["paths/~1gql~1v1~1contacts/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/contacts","href":"contact/getcontactspaginated","openApiOperationId":"getContactsPaginated","summary":"List contacts"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_127","exampleIds":["paths/~1gql~1v1~1contacts/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_127","exampleIds":["paths/~1gql~1v1~1contacts/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved contacts"},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1contacts/post/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/contact/getcontactspaginated"}],"panels":[]}]},"httpPath":"/gql/v1/contacts"},{"label":"Search contacts","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/contact/filtercontactsdynamic","routeSlug":"/bundle/contact/filtercontactsdynamic","metadata":{"seo":{"title":"Search contacts","description":"Advanced contact filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterContactsDynamic","name":"Search contacts","isWebhook":false,"pointer":"/paths/~1gql~1v1~1contacts~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search contacts","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced contact filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Filter contacts using boolean logic and relationship-aware fields from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contact_info"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/contacts/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"contact_info\": {\n              \"firstName\": {\n                \"_ilike\": \"%john%\"\n              }\n            }\n          },\n          {\n            \"contact_info\": {\n              \"lastName\": {\n                \"_ilike\": \"%doe%\"\n              }\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"contact_info\": {\n          \"email\": {\n            \"_ilike\": \"%@company.com%\"\n          }\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"contact_info\": {\n        \"lastName\": \"asc\"\n      }\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/contacts/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"contact_info\": {\n              \"firstName\": {\n                \"_ilike\": \"%john%\"\n              }\n            }\n          },\n          {\n            \"contact_info\": {\n              \"lastName\": {\n                \"_ilike\": \"%doe%\"\n              }\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"contact_info\": {\n          \"email\": {\n            \"_ilike\": \"%@company.com%\"\n          }\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"contact_info\": {\n        \"lastName\": \"asc\"\n      }\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_128"}},"schemaId":"schema_128","pointer":"/paths/~1gql~1v1~1contacts~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/contacts/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_128"}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/contacts/search","href":"contact/filtercontactsdynamic","openApiOperationId":"filterContactsDynamic","summary":"Search contacts"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_128","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_128"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered contacts"},{"code":"400","description":"Bad request - invalid where/orderBy"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1contacts~1search/post/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/contact/filtercontactsdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/contacts/search"},{"label":"Get contact by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/contact/getcontactbyid","routeSlug":"/bundle/contact/getcontactbyid","metadata":{"seo":{"title":"Get contact by ID","description":"Retrieve a specific contact by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getContactById","name":"Get contact by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1contact~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get contact by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific contact by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed contact information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete contact details and demographics"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact status and relationship information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client associations and roles"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Communication preferences and history"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Address and location information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Professional and personal details"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact Management Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact lifecycle tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Communication preference management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Address and location tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Professional information management"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact name and demographics"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact status and type"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client associations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Communication preferences"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Address information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Professional details"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact relationship management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client communication planning"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact database maintenance"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Professional network management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Communication preference tracking"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/contact/23456' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/contact/23456' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 23456,\n  \"firstName\": \"John\",\n  \"lastName\": \"Smith\",\n  \"email\": \"john.smith@acme.com\",\n  \"phone\": \"+1-555-0123\",\n  \"mobile\": \"+1-555-0456\",\n  \"title\": \"Chief Financial Officer\",\n  \"department\": \"Finance\",\n  \"status\": \"ACTIVE\",\n  \"type\": \"CLIENT_CONTACT\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"isPrimaryContact\": true,\n  \"address\": {\n    \"street\": \"123 Business Ave\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10001\",\n    \"country\": \"USA\"\n  },\n  \"communicationPreferences\": {\n    \"preferredMethod\": \"EMAIL\",\n    \"emailFrequency\": \"WEEKLY\",\n    \"newsletterSubscription\": true,\n    \"marketingEmails\": false\n  },\n  \"notes\": \"Primary contact for all financial matters and audit communications\",\n  \"createdAt\": \"2023-01-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 23456,\n  \"firstName\": \"John\",\n  \"lastName\": \"Smith\",\n  \"email\": \"john.smith@acme.com\",\n  \"phone\": \"+1-555-0123\",\n  \"mobile\": \"+1-555-0456\",\n  \"title\": \"Chief Financial Officer\",\n  \"department\": \"Finance\",\n  \"status\": \"ACTIVE\",\n  \"type\": \"CLIENT_CONTACT\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"isPrimaryContact\": true,\n  \"address\": {\n    \"street\": \"123 Business Ave\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10001\",\n    \"country\": \"USA\"\n  },\n  \"communicationPreferences\": {\n    \"preferredMethod\": \"EMAIL\",\n    \"emailFrequency\": \"WEEKLY\",\n    \"newsletterSubscription\": true,\n    \"marketingEmails\": false\n  },\n  \"notes\": \"Primary contact for all financial matters and audit communications\",\n  \"createdAt\": \"2023-01-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the contact","required":true,"example":23456}],"pointer":"/paths/~1gql~1v1~1contact~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/contact/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":23456,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/contact/{id}","href":"contact/getcontactbyid","openApiOperationId":"getContactById","summary":"Get contact by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Contact details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_129"}},"schemaId":"schema_129"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this contact"},{"code":"404","description":"Contact not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_130"}},"schemaId":"schema_130"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1contact~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_129","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_129"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_130","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_130"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/contact/getcontactbyid"}],"panels":[]}]},"httpPath":"/gql/v1/contact/{id}"},{"label":"Get contacts by client ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/contact/getcontactsbyclientid","routeSlug":"/bundle/contact/getcontactsbyclientid","metadata":{"seo":{"title":"Get contacts by client ID","description":"Retrieve active contacts associated with a specific client"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getContactsByClientId","name":"Get contacts by client ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get contacts by client ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve active contacts associated with a specific client"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns all contacts linked to the given client via the contact-client relationship,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"where the contact, contact-client link, and contact info are all active."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Results are ordered by last name then first name."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/contacts/by_client/789' \\\n--header 'Authorization: bearer {{token}}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/contacts/by_client/789' \\\n--header 'Authorization: bearer {{token}}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"clientId","in":"path","schemaId":"schema_117","description":"Unique identifier of the client","required":true,"example":789}],"pointer":"/paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/contacts/by_client/{clientId}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"clientId","in":"path","required":true,"example":789,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","500"],"pointer":"/gql/v1/contacts/by_client/{clientId}","href":"contact/getcontactsbyclientid","openApiOperationId":"getContactsByClientId","summary":"Get contacts by client ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Active contacts for the client retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_131","exampleIds":["paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/responses/200/content/application~1json/examples/success"]}},"schemaId":"schema_131","exampleIds":["paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/responses/200/content/application~1json/examples/success"]},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_131","exampleIds":["paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/responses/200/content/application~1json/examples/success"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_131","exampleIds":["paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/responses/200/content/application~1json/examples/success"]}}},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/contact/getcontactsbyclientid"}],"panels":[]}]},"httpPath":"/gql/v1/contacts/by_client/{clientId}"}],"content":{"contentType":"group","meta":{"name":"Contact"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"📇 Contact","showPageActions":true},{"nodeType":"markdoc","content":"Manage contact information and relationships for clients."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/contacts","summary":"List contacts","prefix":{"name":"post","color":"post"},"badges":[],"link":"/contact/getcontactspaginated","deprecated":false},{"title":"/gql/v1/contacts/search","summary":"Search contacts","prefix":{"name":"post","color":"post"},"badges":[],"link":"/contact/filtercontactsdynamic","deprecated":false},{"title":"/gql/v1/contact/{id}","summary":"Get contact by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/contact/getcontactbyid","deprecated":false},{"title":"/gql/v1/contacts/by_client/{clientId}","summary":"Get contacts by client ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/contact/getcontactsbyclientid","deprecated":false}]}]}]}]}},{"type":"group","label":"🧩 Client Business Entity","link":"/bundle/client-business-entity","routeSlug":"/bundle/client-business-entity","items":[{"label":"List client business entities","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/client-business-entity/getclientbusinessentitiespaginated","routeSlug":"/bundle/client-business-entity/getclientbusinessentitiespaginated","metadata":{"seo":{"title":"List client business entities","description":"Retrieve all client business entities with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getClientBusinessEntitiesPaginated","name":"List client business entities","isWebhook":false,"pointer":"/paths/~1gql~1v1~1client_business_entities/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List client business entities","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all client business entities with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura. It is useful after creating records via "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/api/v1/records"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1client_business_entities/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/client_business_entities","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/client_business_entities","href":"client-business-entity/getclientbusinessentitiespaginated","openApiOperationId":"getClientBusinessEntitiesPaginated","summary":"List client business entities"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved client business entities","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_132","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_132","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1client_business_entities/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_132","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_132","exampleIds":["paths/~1gql~1v1~1client_business_entities/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/client-business-entity/getclientbusinessentitiespaginated"}],"panels":[]}]},"httpPath":"/gql/v1/client_business_entities"}],"content":{"contentType":"group","meta":{"name":"Client Business Entity"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🧩 Client Business Entity","showPageActions":true},{"nodeType":"markdoc","content":"Manage client business entities used for client categorization and structure."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/client_business_entities","summary":"List client business entities","prefix":{"name":"post","color":"post"},"badges":[],"link":"/client-business-entity/getclientbusinessentitiespaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🔗 Contact Client","link":"/bundle/contact-client","routeSlug":"/bundle/contact-client","items":[{"label":"List contact-client relationships","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/contact-client/getcontactclientspaginated","routeSlug":"/bundle/contact-client/getcontactclientspaginated","metadata":{"seo":{"title":"List contact-client relationships","description":"Retrieve all contact-client relationships with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getContactClientsPaginated","name":"List contact-client relationships","isWebhook":false,"pointer":"/paths/~1gql~1v1~1contact_clients/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List contact-client relationships","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all contact-client relationships with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_clients/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_clients/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1contact_clients/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/contact_clients","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_clients/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/contact_clients","href":"contact-client/getcontactclientspaginated","openApiOperationId":"getContactClientsPaginated","summary":"List contact-client relationships"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_clients/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_clients/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved contact-client relationships","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_133","exampleIds":["paths/~1gql~1v1~1contact_clients/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_133","exampleIds":["paths/~1gql~1v1~1contact_clients/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1contact_clients/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_133","exampleIds":["paths/~1gql~1v1~1contact_clients/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_133","exampleIds":["paths/~1gql~1v1~1contact_clients/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/contact-client/getcontactclientspaginated"}],"panels":[]}]},"httpPath":"/gql/v1/contact_clients"}],"content":{"contentType":"group","meta":{"name":"Contact Client"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🔗 Contact Client","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Manage contact ↔ client relationship records."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/contact_clients","summary":"List contact-client relationships","prefix":{"name":"post","color":"post"},"badges":[],"link":"/contact-client/getcontactclientspaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🪪 Contact Info","link":"/bundle/contact-info","routeSlug":"/bundle/contact-info","items":[{"label":"List contact infos","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/contact-info/getcontactinfospaginated","routeSlug":"/bundle/contact-info/getcontactinfospaginated","metadata":{"seo":{"title":"List contact infos","description":"Retrieve all contact info records with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getContactInfosPaginated","name":"List contact infos","isWebhook":false,"pointer":"/paths/~1gql~1v1~1contact_infos/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List contact infos","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all contact info records with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_infos/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_infos/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1contact_infos/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/contact_infos","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_infos/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/contact_infos","href":"contact-info/getcontactinfospaginated","openApiOperationId":"getContactInfosPaginated","summary":"List contact infos"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_infos/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1contact_infos/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved contact infos","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_134","exampleIds":["paths/~1gql~1v1~1contact_infos/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_134","exampleIds":["paths/~1gql~1v1~1contact_infos/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1contact_infos/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_134","exampleIds":["paths/~1gql~1v1~1contact_infos/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_134","exampleIds":["paths/~1gql~1v1~1contact_infos/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/contact-info/getcontactinfospaginated"}],"panels":[]}]},"httpPath":"/gql/v1/contact_infos"}],"content":{"contentType":"group","meta":{"name":"Contact Info"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🪪 Contact Info","showPageActions":true},{"nodeType":"markdoc","content":"Manage contact information records (address, email, phone, etc.)."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/contact_infos","summary":"List contact infos","prefix":{"name":"post","color":"post"},"badges":[],"link":"/contact-info/getcontactinfospaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🏢 Department","link":"/bundle/department","routeSlug":"/bundle/department","items":[{"label":"List departments","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/department/getdepartmentspaginated","routeSlug":"/bundle/department/getdepartmentspaginated","metadata":{"seo":{"title":"List departments","description":"Retrieve all departments with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getDepartmentsPaginated","name":"List departments","isWebhook":false,"pointer":"/paths/~1gql~1v1~1departments/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List departments","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all departments with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1departments/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1departments/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1departments/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/departments","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1departments/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/departments","href":"department/getdepartmentspaginated","openApiOperationId":"getDepartmentsPaginated","summary":"List departments"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1departments/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1departments/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved departments","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_135","exampleIds":["paths/~1gql~1v1~1departments/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_135","exampleIds":["paths/~1gql~1v1~1departments/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1departments/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_135","exampleIds":["paths/~1gql~1v1~1departments/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_135","exampleIds":["paths/~1gql~1v1~1departments/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/department/getdepartmentspaginated"}],"panels":[]}]},"httpPath":"/gql/v1/departments"}],"content":{"contentType":"group","meta":{"name":"Department"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🏢 Department","showPageActions":true},{"nodeType":"markdoc","content":"Manage departments and organizational units."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/departments","summary":"List departments","prefix":{"name":"post","color":"post"},"badges":[],"link":"/department/getdepartmentspaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🏭 Industry","link":"/bundle/industry","routeSlug":"/bundle/industry","items":[{"label":"List industries","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/industry/getindustriespaginated","routeSlug":"/bundle/industry/getindustriespaginated","metadata":{"seo":{"title":"List industries","description":"Retrieve all industries with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getIndustriesPaginated","name":"List industries","isWebhook":false,"pointer":"/paths/~1gql~1v1~1industries/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List industries","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all industries with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1industries/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1industries/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1industries/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/industries","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1industries/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/industries","href":"industry/getindustriespaginated","openApiOperationId":"getIndustriesPaginated","summary":"List industries"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1industries/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1industries/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved industries","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_136","exampleIds":["paths/~1gql~1v1~1industries/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_136","exampleIds":["paths/~1gql~1v1~1industries/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1industries/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_136","exampleIds":["paths/~1gql~1v1~1industries/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_136","exampleIds":["paths/~1gql~1v1~1industries/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/industry/getindustriespaginated"}],"panels":[]}]},"httpPath":"/gql/v1/industries"}],"content":{"contentType":"group","meta":{"name":"Industry"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🏭 Industry","showPageActions":true},{"nodeType":"markdoc","content":"Manage industry classifications."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/industries","summary":"List industries","prefix":{"name":"post","color":"post"},"badges":[],"link":"/industry/getindustriespaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🧾 Job","link":"/bundle/job","routeSlug":"/bundle/job","items":[{"label":"List jobs","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/job/getjobspaginated","routeSlug":"/bundle/job/getjobspaginated","metadata":{"seo":{"title":"List jobs","description":"Retrieve all jobs with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getJobsPaginated","name":"List jobs","isWebhook":false,"pointer":"/paths/~1gql~1v1~1jobs/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List jobs","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all jobs with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1jobs/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1jobs/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1jobs/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/jobs","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1jobs/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/jobs","href":"job/getjobspaginated","openApiOperationId":"getJobsPaginated","summary":"List jobs"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1jobs/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1jobs/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved jobs","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_137","exampleIds":["paths/~1gql~1v1~1jobs/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_137","exampleIds":["paths/~1gql~1v1~1jobs/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1jobs/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_137","exampleIds":["paths/~1gql~1v1~1jobs/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_137","exampleIds":["paths/~1gql~1v1~1jobs/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/job/getjobspaginated"}],"panels":[]}]},"httpPath":"/gql/v1/jobs"},{"label":"Get job by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/job/getjobbyid","routeSlug":"/bundle/job/getjobbyid","metadata":{"seo":{"title":"Get job by ID","description":"Retrieve a specific job by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getJobById","name":"Get job by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1job~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get job by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific job by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the job","required":true,"example":5012}],"pointer":"/paths/~1gql~1v1~1job~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/job/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":5012,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","500"],"pointer":"/gql/v1/job/{id}","href":"job/getjobbyid","openApiOperationId":"getJobById","summary":"Get job by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Job details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_138","exampleIds":["paths/~1gql~1v1~1job~1{id}/get/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_138","exampleIds":["paths/~1gql~1v1~1job~1{id}/get/responses/200/content/application~1json/examples/sample"]},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1job~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_138","exampleIds":["paths/~1gql~1v1~1job~1{id}/get/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_138","exampleIds":["paths/~1gql~1v1~1job~1{id}/get/responses/200/content/application~1json/examples/sample"]}}},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/job/getjobbyid"}],"panels":[]}]},"httpPath":"/gql/v1/job/{id}"}],"content":{"contentType":"group","meta":{"name":"Job"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🧾 Job","showPageActions":true},{"nodeType":"markdoc","content":"Manage jobs/projects."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/jobs","summary":"List jobs","prefix":{"name":"post","color":"post"},"badges":[],"link":"/job/getjobspaginated","deprecated":false},{"title":"/gql/v1/job/{id}","summary":"Get job by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/job/getjobbyid","deprecated":false}]}]}]}]}},{"type":"group","label":"🧩 Job Template","link":"/bundle/job-template","routeSlug":"/bundle/job-template","items":[{"label":"List job templates","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/job-template/getjobtemplatespaginated","routeSlug":"/bundle/job-template/getjobtemplatespaginated","metadata":{"seo":{"title":"List job templates","description":"Retrieve all job templates with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getJobTemplatesPaginated","name":"List job templates","isWebhook":false,"pointer":"/paths/~1gql~1v1~1job_templates/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List job templates","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all job templates with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1job_templates/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1job_templates/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1job_templates/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/job_templates","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1job_templates/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/job_templates","href":"job-template/getjobtemplatespaginated","openApiOperationId":"getJobTemplatesPaginated","summary":"List job templates"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1job_templates/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1job_templates/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved job templates","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_139","exampleIds":["paths/~1gql~1v1~1job_templates/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_139","exampleIds":["paths/~1gql~1v1~1job_templates/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1job_templates/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_139","exampleIds":["paths/~1gql~1v1~1job_templates/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_139","exampleIds":["paths/~1gql~1v1~1job_templates/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/job-template/getjobtemplatespaginated"}],"panels":[]}]},"httpPath":"/gql/v1/job_templates"}],"content":{"contentType":"group","meta":{"name":"Job Template"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🧩 Job Template","showPageActions":true},{"nodeType":"markdoc","content":"Manage job templates."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/job_templates","summary":"List job templates","prefix":{"name":"post","color":"post"},"badges":[],"link":"/job-template/getjobtemplatespaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🏬 Office","link":"/bundle/office","routeSlug":"/bundle/office","items":[{"label":"List offices","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/office/getofficespaginated","routeSlug":"/bundle/office/getofficespaginated","metadata":{"seo":{"title":"List offices","description":"Retrieve all offices with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getOfficesPaginated","name":"List offices","isWebhook":false,"pointer":"/paths/~1gql~1v1~1offices/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List offices","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all offices with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1offices/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1offices/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1offices/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/offices","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1offices/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/offices","href":"office/getofficespaginated","openApiOperationId":"getOfficesPaginated","summary":"List offices"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1offices/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1offices/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved offices","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_140","exampleIds":["paths/~1gql~1v1~1offices/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_140","exampleIds":["paths/~1gql~1v1~1offices/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1offices/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_140","exampleIds":["paths/~1gql~1v1~1offices/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_140","exampleIds":["paths/~1gql~1v1~1offices/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/office/getofficespaginated"}],"panels":[]}]},"httpPath":"/gql/v1/offices"}],"content":{"contentType":"group","meta":{"name":"Office"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🏬 Office","showPageActions":true},{"nodeType":"markdoc","content":"Manage office locations."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/offices","summary":"List offices","prefix":{"name":"post","color":"post"},"badges":[],"link":"/office/getofficespaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🏛 Org","link":"/bundle/org","routeSlug":"/bundle/org","items":[{"label":"List orgs","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/org/getorgspaginated","routeSlug":"/bundle/org/getorgspaginated","metadata":{"seo":{"title":"List orgs","description":"Retrieve all orgs with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getOrgsPaginated","name":"List orgs","isWebhook":false,"pointer":"/paths/~1gql~1v1~1orgs/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List orgs","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all orgs with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1orgs/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1orgs/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1orgs/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/orgs","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1orgs/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/orgs","href":"org/getorgspaginated","openApiOperationId":"getOrgsPaginated","summary":"List orgs"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1orgs/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1orgs/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved orgs","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_141","exampleIds":["paths/~1gql~1v1~1orgs/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_141","exampleIds":["paths/~1gql~1v1~1orgs/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1orgs/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_141","exampleIds":["paths/~1gql~1v1~1orgs/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_141","exampleIds":["paths/~1gql~1v1~1orgs/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/org/getorgspaginated"}],"panels":[]}]},"httpPath":"/gql/v1/orgs"}],"content":{"contentType":"group","meta":{"name":"Org"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🏛 Org","showPageActions":true},{"nodeType":"markdoc","content":"Manage organizations."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/orgs","summary":"List orgs","prefix":{"name":"post","color":"post"},"badges":[],"link":"/org/getorgspaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🧷 Service Line","link":"/bundle/service-line","routeSlug":"/bundle/service-line","items":[{"label":"List service lines","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/service-line/getservicelinespaginated","routeSlug":"/bundle/service-line/getservicelinespaginated","metadata":{"seo":{"title":"List service lines","description":"Retrieve all service lines with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getServiceLinesPaginated","name":"List service lines","isWebhook":false,"pointer":"/paths/~1gql~1v1~1service_lines/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List service lines","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all service lines with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a read-only lookup endpoint backed by Hasura."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1service_lines/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1service_lines/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1service_lines/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/service_lines","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1service_lines/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/service_lines","href":"service-line/getservicelinespaginated","openApiOperationId":"getServiceLinesPaginated","summary":"List service lines"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1service_lines/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_122","exampleIds":["paths/~1gql~1v1~1service_lines/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved service lines","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_142","exampleIds":["paths/~1gql~1v1~1service_lines/post/responses/200/content/application~1json/examples/sample"]}},"schemaId":"schema_142","exampleIds":["paths/~1gql~1v1~1service_lines/post/responses/200/content/application~1json/examples/sample"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1service_lines/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_142","exampleIds":["paths/~1gql~1v1~1service_lines/post/responses/200/content/application~1json/examples/sample"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_142","exampleIds":["paths/~1gql~1v1~1service_lines/post/responses/200/content/application~1json/examples/sample"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/service-line/getservicelinespaginated"}],"panels":[]}]},"httpPath":"/gql/v1/service_lines"}],"content":{"contentType":"group","meta":{"name":"Service Line"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🧷 Service Line","showPageActions":true},{"nodeType":"markdoc","content":"Manage service line classifications."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/service_lines","summary":"List service lines","prefix":{"name":"post","color":"post"},"badges":[],"link":"/service-line/getservicelinespaginated","deprecated":false}]}]}]}]}},{"type":"group","label":"🧑‍💼 Staff","link":"/bundle/staff","routeSlug":"/bundle/staff","items":[{"label":"List staff","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/staff/getstaff","routeSlug":"/bundle/staff/getstaff","metadata":{"seo":{"title":"List staff","description":"Staff directory and human resource management with organizational structure"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getStaff","name":"List staff","isWebhook":false,"pointer":"/paths/~1gql~1v1~1staff/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List staff","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff directory and human resource management with organizational structure"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This comprehensive HR endpoint provides complete staff management including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Employee directory with advanced search capabilities"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department and organizational structure integration"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Role-based staff categorization and filtering"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Active/inactive employee status management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Multi-field name search with partial matching"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"HR Management Capabilities:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete employee directory with contact information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department-based organizational structure tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff type and role classification system"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Active employee status for current workforce analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Employee search across first and last names"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Organizational Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department hierarchy and staff allocation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Role-based access and staff type categorization"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Employee status management (active/inactive)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contact information and communication data"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff reference and external system integration"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Search and Filter Options:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Multi-field name search (first name, last name)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department-based staff filtering"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Active status filtering for current employees"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Role and staff type categorization"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Alphabetical sorting for directory listings"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Employee directory and contact management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"HR reporting and organizational analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department staff allocation and planning"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Employee onboarding and management workflows"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration with external HR and payroll systems"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Directory Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete contact information management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department and role relationship tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff reference system for external integration"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Employee status and lifecycle management"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/staff' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/staff' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Permissions:"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_143","exampleIds":["paths/~1gql~1v1~1staff/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_143","exampleIds":["paths/~1gql~1v1~1staff/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1staff/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/staff","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_143","exampleIds":["paths/~1gql~1v1~1staff/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/staff","href":"staff/getstaff","openApiOperationId":"getStaff","summary":"List staff"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_143","exampleIds":["paths/~1gql~1v1~1staff/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_143","exampleIds":["paths/~1gql~1v1~1staff/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved staff records","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_144","exampleIds":["paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_144","exampleIds":["paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_department_id","paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_page"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_department_id","paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_page"]},{"code":"401","description":"Unauthorized - insufficient permissions","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/401/content/application~1json/examples/insufficient_permissions"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/401/content/application~1json/examples/insufficient_permissions"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}},"schemaId":"schema_116"}],"pointer":"/paths/~1gql~1v1~1staff/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_144","exampleIds":["paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_144","exampleIds":["paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_department_id","paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_page"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_department_id","paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_page"]}}},{"code":"401","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/401/content/application~1json/examples/insufficient_permissions"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1staff/post/responses/401/content/application~1json/examples/insufficient_permissions"]}}},{"code":"500","schemaId":"schema_116","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/staff/getstaff"}],"panels":[]}]},"httpPath":"/gql/v1/staff"},{"label":"Search staff","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/staff/filterstaffdynamic","routeSlug":"/bundle/staff/filterstaffdynamic","metadata":{"seo":{"title":"Search staff","description":"Advanced staff filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterStaffDynamic","name":"Search staff","isWebhook":false,"pointer":"/paths/~1gql~1v1~1staff~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search staff","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced staff filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Provides flexible, enterprise-grade filtering for staff directory queries with boolean logic,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"relationship traversal, and multi-field ordering."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Key capabilities include boolean operators ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_and"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_or"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_not"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), text matching ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_ilike"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"),"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"comparison operators ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_gt"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_gte"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_lt"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_lte"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_eq"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_neq"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), array operators ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_in"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_nin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"),"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"and nested/related filtering (e.g., by office or manager)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/staff/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"firstName\": {\n              \"_ilike\": \"%john%\"\n            }\n          },\n          {\n            \"lastName\": {\n              \"_ilike\": \"%doe%\"\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"deptId\": {\n          \"_in\": [\n            1,\n            2,\n            3\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"lastName\": \"asc\"\n    },\n    {\n      \"firstName\": \"asc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/staff/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"firstName\": {\n              \"_ilike\": \"%john%\"\n            }\n          },\n          {\n            \"lastName\": {\n              \"_ilike\": \"%doe%\"\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"deptId\": {\n          \"_in\": [\n            1,\n            2,\n            3\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"lastName\": \"asc\"\n    },\n    {\n      \"firstName\": \"asc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_145"}},"schemaId":"schema_145","pointer":"/paths/~1gql~1v1~1staff~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/staff/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_145"}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/staff/search","href":"staff/filterstaffdynamic","openApiOperationId":"filterStaffDynamic","summary":"Search staff"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_145","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_145"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered staff with dynamic ordering","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_146","exampleIds":["paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/filtered_response","paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_146","exampleIds":["paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/filtered_response","paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid where/orderBy"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1staff~1search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_146","exampleIds":["paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/filtered_response","paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_146","exampleIds":["paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/filtered_response","paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/staff/filterstaffdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/staff/search"},{"label":"Get staff member by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/staff/getstaffbyid","routeSlug":"/bundle/staff/getstaffbyid","metadata":{"seo":{"title":"Get staff member by ID","description":"Retrieve a specific staff member by their unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getStaffById","name":"Get staff member by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1staff~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get staff member by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific staff member by their unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides basic staff member information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff member identification and PMS reference"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Personal details (name and email)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Employment status and organizational structure"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department and office assignments"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Management hierarchy information"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff member ID and PMS reference"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Personal information (first name, last name, email)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Active status indicator"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department and office identifiers"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Job title and staff type (when available)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Manager assignment (when applicable)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff member lookup and verification"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Organizational structure queries"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Basic staff information retrieval"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Department and office staff management"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/staff/123' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/staff/123' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 202,\n  \"pmsRef\": \"2254\",\n  \"firstName\": \"Holley\",\n  \"lastName\": \"Abbott\",\n  \"email\": \"ena.toy@hotmail.com\",\n  \"active\": true,\n  \"deptId\": 8,\n  \"jobTitle\": null,\n  \"type\": null,\n  \"officeId\": 2,\n  \"staffManagerId\": null\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 202,\n  \"pmsRef\": \"2254\",\n  \"firstName\": \"Holley\",\n  \"lastName\": \"Abbott\",\n  \"email\": \"ena.toy@hotmail.com\",\n  \"active\": true,\n  \"deptId\": 8,\n  \"jobTitle\": null,\n  \"type\": null,\n  \"officeId\": 2,\n  \"staffManagerId\": null\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the staff member","required":true,"example":123}],"pointer":"/paths/~1gql~1v1~1staff~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/staff/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":123,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/staff/{id}","href":"staff/getstaffbyid","openApiOperationId":"getStaffById","summary":"Get staff member by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Staff member details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_147"}},"schemaId":"schema_147"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this staff member"},{"code":"404","description":"Staff member not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_148"}},"schemaId":"schema_148"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1staff~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_147","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_147"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_148","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_148"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/staff/getstaffbyid"}],"panels":[]}]},"httpPath":"/gql/v1/staff/{id}"},{"label":"Onboard a new staff member","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/staff/onboardstaff","routeSlug":"/bundle/staff/onboardstaff","metadata":{"seo":{"title":"Onboard a new staff member","description":"Create a new staff member, optionally assigning them to a rate card"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"onboardStaff","name":"Onboard a new staff member","isWebhook":false,"pointer":"/paths/~1api~1v1~1staff/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Onboard a new staff member","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a new staff member, optionally assigning them to a rate card"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates a staff record and, when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardAssignment"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is provided, atomically"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"creates the corresponding billing rate and average cost records in the same"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"transaction."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Required fields:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"firstName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — staff member's first name"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"lastName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — staff member's last name"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — practice management system reference"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ref"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — unique staff reference code"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Rate card assignment"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardAssignment"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"):"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When provided, the rate card must already exist. Each entry in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingRates"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"requires a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". All three records (staff, billing rates, average"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"cost) are created atomically — if any write fails the entire request is rolled back."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — ID of an existing rate card (validated before any writes)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingRates"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — one record per rate type; each requires a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateTypeId"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"averageCost"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — single average hourly cost for this staff member (optional)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/staff' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"firstName\": \"Jane\",\n  \"lastName\": \"Doe\",\n  \"pmsRef\": \"EMP-1042\",\n  \"ref\": \"doe-j\",\n  \"email\": \"jane.doe@firm.com\",\n  \"jobTitle\": \"Senior Associate\",\n  \"active\": true,\n  \"rateCardAssignment\": {\n    \"rateCardId\": 5,\n    \"billingRates\": [\n      { \"rateTypeId\": 12, \"hourlyBillingRate\": 150.00 },\n      { \"rateTypeId\": 13, \"hourlyBillingRate\": 175.00 }\n    ],\n    \"averageCost\": 75.00\n  }\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/staff' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"firstName\": \"Jane\",\n  \"lastName\": \"Doe\",\n  \"pmsRef\": \"EMP-1042\",\n  \"ref\": \"doe-j\",\n  \"email\": \"jane.doe@firm.com\",\n  \"jobTitle\": \"Senior Associate\",\n  \"active\": true,\n  \"rateCardAssignment\": {\n    \"rateCardId\": 5,\n    \"billingRates\": [\n      { \"rateTypeId\": 12, \"hourlyBillingRate\": 150.00 },\n      { \"rateTypeId\": 13, \"hourlyBillingRate\": 175.00 }\n    ],\n    \"averageCost\": 75.00\n  }\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_149","exampleIds":["paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/with_rate_card"]}},"schemaId":"schema_149","exampleIds":["paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/with_rate_card"],"pointer":"/paths/~1api~1v1~1staff/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/staff","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_149","exampleIds":["paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/with_rate_card"]}},"responseCodes":["201","400","401","403","500"],"pointer":"/api/v1/staff","href":"staff/onboardstaff","openApiOperationId":"onboardStaff","summary":"Onboard a new staff member"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_149","exampleIds":["paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/with_rate_card"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_149","exampleIds":["paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/with_rate_card"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Staff member created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_150","exampleIds":["paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_only","paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_with_rate_card"]}},"schemaId":"schema_150","exampleIds":["paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_only","paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_with_rate_card"]},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invalid request. Common causes:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Missing required fields ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"firstName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"lastName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ref"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardAssignment.rateCardId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" does not reference an existing rate card"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"One or more "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingRates"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" do not exist"},"children":[]}]}]}]}]},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unauthorized — missing or invalid bearer token"},"children":[]}]}]}]},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden — token does not have the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ROLE_API_ADMIN"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" role"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1staff/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"201","schemaId":"schema_150","exampleIds":["paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_only","paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_with_rate_card"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_150","exampleIds":["paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_only","paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_with_rate_card"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/staff/onboardstaff"}],"panels":[]}]},"httpPath":"/api/v1/staff"},{"label":"Update a staff member","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/staff/updatestaff","routeSlug":"/bundle/staff/updatestaff","metadata":{"seo":{"title":"Update a staff member","description":"Update an existing staff member's profile and optionally replace their rate card assignment"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateStaff","name":"Update a staff member","isWebhook":false,"pointer":"/paths/~1api~1v1~1staff~1{staffId}/put","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a staff member","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Update an existing staff member's profile and optionally replace their rate card assignment"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"All fields are optional — only the fields you include will be updated. Omitted fields"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"retain their current values."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Rate card assignment replacement"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardAssignment"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"):"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When provided, this operation atomically:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Deactivates "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"all"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" active "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rate_card_staff_billing_rate"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rate_card_staff_average_cost"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" records currently linked to this staff member"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"(across any rate card)."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates new records for the specified "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Omitting "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardAssignment"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" entirely leaves existing rate card records untouched."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Pre-write validation ensures "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and all "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values reference"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"existing records — if any are invalid the entire request is rejected with HTTP 400"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"and no changes are written."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location --request PUT 'https://{{host}}/api/v1/staff/312' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"jobTitle\": \"Manager\",\n  \"rateCardAssignment\": {\n    \"rateCardId\": 6,\n    \"billingRates\": [\n      { \"rateTypeId\": 12, \"hourlyBillingRate\": 200.00 }\n    ],\n    \"averageCost\": 95.00\n  }\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location --request PUT 'https://{{host}}/api/v1/staff/312' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"jobTitle\": \"Manager\",\n  \"rateCardAssignment\": {\n    \"rateCardId\": 6,\n    \"billingRates\": [\n      { \"rateTypeId\": 12, \"hourlyBillingRate\": 200.00 }\n    ],\n    \"averageCost\": 95.00\n  }\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"staffId","in":"path","schemaId":"schema_151","description":"Unique identifier of the staff member to update","required":true,"example":312}],"pointer":"/paths/~1api~1v1~1staff~1{staffId}/put/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_152","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_only","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/replace_rate_card","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_and_rate_card"]}},"schemaId":"schema_152","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_only","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/replace_rate_card","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_and_rate_card"],"pointer":"/paths/~1api~1v1~1staff~1{staffId}/put/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/api/v1/staff/{staffId}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"staffId","in":"path","required":true,"example":312,"schemaId":"schema_151"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_152","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_only","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/replace_rate_card","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_and_rate_card"]}},"responseCodes":["200","400","401","403","404","500"],"pointer":"/api/v1/staff/{staffId}","href":"staff/updatestaff","openApiOperationId":"updateStaff","summary":"Update a staff member"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_152","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_only","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/replace_rate_card","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_and_rate_card"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_152","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_only","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/replace_rate_card","paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_and_rate_card"]}},"examples":[{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Staff member updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_153","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/fields_updated","paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/rate_card_replaced"]}},"schemaId":"schema_153","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/fields_updated","paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/rate_card_replaced"]},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invalid request. Common causes:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardAssignment.rateCardId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" does not reference an existing rate card"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"One or more "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingRates"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" do not exist"},"children":[]}]}]}]}]},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unauthorized — missing or invalid bearer token"},"children":[]}]}]}]},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden — token does not have the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ROLE_API_ADMIN"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" role"},"children":[]}]}]}]},{"code":"404","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff member not found for the given "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staffId"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1staff~1{staffId}/put/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_153","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/fields_updated","paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/rate_card_replaced"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_153","exampleIds":["paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/fields_updated","paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/rate_card_replaced"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"404"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/staff/updatestaff"}],"panels":[]}]},"httpPath":"/api/v1/staff/{staffId}"},{"label":"Create staff types in batch","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/staff/stafftypebatchcreate","routeSlug":"/bundle/staff/stafftypebatchcreate","metadata":{"seo":{"title":"Create staff types in batch","description":"Create staff types in batch"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"StaffTypeBatchCreate","name":"Create staff types in batch","isWebhook":false,"pointer":"/paths/~1api~1v1~1staff~1type~1batch~1create/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create staff types in batch","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create staff types in batch"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates up to "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"100"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" staff types in a single request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Notes:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The request body is JSON "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"items\": [ ... ] }"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" where "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"items"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is an array of staff type objects (same shape as single "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/create"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"items"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" must contain "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"1–100"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" elements; otherwise the request is rejected with "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"400"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Successful creates appear under "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"succeeded"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"; failures appear under "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"failed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with an error message (partial success is allowed)."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"201"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when every item succeeds; "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"422"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when every item fails; "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"200"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when there is a mix of successes and failures."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/staff/type/batch/create' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"items\": [\n    { \"display\": \"Associate\", \"description\": \"Associate staff type\" },\n    { \"display\": \"Manager\", \"description\": \"Manager staff type\" }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/staff/type/batch/create' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"items\": [\n    { \"display\": \"Associate\", \"description\": \"Associate staff type\" },\n    { \"display\": \"Manager\", \"description\": \"Manager staff type\" }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_154"}},"schemaId":"schema_154","pointer":"/paths/~1api~1v1~1staff~1type~1batch~1create/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/staff/type/batch/create","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_154"}},"responseCodes":["201","400","401","403","500"],"pointer":"/api/v1/staff/type/batch/create","href":"staff/stafftypebatchcreate","openApiOperationId":"StaffTypeBatchCreate","summary":"Create staff types in batch"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_154","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_154"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"All staff types were created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_155"}},"schemaId":"schema_155"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires STF_TYP_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1staff~1type~1batch~1create/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"201","schemaId":"schema_155","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_155"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/staff/stafftypebatchcreate"}],"panels":[]}]},"httpPath":"/api/v1/staff/type/batch/create"},{"label":"Lookup staff types (paged)","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/staff/stafftypebatchlookup","routeSlug":"/bundle/staff/stafftypebatchlookup","metadata":{"seo":{"title":"Lookup staff types (paged)","description":"Lookup staff types page by page"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"StaffTypeBatchLookup","name":"Lookup staff types (paged)","isWebhook":false,"pointer":"/paths/~1api~1v1~1staff~1type~1batch~1lookup/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Lookup staff types (paged)","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Lookup staff types page by page"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns a page of staff types ordered by id ascending."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Notes:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pageSize"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" must be between "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"1"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"100"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"page"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is zero-based ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"page"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" 0 is the first page)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/staff/type/batch/lookup' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{ \"pageSize\": 25, \"page\": 0 }'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/staff/type/batch/lookup' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{ \"pageSize\": 25, \"page\": 0 }'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_156"}},"schemaId":"schema_156","pointer":"/paths/~1api~1v1~1staff~1type~1batch~1lookup/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/staff/type/batch/lookup","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_156"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/staff/type/batch/lookup","href":"staff/stafftypebatchlookup","openApiOperationId":"StaffTypeBatchLookup","summary":"Lookup staff types (paged)"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_156","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_156"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Lookup completed successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}},"schemaId":"schema_157"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of STF_TYP_R, STF_TYP_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1staff~1type~1batch~1lookup/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_157","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/staff/stafftypebatchlookup"}],"panels":[]}]},"httpPath":"/api/v1/staff/type/batch/lookup"}],"content":{"contentType":"group","meta":{"name":"Staff"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🧑‍💼 Staff","showPageActions":true},{"nodeType":"markdoc","content":"Manage staff accounts, roles, and permissions."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/staff","summary":"List staff","prefix":{"name":"post","color":"post"},"badges":[],"link":"/staff/getstaff","deprecated":false},{"title":"/gql/v1/staff/search","summary":"Search staff","prefix":{"name":"post","color":"post"},"badges":[],"link":"/staff/filterstaffdynamic","deprecated":false},{"title":"/gql/v1/staff/{id}","summary":"Get staff member by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/staff/getstaffbyid","deprecated":false},{"title":"/api/v1/staff","summary":"Onboard a new staff member","prefix":{"name":"post","color":"post"},"badges":[],"link":"/staff/onboardstaff","deprecated":false},{"title":"/api/v1/staff/{staffId}","summary":"Update a staff member","prefix":{"name":"put","color":"put"},"badges":[],"link":"/staff/updatestaff","deprecated":false},{"title":"/api/v1/staff/type/batch/create","summary":"Create staff types in batch","prefix":{"name":"post","color":"post"},"badges":[],"link":"/staff/stafftypebatchcreate","deprecated":false},{"title":"/api/v1/staff/type/batch/lookup","summary":"Lookup staff types (paged)","prefix":{"name":"post","color":"post"},"badges":[],"link":"/staff/stafftypebatchlookup","deprecated":false}]}]}]}]}},{"type":"group","label":"💳 Payments","link":"/bundle/payments","routeSlug":"/bundle/payments","items":[{"label":"List payments","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/payments/getpayments","routeSlug":"/bundle/payments/getpayments","metadata":{"seo":{"title":"List payments","description":"Retrieve payment records with transaction details and security compliance"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getPayments","name":"List payments","isWebhook":false,"pointer":"/paths/~1gql~1v1~1payments/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List payments","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve payment records with transaction details and security compliance"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides secure payment data access with:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"PCI-compliant payment information (masked card data)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment method categorization and tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration with AR transactions for complete context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment processor integration (PayPal, Stripe, etc.)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Date-based filtering for reconciliation periods"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship data for payment attribution"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Security & Compliance:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"PCI DSS compliant data handling (last 4 digits only)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Secure payment processor ID tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment confirmation date logging"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audit trail for payment processing"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment Method Support:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Credit/debit card payments with masked PAN"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"ACH/bank transfer processing"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Check and wire transfer tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Digital wallet integration (PayPal, Apple Pay, etc.)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Reconciliation Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment-to-invoice matching via AR transactions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment confirmation status tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Processor reference ID management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Multi-currency payment support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment reconciliation and matching"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Revenue recognition and cash flow analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client payment history and patterns"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment method performance analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Compliance reporting and audit trails"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/payments' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/payments' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_158","exampleIds":["paths/~1gql~1v1~1payments/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_158","exampleIds":["paths/~1gql~1v1~1payments/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1payments/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/payments","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_158","exampleIds":["paths/~1gql~1v1~1payments/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","403","500"],"pointer":"/gql/v1/payments","href":"payments/getpayments","openApiOperationId":"getPayments","summary":"List payments"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_158","exampleIds":["paths/~1gql~1v1~1payments/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_158","exampleIds":["paths/~1gql~1v1~1payments/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved payment records","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_159","exampleIds":["paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_159","exampleIds":["paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_payment_method"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_payment_method"]},{"code":"401","description":"Unauthorized - missing or invalid admin secret","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/401/content/application~1json/examples/missing_auth"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/401/content/application~1json/examples/missing_auth"]},{"code":"403","description":"Forbidden - insufficient permissions for payment data access","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/403/content/application~1json/examples/insufficient_permissions"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/403/content/application~1json/examples/insufficient_permissions"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}},"schemaId":"schema_116"}],"pointer":"/paths/~1gql~1v1~1payments/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_159","exampleIds":["paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_159","exampleIds":["paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_payment_method"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_payment_method"]}}},{"code":"401","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/401/content/application~1json/examples/missing_auth"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/401/content/application~1json/examples/missing_auth"]}}},{"code":"403","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/403/content/application~1json/examples/insufficient_permissions"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1payments/post/responses/403/content/application~1json/examples/insufficient_permissions"]}}},{"code":"500","schemaId":"schema_116","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/payments/getpayments"}],"panels":[]}]},"httpPath":"/gql/v1/payments"},{"label":"Search payments","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/payments/filterpaymentsdynamic","routeSlug":"/bundle/payments/filterpaymentsdynamic","metadata":{"seo":{"title":"Search payments","description":"Advanced payment filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterPaymentsDynamic","name":"Search payments","isWebhook":false,"pointer":"/paths/~1gql~1v1~1payments~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search payments","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced payment filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Backed by view "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"vw_payment_history_firm_table"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Supports text matching, date ranges, and flags."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/payments/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"paymentMethod\": {\n              \"_ilike\": \"%CREDIT%\"\n            }\n          },\n          {\n            \"cardType\": {\n              \"_ilike\": \"%VISA%\"\n            }\n          }\n        ]\n      },\n      {\n        \"isAutomatic\": {\n          \"_eq\": false\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"paymentConfirmationDate\": {\n          \"_is_null\": false\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"paymentConfirmationDate\": \"desc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/payments/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"paymentMethod\": {\n              \"_ilike\": \"%CREDIT%\"\n            }\n          },\n          {\n            \"cardType\": {\n              \"_ilike\": \"%VISA%\"\n            }\n          }\n        ]\n      },\n      {\n        \"isAutomatic\": {\n          \"_eq\": false\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"paymentConfirmationDate\": {\n          \"_is_null\": false\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"paymentConfirmationDate\": \"desc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_160"}},"schemaId":"schema_160","pointer":"/paths/~1gql~1v1~1payments~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/payments/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_160"}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/payments/search","href":"payments/filterpaymentsdynamic","openApiOperationId":"filterPaymentsDynamic","summary":"Search payments"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_160","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_160"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered payments"},{"code":"400","description":"Bad request - invalid where/orderBy"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1payments~1search/post/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/payments/filterpaymentsdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/payments/search"},{"label":"Get payment by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/payments/getpaymentbyid","routeSlug":"/bundle/payments/getpaymentbyid","metadata":{"seo":{"title":"Get payment by ID","description":"Retrieve a specific payment by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getPaymentById","name":"Get payment by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1payment~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get payment by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific payment by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed payment information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete payment transaction details"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"PCI-compliant payment method information (masked)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment status and confirmation data"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Associated invoice and client relationships"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment processor integration details"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audit trail and security compliance data"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Security & Compliance:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"PCI DSS compliant data handling"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Secure payment processor ID tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment confirmation date logging"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audit trail for payment processing"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment amount and currency"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment method (masked for security)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment status and confirmation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Associated invoice references"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship data"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment processor details"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment verification and reconciliation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client payment history lookup"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment dispute resolution"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audit and compliance reporting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment method analysis"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/payment/12345' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/payment/12345' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 12345,\n  \"amount\": 1500.00,\n  \"currency\": \"USD\",\n  \"paymentMethod\": \"CREDIT_CARD\",\n  \"cardLastFour\": \"1234\",\n  \"cardType\": \"VISA\",\n  \"status\": \"CONFIRMED\",\n  \"confirmationDate\": \"2024-01-15T10:30:00Z\",\n  \"processorReference\": \"stripe_pi_1234567890\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"invoiceId\": 456,\n  \"invoiceNumber\": \"INV-2024-001\",\n  \"createdAt\": \"2024-01-15T10:25:00Z\",\n  \"updatedAt\": \"2024-01-15T10:30:00Z\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 12345,\n  \"amount\": 1500.00,\n  \"currency\": \"USD\",\n  \"paymentMethod\": \"CREDIT_CARD\",\n  \"cardLastFour\": \"1234\",\n  \"cardType\": \"VISA\",\n  \"status\": \"CONFIRMED\",\n  \"confirmationDate\": \"2024-01-15T10:30:00Z\",\n  \"processorReference\": \"stripe_pi_1234567890\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"invoiceId\": 456,\n  \"invoiceNumber\": \"INV-2024-001\",\n  \"createdAt\": \"2024-01-15T10:25:00Z\",\n  \"updatedAt\": \"2024-01-15T10:30:00Z\"\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the payment","required":true,"example":12345}],"pointer":"/paths/~1gql~1v1~1payment~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/payment/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":12345,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/payment/{id}","href":"payments/getpaymentbyid","openApiOperationId":"getPaymentById","summary":"Get payment by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Payment details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_161"}},"schemaId":"schema_161"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this payment"},{"code":"404","description":"Payment not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_162"}},"schemaId":"schema_162"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1payment~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_161","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_161"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_162","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_162"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/payments/getpaymentbyid"}],"panels":[]}]},"httpPath":"/gql/v1/payment/{id}"}],"content":{"contentType":"group","meta":{"name":"Payments"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"💳 Payments","showPageActions":true},{"nodeType":"markdoc","content":"Handle incoming and outgoing payments."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/payments","summary":"List payments","prefix":{"name":"post","color":"post"},"badges":[],"link":"/payments/getpayments","deprecated":false},{"title":"/gql/v1/payments/search","summary":"Search payments","prefix":{"name":"post","color":"post"},"badges":[],"link":"/payments/filterpaymentsdynamic","deprecated":false},{"title":"/gql/v1/payment/{id}","summary":"Get payment by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/payments/getpaymentbyid","deprecated":false}]}]}]}]}},{"type":"group","label":"🧾 Billing","link":"/bundle/billing","routeSlug":"/bundle/billing","items":[{"label":"List draft invoice histories","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/billing/getdraftinvoicehistoriespaginated","routeSlug":"/bundle/billing/getdraftinvoicehistoriespaginated","metadata":{"seo":{"title":"List draft invoice histories","description":"Retrieve draft invoice histories with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getDraftInvoiceHistoriesPaginated","name":"List draft invoice histories","isWebhook":false,"pointer":"/paths/~1gql~1v1~1draft_invoice_histories/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List draft invoice histories","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve draft invoice histories with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Provides paginated access to draft invoice history records."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/draft_invoice_histories' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/draft_invoice_histories' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_163","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_163","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1draft_invoice_histories/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/draft_invoice_histories","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_163","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/draft_invoice_histories","href":"billing/getdraftinvoicehistoriespaginated","openApiOperationId":"getDraftInvoiceHistoriesPaginated","summary":"List draft invoice histories"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_163","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_163","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved draft invoice histories","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/responses/200/content/application~1json/examples/successful_response"]}},"schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/responses/200/content/application~1json/examples/successful_response"]},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1draft_invoice_histories/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/responses/200/content/application~1json/examples/successful_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories/post/responses/200/content/application~1json/examples/successful_response"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/billing/getdraftinvoicehistoriespaginated"}],"panels":[]}]},"httpPath":"/gql/v1/draft_invoice_histories"},{"label":"Search draft invoice histories","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/billing/filterdraftinvoicehistoriesdynamic","routeSlug":"/bundle/billing/filterdraftinvoicehistoriesdynamic","metadata":{"seo":{"title":"Search draft invoice histories","description":"Advanced draft invoice history filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterDraftInvoiceHistoriesDynamic","name":"Search draft invoice histories","isWebhook":false,"pointer":"/paths/~1gql~1v1~1draft_invoice_histories~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search draft invoice histories","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced draft invoice history filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supports client, invoice, job filtering and draftInvoice approvedAt date range."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/draft_invoice_histories/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"clientId\": {\n              \"_in\": [1001, 1002]\n            }\n          },\n          {\n            \"jobId\": {\n              \"_in\": [2001, 2002]\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"activityType\": {\n          \"_in\": [\n            \"DRAFT_INVOICE_CREATED\",\n            \"DRAFT_INVOICE_RECONCILED\"\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"clientId\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/draft_invoice_histories/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"clientId\": {\n              \"_in\": [1001, 1002]\n            }\n          },\n          {\n            \"jobId\": {\n              \"_in\": [2001, 2002]\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"activityType\": {\n          \"_in\": [\n            \"DRAFT_INVOICE_CREATED\",\n            \"DRAFT_INVOICE_RECONCILED\"\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"clientId\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_164"}},"schemaId":"schema_164","pointer":"/paths/~1gql~1v1~1draft_invoice_histories~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/draft_invoice_histories/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_164"}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/draft_invoice_histories/search","href":"billing/filterdraftinvoicehistoriesdynamic","openApiOperationId":"filterDraftInvoiceHistoriesDynamic","summary":"Search draft invoice histories"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_164","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_164"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered draft invoice histories","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories~1search/post/responses/200/content/application~1json/examples/successful_response"]}},"schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories~1search/post/responses/200/content/application~1json/examples/successful_response"]},{"code":"400","description":"Bad request - invalid where/orderBy"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1draft_invoice_histories~1search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories~1search/post/responses/200/content/application~1json/examples/successful_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/DraftInvoiceHistoryListResponse","exampleIds":["paths/~1gql~1v1~1draft_invoice_histories~1search/post/responses/200/content/application~1json/examples/successful_response"]}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/billing/filterdraftinvoicehistoriesdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/draft_invoice_histories/search"},{"label":"Get draft invoice by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/billing/getdraftinvoicebyid","routeSlug":"/bundle/billing/getdraftinvoicebyid","metadata":{"seo":{"title":"Get draft invoice by ID","description":"Retrieve a specific draft invoice by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getDraftInvoiceById","name":"Get draft invoice by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1draft_invoice~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get draft invoice by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific draft invoice by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed draft invoice information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete draft invoice details and line items"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Draft status and review information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client and project relationships"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax calculations and compliance data"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Review history and approval workflow"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Document generation and delivery preparation"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Draft Invoice Management Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Draft invoice lifecycle tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Review and approval workflow"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax calculation and compliance"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship integration"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Document preparation and delivery setup"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Draft Invoice Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Draft invoice number and reference"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Draft status and review status"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client and project information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Line items and amounts"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax calculations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Review history"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Draft invoice review and approval"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax compliance verification"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client billing preparation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Revenue recognition planning"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Document generation preparation"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/draft_invoice/56789' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/draft_invoice/56789' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 56789,\n  \"draftNumber\": \"DRAFT-2024-001\",\n  \"reference\": \"Q4-AUDIT-DRAFT-2024\",\n  \"status\": \"UNDER_REVIEW\",\n  \"reviewStatus\": \"PENDING_APPROVAL\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"clientEmail\": \"billing@acme.com\",\n  \"projectId\": 67890,\n  \"projectName\": \"Q4 Financial Audit\",\n  \"preparedDate\": \"2024-12-01T00:00:00Z\",\n  \"proposedIssueDate\": \"2024-12-15T00:00:00Z\",\n  \"proposedDueDate\": \"2025-01-15T23:59:59Z\",\n  \"subtotal\": 20000.00,\n  \"taxAmount\": 2000.00,\n  \"totalAmount\": 22000.00,\n  \"currency\": \"USD\",\n  \"lineItems\": [\n    {\n      \"id\": 1,\n      \"description\": \"Financial Statement Audit\",\n      \"quantity\": 80,\n      \"unitPrice\": 250.00,\n      \"amount\": 20000.00,\n      \"taxRate\": 0.10,\n      \"notes\": \"Includes fieldwork and report preparation\"\n    }\n  ],\n  \"reviewHistory\": [\n    {\n      \"id\": 1,\n      \"reviewerId\": 123,\n      \"reviewerName\": \"John Smith\",\n      \"reviewDate\": \"2024-12-05T10:30:00Z\",\n      \"status\": \"APPROVED\",\n      \"comments\": \"All calculations verified and approved\"\n    },\n    {\n      \"id\": 2,\n      \"reviewerId\": 124,\n      \"reviewerName\": \"Jane Doe\",\n      \"reviewDate\": \"2024-12-06T14:15:00Z\",\n      \"status\": \"PENDING_APPROVAL\",\n      \"comments\": \"Pending final review\"\n    }\n  ],\n  \"notes\": \"Draft invoice for Q4 audit services - pending final review\",\n  \"createdAt\": \"2024-12-01T09:00:00Z\",\n  \"updatedAt\": \"2024-12-06T14:15:00Z\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 56789,\n  \"draftNumber\": \"DRAFT-2024-001\",\n  \"reference\": \"Q4-AUDIT-DRAFT-2024\",\n  \"status\": \"UNDER_REVIEW\",\n  \"reviewStatus\": \"PENDING_APPROVAL\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"clientEmail\": \"billing@acme.com\",\n  \"projectId\": 67890,\n  \"projectName\": \"Q4 Financial Audit\",\n  \"preparedDate\": \"2024-12-01T00:00:00Z\",\n  \"proposedIssueDate\": \"2024-12-15T00:00:00Z\",\n  \"proposedDueDate\": \"2025-01-15T23:59:59Z\",\n  \"subtotal\": 20000.00,\n  \"taxAmount\": 2000.00,\n  \"totalAmount\": 22000.00,\n  \"currency\": \"USD\",\n  \"lineItems\": [\n    {\n      \"id\": 1,\n      \"description\": \"Financial Statement Audit\",\n      \"quantity\": 80,\n      \"unitPrice\": 250.00,\n      \"amount\": 20000.00,\n      \"taxRate\": 0.10,\n      \"notes\": \"Includes fieldwork and report preparation\"\n    }\n  ],\n  \"reviewHistory\": [\n    {\n      \"id\": 1,\n      \"reviewerId\": 123,\n      \"reviewerName\": \"John Smith\",\n      \"reviewDate\": \"2024-12-05T10:30:00Z\",\n      \"status\": \"APPROVED\",\n      \"comments\": \"All calculations verified and approved\"\n    },\n    {\n      \"id\": 2,\n      \"reviewerId\": 124,\n      \"reviewerName\": \"Jane Doe\",\n      \"reviewDate\": \"2024-12-06T14:15:00Z\",\n      \"status\": \"PENDING_APPROVAL\",\n      \"comments\": \"Pending final review\"\n    }\n  ],\n  \"notes\": \"Draft invoice for Q4 audit services - pending final review\",\n  \"createdAt\": \"2024-12-01T09:00:00Z\",\n  \"updatedAt\": \"2024-12-06T14:15:00Z\"\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the draft invoice","required":true,"example":56789}],"pointer":"/paths/~1gql~1v1~1draft_invoice~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/draft_invoice/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":56789,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/draft_invoice/{id}","href":"billing/getdraftinvoicebyid","openApiOperationId":"getDraftInvoiceById","summary":"Get draft invoice by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Draft invoice details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_165"}},"schemaId":"schema_165"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this draft invoice"},{"code":"404","description":"Draft invoice not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_166"}},"schemaId":"schema_166"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1draft_invoice~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_165","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_165"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_166","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_166"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/billing/getdraftinvoicebyid"}],"panels":[]}]},"httpPath":"/gql/v1/draft_invoice/{id}"}],"content":{"contentType":"group","meta":{"name":"Billing"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🧾 Billing","showPageActions":true},{"nodeType":"markdoc","content":"Manage billing cycles, statements, and billing configurations."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/draft_invoice_histories","summary":"List draft invoice histories","prefix":{"name":"post","color":"post"},"badges":[],"link":"/billing/getdraftinvoicehistoriespaginated","deprecated":false},{"title":"/gql/v1/draft_invoice_histories/search","summary":"Search draft invoice histories","prefix":{"name":"post","color":"post"},"badges":[],"link":"/billing/filterdraftinvoicehistoriesdynamic","deprecated":false},{"title":"/gql/v1/draft_invoice/{id}","summary":"Get draft invoice by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/billing/getdraftinvoicebyid","deprecated":false}]}]}]}]}},{"type":"group","label":"📄 Invoices","link":"/bundle/invoices","routeSlug":"/bundle/invoices","items":[{"label":"List invoices","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/invoices/getinvoices","routeSlug":"/bundle/invoices/getinvoices","metadata":{"seo":{"title":"List invoices","description":"Retrieve invoices with comprehensive filtering and financial data"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getInvoices","name":"List invoices","isWebhook":false,"pointer":"/paths/~1gql~1v1~1invoices/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List invoices","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve invoices with comprehensive filtering and financial data"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint delivers complete invoice management functionality with:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced pagination for large invoice datasets"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Multi-dimensional filtering (client, status, date ranges)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration with AR transactions for complete financial context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax, interest, and payment status tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship data for each invoice"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Aggregate counting for reporting and analytics"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Key Financial Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice status tracking (PENDING, PAID, OVERDUE, POSTED, etc.)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax and interest calculations included"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Due date monitoring for collections management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AR transaction linkage for payment reconciliation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Amount and allocation tracking for financial reporting"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Filtering Capabilities:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client-specific invoice retrieval"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Status-based filtering for workflow management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Date range queries for period reporting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sorting by creation date or transaction date"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Accounts receivable management and aging reports"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client billing history and statement generation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Collections management and overdue tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial reporting and revenue recognition"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment reconciliation and allocation tracking"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/invoices' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/invoices' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_167","exampleIds":["paths/~1gql~1v1~1invoices/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_167","exampleIds":["paths/~1gql~1v1~1invoices/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1invoices/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/invoices","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_167","exampleIds":["paths/~1gql~1v1~1invoices/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/invoices","href":"invoices/getinvoices","openApiOperationId":"getInvoices","summary":"List invoices"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_167","exampleIds":["paths/~1gql~1v1~1invoices/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_167","exampleIds":["paths/~1gql~1v1~1invoices/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved invoice records","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_168","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_168","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_client_id"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_client_id"]},{"code":"401","description":"Unauthorized - missing or invalid admin secret","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/401/content/application~1json/examples/missing_auth"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/401/content/application~1json/examples/missing_auth"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}},"schemaId":"schema_116"}],"pointer":"/paths/~1gql~1v1~1invoices/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_168","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_168","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_client_id"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_client_id"]}}},{"code":"401","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/401/content/application~1json/examples/missing_auth"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1invoices/post/responses/401/content/application~1json/examples/missing_auth"]}}},{"code":"500","schemaId":"schema_116","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/invoices/getinvoices"}],"panels":[]}]},"httpPath":"/gql/v1/invoices"},{"label":"Search invoices","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/invoices/filterinvoicesdynamic","routeSlug":"/bundle/invoices/filterinvoicesdynamic","metadata":{"seo":{"title":"Search invoices","description":"Advanced invoice filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterInvoicesDynamic","name":"Search invoices","isWebhook":false,"pointer":"/paths/~1gql~1v1~1invoices~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search invoices","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced invoice filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supports invoiceNumber text matching, status filtering, and date ranges."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/invoices/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"invoiceNumber\": {\n              \"_ilike\": \"%2024%\"\n            }\n          },\n          {\n            \"description\": {\n              \"_ilike\": \"%service%\"\n            }\n          }\n        ]\n      },\n      {\n        \"status\": {\n          \"_in\": [\"POSTED\", \"CLOSED\"]\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"dueDate\": {\n          \"_gte\": \"2024-01-01T00:00:00Z\"\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"invoiceNumber\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/invoices/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"invoiceNumber\": {\n              \"_ilike\": \"%2024%\"\n            }\n          },\n          {\n            \"description\": {\n              \"_ilike\": \"%service%\"\n            }\n          }\n        ]\n      },\n      {\n        \"status\": {\n          \"_in\": [\"POSTED\", \"CLOSED\"]\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"dueDate\": {\n          \"_gte\": \"2024-01-01T00:00:00Z\"\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"invoiceNumber\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_169"}},"schemaId":"schema_169","pointer":"/paths/~1gql~1v1~1invoices~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/invoices/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_169"}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/invoices/search","href":"invoices/filterinvoicesdynamic","openApiOperationId":"filterInvoicesDynamic","summary":"Search invoices"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_169","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_169"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered invoices","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_170"}},"schemaId":"schema_170"},{"code":"400","description":"Bad request - invalid where/orderBy"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1invoices~1search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_170","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_170"}}},{"code":"400"},{"code":"401"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/invoices/filterinvoicesdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/invoices/search"},{"label":"Get invoice by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/invoices/getinvoicebyid","routeSlug":"/bundle/invoices/getinvoicebyid","metadata":{"seo":{"title":"Get invoice by ID","description":"Retrieve a specific invoice by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getInvoiceById","name":"Get invoice by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1invoice~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get invoice by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific invoice by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed invoice information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete invoice details and line items"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice status and payment tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client and project relationships"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax calculations and compliance data"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment history and outstanding balances"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Document generation and delivery status"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice Management Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice lifecycle tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment status monitoring"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax calculation and compliance"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship integration"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Document generation and delivery"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice number and reference"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice status and payment status"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client and project information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Line items and amounts"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax calculations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment history"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invoice status monitoring"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment tracking and reconciliation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client billing history"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Revenue recognition analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tax compliance reporting"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/invoice/45678' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/invoice/45678' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"arTranId\": 45678,\n  \"invoiceNumber\": \"INV-2024-001\",\n  \"dueDate\": \"2024-12-31T23:59:59Z\",\n  \"status\": \"POSTED\",\n  \"tax\": 2000.00,\n  \"interest\": 0.00,\n  \"description\": \"Q4 Financial Audit\",\n  \"createdAt\": \"2024-12-01T09:00:00Z\",\n  \"updatedAt\": \"2024-12-15T10:30:00Z\",\n  \"ar_tran\": {\n    \"id\": 45678,\n    \"pmsRef\": \"AR-2024-045678\",\n    \"transactionDate\": \"2024-12-01T00:00:00Z\",\n    \"amount\": 22000.00,\n    \"allocated\": 15000.00,\n    \"clientId\": 789\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"arTranId\": 45678,\n  \"invoiceNumber\": \"INV-2024-001\",\n  \"dueDate\": \"2024-12-31T23:59:59Z\",\n  \"status\": \"POSTED\",\n  \"tax\": 2000.00,\n  \"interest\": 0.00,\n  \"description\": \"Q4 Financial Audit\",\n  \"createdAt\": \"2024-12-01T09:00:00Z\",\n  \"updatedAt\": \"2024-12-15T10:30:00Z\",\n  \"ar_tran\": {\n    \"id\": 45678,\n    \"pmsRef\": \"AR-2024-045678\",\n    \"transactionDate\": \"2024-12-01T00:00:00Z\",\n    \"amount\": 22000.00,\n    \"allocated\": 15000.00,\n    \"clientId\": 789\n  }\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the invoice","required":true,"example":45678}],"pointer":"/paths/~1gql~1v1~1invoice~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/invoice/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":45678,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/invoice/{id}","href":"invoices/getinvoicebyid","openApiOperationId":"getInvoiceById","summary":"Get invoice by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Invoice details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_171"}},"schemaId":"schema_171"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this invoice"},{"code":"404","description":"Invoice not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_172"}},"schemaId":"schema_172"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1invoice~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_171","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_171"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_172","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_172"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/invoices/getinvoicebyid"}],"panels":[]}]},"httpPath":"/gql/v1/invoice/{id}"}],"content":{"contentType":"group","meta":{"name":"Invoices"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"📄 Invoices","showPageActions":true},{"nodeType":"markdoc","content":"Create, send, and manage invoices."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/invoices","summary":"List invoices","prefix":{"name":"post","color":"post"},"badges":[],"link":"/invoices/getinvoices","deprecated":false},{"title":"/gql/v1/invoices/search","summary":"Search invoices","prefix":{"name":"post","color":"post"},"badges":[],"link":"/invoices/filterinvoicesdynamic","deprecated":false},{"title":"/gql/v1/invoice/{id}","summary":"Get invoice by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/invoices/getinvoicebyid","deprecated":false}]}]}]}]}},{"type":"group","label":"📋 Projects","link":"/bundle/projects","routeSlug":"/bundle/projects","items":[{"label":"List projects","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/projects/getprojectspaginated","routeSlug":"/bundle/projects/getprojectspaginated","metadata":{"seo":{"title":"List projects","description":"Retrieve all projects with basic pagination support"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getProjectsPaginated","name":"List projects","isWebhook":false,"pointer":"/paths/~1gql~1v1~1projects/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List projects","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all projects with basic pagination support"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Projects are represented via "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"vw_job"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Default ordering by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"updatedAt"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" desc."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/projects' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/projects' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_173","exampleIds":["paths/~1gql~1v1~1projects/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_173","exampleIds":["paths/~1gql~1v1~1projects/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1projects/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/projects","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_173","exampleIds":["paths/~1gql~1v1~1projects/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/projects","href":"projects/getprojectspaginated","openApiOperationId":"getProjectsPaginated","summary":"List projects"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_173","exampleIds":["paths/~1gql~1v1~1projects/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_173","exampleIds":["paths/~1gql~1v1~1projects/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved projects"},{"code":"400","description":"Bad request - invalid pagination parameters"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1projects/post/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/projects/getprojectspaginated"}],"panels":[]}]},"httpPath":"/gql/v1/projects"},{"label":"Search projects","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/projects/filterprojectsdynamic","routeSlug":"/bundle/projects/filterprojectsdynamic","metadata":{"seo":{"title":"Search projects","description":"Advanced project filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterProjectsDynamic","name":"Search projects","isWebhook":false,"pointer":"/paths/~1gql~1v1~1projects~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search projects","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced project filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Projects are stored in the Jobs table (vw_job view). Supports manager, dates, and flags."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/projects/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"name\": {\n              \"_ilike\": \"%migration%\"\n            }\n          },\n          {\n            \"serviceDescription\": {\n              \"_ilike\": \"%review%\"\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"updatedAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"partnerId\": {\n          \"_in\": [\n            101,\n            102,\n            103\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"updatedAt\": \"desc\"\n    },\n    {\n      \"name\": \"asc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/projects/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"name\": {\n              \"_ilike\": \"%migration%\"\n            }\n          },\n          {\n            \"serviceDescription\": {\n              \"_ilike\": \"%review%\"\n            }\n          }\n        ]\n      },\n      {\n        \"active\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"updatedAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"partnerId\": {\n          \"_in\": [\n            101,\n            102,\n            103\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"updatedAt\": \"desc\"\n    },\n    {\n      \"name\": \"asc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_174"}},"schemaId":"schema_174","pointer":"/paths/~1gql~1v1~1projects~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/projects/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_174"}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/projects/search","href":"projects/filterprojectsdynamic","openApiOperationId":"filterProjectsDynamic","summary":"Search projects"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_174","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_174"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered projects"},{"code":"400","description":"Bad request - invalid where/orderBy"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1projects~1search/post/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/projects/filterprojectsdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/projects/search"},{"label":"Get project by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/projects/getprojectbyid","routeSlug":"/bundle/projects/getprojectbyid","metadata":{"seo":{"title":"Get project by ID","description":"Retrieve a specific project by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getProjectById","name":"Get project by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1project~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get project by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific project by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed project information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete project details and specifications"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project status and lifecycle information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client and engagement relationships"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Team assignments and resource allocation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Budget and financial tracking data"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeline and milestone information"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project Management Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project lifecycle tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Resource allocation and team management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Budget and financial oversight"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeline and milestone management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship integration"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project name and description"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project status and phase"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client and engagement references"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Team member assignments"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Budget and financial data"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeline and milestone tracking"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project status monitoring"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Resource allocation analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Budget tracking and reporting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client project portfolio management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Team performance analysis"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/project/67890' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/project/67890' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 67890,\n  \"name\": \"Q4 Financial Audit\",\n  \"description\": \"Comprehensive financial audit for Q4 2024 including tax preparation and compliance review\",\n  \"status\": \"IN_PROGRESS\",\n  \"phase\": \"EXECUTION\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"engagementId\": 456,\n  \"engagementName\": \"Annual Audit Engagement\",\n  \"startDate\": \"2024-10-01T00:00:00Z\",\n  \"endDate\": \"2024-12-31T23:59:59Z\",\n  \"budget\": 25000.00,\n  \"currency\": \"USD\",\n  \"actualCost\": 18500.00,\n  \"teamMembers\": [\n    {\n      \"staffId\": 123,\n      \"name\": \"John Smith\",\n      \"role\": \"SENIOR_AUDITOR\",\n      \"allocation\": 0.8\n    },\n    {\n      \"staffId\": 124,\n      \"name\": \"Jane Doe\",\n      \"role\": \"AUDITOR\",\n      \"allocation\": 0.6\n    }\n  ],\n  \"milestones\": [\n    {\n      \"id\": 1,\n      \"name\": \"Planning Phase Complete\",\n      \"dueDate\": \"2024-10-15T00:00:00Z\",\n      \"status\": \"COMPLETED\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Fieldwork Complete\",\n      \"dueDate\": \"2024-12-15T00:00:00Z\",\n      \"status\": \"IN_PROGRESS\"\n    }\n  ],\n  \"createdAt\": \"2024-09-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 67890,\n  \"name\": \"Q4 Financial Audit\",\n  \"description\": \"Comprehensive financial audit for Q4 2024 including tax preparation and compliance review\",\n  \"status\": \"IN_PROGRESS\",\n  \"phase\": \"EXECUTION\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"engagementId\": 456,\n  \"engagementName\": \"Annual Audit Engagement\",\n  \"startDate\": \"2024-10-01T00:00:00Z\",\n  \"endDate\": \"2024-12-31T23:59:59Z\",\n  \"budget\": 25000.00,\n  \"currency\": \"USD\",\n  \"actualCost\": 18500.00,\n  \"teamMembers\": [\n    {\n      \"staffId\": 123,\n      \"name\": \"John Smith\",\n      \"role\": \"SENIOR_AUDITOR\",\n      \"allocation\": 0.8\n    },\n    {\n      \"staffId\": 124,\n      \"name\": \"Jane Doe\",\n      \"role\": \"AUDITOR\",\n      \"allocation\": 0.6\n    }\n  ],\n  \"milestones\": [\n    {\n      \"id\": 1,\n      \"name\": \"Planning Phase Complete\",\n      \"dueDate\": \"2024-10-15T00:00:00Z\",\n      \"status\": \"COMPLETED\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Fieldwork Complete\",\n      \"dueDate\": \"2024-12-15T00:00:00Z\",\n      \"status\": \"IN_PROGRESS\"\n    }\n  ],\n  \"createdAt\": \"2024-09-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the project","required":true,"example":67890}],"pointer":"/paths/~1gql~1v1~1project~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/project/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":67890,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/project/{id}","href":"projects/getprojectbyid","openApiOperationId":"getProjectById","summary":"Get project by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Project details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_175"}},"schemaId":"schema_175"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this project"},{"code":"404","description":"Project not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_176"}},"schemaId":"schema_176"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1project~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_175","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_175"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_176","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_176"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/projects/getprojectbyid"}],"panels":[]}]},"httpPath":"/gql/v1/project/{id}"},{"label":"Create one or more jobs from job templates","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/projects/createprojectsfromtemplate","routeSlug":"/bundle/projects/createprojectsfromtemplate","metadata":{"seo":{"title":"Create one or more jobs from job templates","description":"Create jobs from job templates"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createProjectsFromTemplate","name":"Create one or more jobs from job templates","isWebhook":false,"pointer":"/paths/~1api~1v1~1projects~1create_from_template/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create one or more jobs from job templates","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create jobs from job templates"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates one or more jobs for a client from job templates. Up to 100 templates"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"may be provided in a single request. Each entry in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobTemplates"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" can override"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"field-level defaults defined on the template."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Required fields:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"clientId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the client for whom the jobs are being created"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobTemplates"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — list of job templates to instantiate (1–100 entries)"},"children":[]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the template to create a job from"},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optional per-template overrides"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (each overrides the template default if provided):"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"startDate"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — job start date"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — job name"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"serviceDescription"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — service description"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"estimationHours"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — estimated hours"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"feeAmount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — fee amount"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"requiredPrepayment"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — required prepayment amount"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"includeWipType"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — WIP billing behavior ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"INCLUDE_WIP"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"INCLUDE_WIP_IF_FINAL"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"DO_NOT_INCLUDE"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/projects/create_from_template' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"clientId\": 420,\n  \"jobTemplates\": [\n    {\n      \"jobTemplateId\": 7,\n      \"startDate\": \"2025-01-01\",\n      \"name\": \"Tax Return 2024\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/projects/create_from_template' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"clientId\": 420,\n  \"jobTemplates\": [\n    {\n      \"jobTemplateId\": 7,\n      \"startDate\": \"2025-01-01\",\n      \"name\": \"Tax Return 2024\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_177","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/full"]}},"schemaId":"schema_177","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/full"],"pointer":"/paths/~1api~1v1~1projects~1create_from_template/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/projects/create_from_template","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_177","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/full"]}},"responseCodes":["201","400","401","403","500"],"pointer":"/api/v1/projects/create_from_template","href":"projects/createprojectsfromtemplate","openApiOperationId":"createProjectsFromTemplate","summary":"Create one or more jobs from job templates"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_177","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/full"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_177","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/full"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Jobs created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_178","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/responses/201/content/application~1json/examples/success"]}},"schemaId":"schema_178","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/responses/201/content/application~1json/examples/success"]},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_PROJ_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1projects~1create_from_template/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"201","schemaId":"schema_178","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/responses/201/content/application~1json/examples/success"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_178","exampleIds":["paths/~1api~1v1~1projects~1create_from_template/post/responses/201/content/application~1json/examples/success"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/projects/createprojectsfromtemplate"}],"panels":[]}]},"httpPath":"/api/v1/projects/create_from_template"},{"label":"Assign staff to a project","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/projects/assignstafftoproject","routeSlug":"/bundle/projects/assignstafftoproject","metadata":{"seo":{"title":"Assign staff to a project","description":"Assign staff to a project"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"AssignStaffToProject","name":"Assign staff to a project","isWebhook":false,"pointer":"/paths/~1api~1v1~1projects~1assign_staff/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Assign staff to a project","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Assign staff to a project"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates associations between staff members and a job:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staffJobAssignments"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": assigns staff directly to the job via "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staff_job"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" records"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staffTaskAssignments"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": assigns staff to specific task types on the job via "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"task_type_staff_job"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" records"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If an association already exists but is inactive, it will be re-activated."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the IDs of created or re-activated records."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/projects/assign_staff' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"jobId\": 5001,\n  \"staffJobAssignments\": [{\"staffId\": 103}, {\"staffId\": 104}],\n  \"staffTaskAssignments\": [{\"staffId\": 103, \"taskTypeId\": 10}, {\"staffId\": 104, \"taskTypeId\": 11}]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/projects/assign_staff' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"jobId\": 5001,\n  \"staffJobAssignments\": [{\"staffId\": 103}, {\"staffId\": 104}],\n  \"staffTaskAssignments\": [{\"staffId\": 103, \"taskTypeId\": 10}, {\"staffId\": 104, \"taskTypeId\": 11}]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_179"}},"schemaId":"schema_179","pointer":"/paths/~1api~1v1~1projects~1assign_staff/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/projects/assign_staff","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_179"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/projects/assign_staff","href":"projects/assignstafftoproject","openApiOperationId":"AssignStaffToProject","summary":"Assign staff to a project"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_179","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_179"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Staff assigned successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}},"schemaId":"schema_157"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires PROJ_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1projects~1assign_staff/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_157","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/projects/assignstafftoproject"}],"panels":[]}]},"httpPath":"/api/v1/projects/assign_staff"},{"label":"Remove staff from a project","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/projects/removestafffromproject","routeSlug":"/bundle/projects/removestafffromproject","metadata":{"seo":{"title":"Remove staff from a project","description":"Remove staff from a project"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"RemoveStaffFromProject","name":"Remove staff from a project","isWebhook":false,"pointer":"/paths/~1api~1v1~1projects~1remove_staff/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Remove staff from a project","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Remove staff from a project"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Deactivates associations between staff members and a job:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staffJobAssignments"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": deactivates matching "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staff_job"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" records"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"staffTaskAssignments"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": deactivates matching "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"task_type_staff_job"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" records"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the IDs of deactivated records. Items with no matching active record are silently skipped."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/projects/remove_staff' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"jobId\": 5001,\n  \"staffJobAssignments\": [{\"staffId\": 103}, {\"staffId\": 104}],\n  \"staffTaskAssignments\": [{\"staffId\": 103, \"taskTypeId\": 10}, {\"staffId\": 104, \"taskTypeId\": 11}]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/projects/remove_staff' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"jobId\": 5001,\n  \"staffJobAssignments\": [{\"staffId\": 103}, {\"staffId\": 104}],\n  \"staffTaskAssignments\": [{\"staffId\": 103, \"taskTypeId\": 10}, {\"staffId\": 104, \"taskTypeId\": 11}]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_179"}},"schemaId":"schema_179","pointer":"/paths/~1api~1v1~1projects~1remove_staff/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/projects/remove_staff","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_179"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/projects/remove_staff","href":"projects/removestafffromproject","openApiOperationId":"RemoveStaffFromProject","summary":"Remove staff from a project"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_179","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_179"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Staff removed successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}},"schemaId":"schema_157"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires PROJ_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1projects~1remove_staff/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_157","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/projects/removestafffromproject"}],"panels":[]}]},"httpPath":"/api/v1/projects/remove_staff"}],"content":{"contentType":"group","meta":{"name":"Projects"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"📋 Projects","showPageActions":true},{"nodeType":"markdoc","content":"Handle engagements, projects, and workflow tracking."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/projects","summary":"List projects","prefix":{"name":"post","color":"post"},"badges":[],"link":"/projects/getprojectspaginated","deprecated":false},{"title":"/gql/v1/projects/search","summary":"Search projects","prefix":{"name":"post","color":"post"},"badges":[],"link":"/projects/filterprojectsdynamic","deprecated":false},{"title":"/gql/v1/project/{id}","summary":"Get project by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/projects/getprojectbyid","deprecated":false},{"title":"/api/v1/projects/create_from_template","summary":"Create one or more jobs from job templates","prefix":{"name":"post","color":"post"},"badges":[],"link":"/projects/createprojectsfromtemplate","deprecated":false},{"title":"/api/v1/projects/assign_staff","summary":"Assign staff to a project","prefix":{"name":"post","color":"post"},"badges":[],"link":"/projects/assignstafftoproject","deprecated":false},{"title":"/api/v1/projects/remove_staff","summary":"Remove staff from a project","prefix":{"name":"post","color":"post"},"badges":[],"link":"/projects/removestafffromproject","deprecated":false}]}]}]}]}},{"type":"group","label":"⏱ Time Management","link":"/bundle/time-management","routeSlug":"/bundle/time-management","items":[{"label":"List all task types","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/gettasktypes","routeSlug":"/bundle/time-management/gettasktypes","metadata":{"seo":{"title":"List all task types","description":"Retrieve all task types"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTaskTypes","name":"List all task types","isWebhook":false,"pointer":"/paths/~1v1~1task-types/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List all task types","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all task types"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns every task type available for the tenant, ordered alphabetically by"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"display name. Task types classify the work performed on time entries and"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"projects, and carry billing and tax settings used downstream in invoicing."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each task type includes:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Display name, code, and description"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billing and tax flags ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billable"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taxable"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optional custom hourly rate and rate type"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Service line and category associations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage counts across projects and invoices"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Aiwyn-managed vs firm-defined indicators"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Active status and audit timestamps"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/task-types' \\\n--header 'Authorization: Bearer {{token}}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/task-types' \\\n--header 'Authorization: Bearer {{token}}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v1/task-types","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","500"],"pointer":"/v1/task-types","href":"time-management/gettasktypes","openApiOperationId":"getTaskTypes","summary":"List all task types"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Task types retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_180","exampleIds":["paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/empty"]}},"schemaId":"schema_180","exampleIds":["paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/empty"]},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires API_ADMIN role)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1v1~1task-types/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_180","exampleIds":["paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/empty"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_180","exampleIds":["paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/empty"]}}},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/gettasktypes"}],"panels":[]}]},"httpPath":"/v1/task-types"},{"label":"Search task types","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/searchtasktypesdynamic","routeSlug":"/bundle/time-management/searchtasktypesdynamic","metadata":{"seo":{"title":"Search task types","description":"Advanced task type filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"searchTaskTypesDynamic","name":"Search task types","isWebhook":false,"pointer":"/paths/~1v1~1task-types~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search task types","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced task type filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supports flexible filtering across any task type field using GraphQL-style "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"where"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"clauses, with pagination and dynamic ordering."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Common filter examples (pass in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"where"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" field):"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By code:          "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"code\": { \"_eq\": \"PREP\" } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By active status: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"active\": { \"_eq\": true } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By billable flag: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"billable\": { \"_eq\": true } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By category:      "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"taskTypeCategoryId\": { \"_eq\": 5 } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By service line:  "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"serviceLineId\": { \"_eq\": 2 } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Combined:         "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"_and\": [ { \"billable\": { \"_eq\": true } }, { \"active\": { \"_eq\": true } } ] }"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/task-types/search' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0,\n  \"where\": {\n    \"_and\": [\n      { \"billable\": { \"_eq\": true } },\n      { \"active\": { \"_eq\": true } }\n    ]\n  },\n  \"orderBy\": [\n    { \"display\": \"asc\" }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/task-types/search' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0,\n  \"where\": {\n    \"_and\": [\n      { \"billable\": { \"_eq\": true } },\n      { \"active\": { \"_eq\": true } }\n    ]\n  },\n  \"orderBy\": [\n    { \"display\": \"asc\" }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_181","exampleIds":["paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/billable_active","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_service_line","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_code"]}},"schemaId":"schema_181","exampleIds":["paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/billable_active","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_service_line","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_code"],"pointer":"/paths/~1v1~1task-types~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/v1/task-types/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_181","exampleIds":["paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/billable_active","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_service_line","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_code"]}},"responseCodes":["200","400","401","403","500"],"pointer":"/v1/task-types/search","href":"time-management/searchtasktypesdynamic","openApiOperationId":"searchTaskTypesDynamic","summary":"Search task types"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_181","exampleIds":["paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/billable_active","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_service_line","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_code"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_181","exampleIds":["paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/billable_active","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_service_line","paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_code"]}},"examples":[{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Task types retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_182","exampleIds":["paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/empty"]}},"schemaId":"schema_182","exampleIds":["paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/empty"]},{"code":"400","description":"Bad request - invalid filter parameters"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires API_ADMIN role)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1v1~1task-types~1search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_182","exampleIds":["paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/empty"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_182","exampleIds":["paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/empty"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/searchtasktypesdynamic"}],"panels":[]}]},"httpPath":"/v1/task-types/search"},{"label":"Get task by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/findtaskbyid","routeSlug":"/bundle/time-management/findtaskbyid","metadata":{"seo":{"title":"Get task by ID","description":"Retrieve a specific task by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"findTaskById","name":"Get task by ID","isWebhook":false,"pointer":"/paths/~1v1~1task~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get task by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific task by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns full task details including the associated task type, assignee staff"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"member, and parent job reference."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/task/456' \\\n--header 'Authorization: Bearer {{token}}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/task/456' \\\n--header 'Authorization: Bearer {{token}}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_183","description":"Unique identifier of the task","required":true,"example":456}],"pointer":"/paths/~1v1~1task~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v1/task/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":456,"schemaId":"schema_183"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","500"],"pointer":"/v1/task/{id}","href":"time-management/findtaskbyid","openApiOperationId":"findTaskById","summary":"Get task by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Task retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_184","exampleIds":["paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/not_found"]}},"schemaId":"schema_184","exampleIds":["paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/not_found"]},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires API_ADMIN role)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1v1~1task~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_184","exampleIds":["paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/not_found"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_184","exampleIds":["paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/success","paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/not_found"]}}},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/findtaskbyid"}],"panels":[]}]},"httpPath":"/v1/task/{id}"},{"label":"Search tasks","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/searchtasksdynamic","routeSlug":"/bundle/time-management/searchtasksdynamic","metadata":{"seo":{"title":"Search tasks","description":"Advanced task filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"searchTasksDynamic","name":"Search tasks","isWebhook":false,"pointer":"/paths/~1v1~1tasks~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search tasks","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced task filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supports flexible filtering across any task field — including nested relations"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taskType"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"job"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — using GraphQL-style "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"where"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" clauses, with"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"pagination and dynamic ordering."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Common filter examples (pass in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"where"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" field):"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By task type ID:   "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"taskTypeId\": { \"_eq\": 123 } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By task type code: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"taskType\": { \"code\": { \"_eq\": \"PREP\" } } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By client:         "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"job\": { \"clientId\": { \"_eq\": 456 } } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Start date range:  "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"startDate\": { \"_gte\": \"2024-01-01\", \"_lte\": \"2024-12-31\" } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Due date range:    "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"dueDate\": { \"_gte\": \"2024-01-01\", \"_lte\": \"2024-12-31\" } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By assignee:       "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"assigneeStaffId\": { \"_eq\": 789 } }"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Combined:          "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"_and\": [ { \"taskType\": { \"code\": { \"_eq\": \"PREP\" } } }, { \"assigneeStaffId\": { \"_eq\": 789 } } ] }"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/tasks/search' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0,\n  \"where\": {\n    \"_and\": [\n      { \"taskType\": { \"code\": { \"_eq\": \"PREP\" } } },\n      { \"assigneeStaffId\": { \"_eq\": 789 } }\n    ]\n  },\n  \"orderBy\": [\n    { \"dueDate\": \"asc\" }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/tasks/search' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0,\n  \"where\": {\n    \"_and\": [\n      { \"taskType\": { \"code\": { \"_eq\": \"PREP\" } } },\n      { \"assigneeStaffId\": { \"_eq\": 789 } }\n    ]\n  },\n  \"orderBy\": [\n    { \"dueDate\": \"asc\" }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_185","exampleIds":["paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_task_type_and_assignee","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_client","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/due_date_range"]}},"schemaId":"schema_185","exampleIds":["paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_task_type_and_assignee","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_client","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/due_date_range"],"pointer":"/paths/~1v1~1tasks~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/v1/tasks/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_185","exampleIds":["paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_task_type_and_assignee","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_client","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/due_date_range"]}},"responseCodes":["200","400","401","403","500"],"pointer":"/v1/tasks/search","href":"time-management/searchtasksdynamic","openApiOperationId":"searchTasksDynamic","summary":"Search tasks"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_185","exampleIds":["paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_task_type_and_assignee","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_client","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/due_date_range"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_185","exampleIds":["paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_task_type_and_assignee","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_client","paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/due_date_range"]}},"examples":[{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Tasks retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_186","exampleIds":["paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/empty"]}},"schemaId":"schema_186","exampleIds":["paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/empty"]},{"code":"400","description":"Bad request - invalid filter parameters"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires API_ADMIN role)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1v1~1tasks~1search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_186","exampleIds":["paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/empty"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_186","exampleIds":["paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/success","paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/empty"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/searchtasksdynamic"}],"panels":[]}]},"httpPath":"/v1/tasks/search"},{"label":"List WIP entries","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/getwip","routeSlug":"/bundle/time-management/getwip","metadata":{"seo":{"title":"List WIP entries","description":"Work in Progress tracking with comprehensive financial lifecycle management"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getWip","name":"List WIP entries","isWebhook":false,"pointer":"/paths/~1gql~1v1~1wip/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List WIP entries","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Work in Progress tracking with comprehensive financial lifecycle management"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This advanced endpoint provides complete WIP management including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP value tracking from creation through billing completion"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Outstanding balance calculations for unbilled work"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Multi-dimensional analysis (client, job, date-based)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial aggregations for WIP reporting and analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration with client and job data for complete context"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial Tracking Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP value recording and outstanding balance calculation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billed amount tracking for revenue recognition"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Write-off amount management for uncollectible WIP"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Job and client correlation for project profitability"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP Lifecycle Management:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creation date logging for aging analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP type categorization (TIME, EXPENSE, FIXED_FEE, etc.)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Outstanding value calculation for billing preparation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billed amount reconciliation for revenue tracking"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Intelligence & Reporting:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client-specific WIP analysis and aging"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Job-based profitability and WIP tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP aging reports for collections management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Revenue recognition and billing pipeline analysis"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial Aggregations:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Total WIP value across filtered records"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Outstanding WIP calculations for billing preparation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billed amount summaries for revenue analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Write-off tracking for financial reporting"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced Filtering:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client-specific WIP retrieval and analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Job-based WIP tracking for project management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Date range queries for period-specific reporting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP type filtering for category analysis"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Active Record Filtering:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only active WIP records are returned by default (inactive records represent deletions)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each record includes "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"isActive"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" so clients can distinguish active from inactive when querying by ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/wip' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/wip' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_187","exampleIds":["paths/~1gql~1v1~1wip/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_187","exampleIds":["paths/~1gql~1v1~1wip/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1wip/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/wip","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_187","exampleIds":["paths/~1gql~1v1~1wip/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/wip","href":"time-management/getwip","openApiOperationId":"getWip","summary":"List WIP entries"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_187","exampleIds":["paths/~1gql~1v1~1wip/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_187","exampleIds":["paths/~1gql~1v1~1wip/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved WIP records with financial aggregations","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_188","exampleIds":["paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_188","exampleIds":["paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_client_id"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_client_id"]},{"code":"401","description":"Unauthorized - missing or invalid admin secret","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/401/content/application~1json/examples/missing_auth"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/401/content/application~1json/examples/missing_auth"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}},"schemaId":"schema_116"}],"pointer":"/paths/~1gql~1v1~1wip/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_188","exampleIds":["paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_188","exampleIds":["paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/real_api_response","paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_client_id"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_client_id"]}}},{"code":"401","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/401/content/application~1json/examples/missing_auth"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1wip/post/responses/401/content/application~1json/examples/missing_auth"]}}},{"code":"500","schemaId":"schema_116","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/getwip"}],"panels":[]}]},"httpPath":"/gql/v1/wip"},{"label":"Search WIP entries","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/filterwipsdynamic","routeSlug":"/bundle/time-management/filterwipsdynamic","metadata":{"seo":{"title":"Search WIP entries","description":"Advanced WIP filtering with custom GraphQL where clauses and dynamic ordering"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"filterWipsDynamic","name":"Search WIP entries","isWebhook":false,"pointer":"/paths/~1gql~1v1~1wips~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search WIP entries","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Advanced WIP filtering with custom GraphQL where clauses and dynamic ordering"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supports wipType selection, date ranges, and client/job constraints."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By default, only active WIP records are returned. Pass "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"isActive"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"where"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"clause to include inactive records (e.g. for reconciliation syncs)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/wips/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"type\": {\n              \"_in\": [\"TIME\", \"EXPENSE\"]\n            }\n          },\n          {\n            \"notes\": {\n              \"_ilike\": \"%consultation%\"\n            }\n          }\n        ]\n      },\n      {\n        \"approved\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"loggedDate\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"clientId\": {\n          \"_in\": [\n            1001,\n            1002,\n            1003\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"loggedDate\": \"desc\"\n    },\n    {\n      \"value\": \"desc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/wips/search' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"type\": {\n              \"_in\": [\"TIME\", \"EXPENSE\"]\n            }\n          },\n          {\n            \"notes\": {\n              \"_ilike\": \"%consultation%\"\n            }\n          }\n        ]\n      },\n      {\n        \"approved\": {\n          \"_eq\": true\n        }\n      },\n      {\n        \"loggedDate\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"clientId\": {\n          \"_in\": [\n            1001,\n            1002,\n            1003\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"loggedDate\": \"desc\"\n    },\n    {\n      \"value\": \"desc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_189"}},"schemaId":"schema_189","pointer":"/paths/~1gql~1v1~1wips~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/wips/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_189"}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/wips/search","href":"time-management/filterwipsdynamic","openApiOperationId":"filterWipsDynamic","summary":"Search WIP entries"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_189","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_189"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved filtered WIP entries"},{"code":"400","description":"Bad request - invalid where/orderBy"},{"code":"401","description":"Unauthorized"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1wips~1search/post/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/filterwipsdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/wips/search"},{"label":"Get WIP time entry by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/getwipbyid","routeSlug":"/bundle/time-management/getwipbyid","metadata":{"seo":{"title":"Get WIP time entry by ID","description":"Retrieve a specific work-in-progress (WIP) time entry by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getWipById","name":"Get WIP time entry by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1wip~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get WIP time entry by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific work-in-progress (WIP) time entry by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed WIP time entry information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete time entry details and descriptions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Time entry status and approval information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client, project, and task relationships"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billable and non-billable time tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Rate calculations and billing preparation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Time entry history and modifications"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP Time Management Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Time entry lifecycle tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billable vs non-billable time classification"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Rate calculation and billing preparation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project and task relationship management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Approval workflow integration"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WIP Time Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Time entry description and details"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Time entry status and type"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client, project, and task information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Time duration and rates"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billable calculations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Approval status"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Time entry review and approval"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billable time calculation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project time tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client billing preparation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Productivity analysis"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/wip/89012' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/wip/89012' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 89012,\n  \"description\": \"Financial statement review and analysis\",\n  \"status\": \"PENDING_APPROVAL\",\n  \"type\": \"BILLABLE\",\n  \"staffId\": 123,\n  \"staffName\": \"John Smith\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"projectId\": 67890,\n  \"projectName\": \"Q4 Financial Audit\",\n  \"taskId\": 456,\n  \"taskName\": \"Financial Statement Review\",\n  \"date\": \"2024-11-20T00:00:00Z\",\n  \"startTime\": \"2024-11-20T09:00:00Z\",\n  \"endTime\": \"2024-11-20T17:00:00Z\",\n  \"duration\": 8.0,\n  \"billableHours\": 8.0,\n  \"nonBillableHours\": 0.0,\n  \"hourlyRate\": 250.00,\n  \"billableAmount\": 2000.00,\n  \"currency\": \"USD\",\n  \"notes\": \"Completed comprehensive review of Q4 financial statements including variance analysis\",\n  \"approvalHistory\": [\n    {\n      \"id\": 1,\n      \"approverId\": 124,\n      \"approverName\": \"Jane Doe\",\n      \"approvalDate\": \"2024-11-21T10:30:00Z\",\n      \"status\": \"PENDING\",\n      \"comments\": \"Under review\"\n    }\n  ],\n  \"createdAt\": \"2024-11-20T17:30:00Z\",\n  \"updatedAt\": \"2024-11-21T10:30:00Z\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 89012,\n  \"description\": \"Financial statement review and analysis\",\n  \"status\": \"PENDING_APPROVAL\",\n  \"type\": \"BILLABLE\",\n  \"staffId\": 123,\n  \"staffName\": \"John Smith\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"projectId\": 67890,\n  \"projectName\": \"Q4 Financial Audit\",\n  \"taskId\": 456,\n  \"taskName\": \"Financial Statement Review\",\n  \"date\": \"2024-11-20T00:00:00Z\",\n  \"startTime\": \"2024-11-20T09:00:00Z\",\n  \"endTime\": \"2024-11-20T17:00:00Z\",\n  \"duration\": 8.0,\n  \"billableHours\": 8.0,\n  \"nonBillableHours\": 0.0,\n  \"hourlyRate\": 250.00,\n  \"billableAmount\": 2000.00,\n  \"currency\": \"USD\",\n  \"notes\": \"Completed comprehensive review of Q4 financial statements including variance analysis\",\n  \"approvalHistory\": [\n    {\n      \"id\": 1,\n      \"approverId\": 124,\n      \"approverName\": \"Jane Doe\",\n      \"approvalDate\": \"2024-11-21T10:30:00Z\",\n      \"status\": \"PENDING\",\n      \"comments\": \"Under review\"\n    }\n  ],\n  \"createdAt\": \"2024-11-20T17:30:00Z\",\n  \"updatedAt\": \"2024-11-21T10:30:00Z\"\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the WIP time entry","required":true,"example":89012}],"pointer":"/paths/~1gql~1v1~1wip~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/wip/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":89012,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/wip/{id}","href":"time-management/getwipbyid","openApiOperationId":"getWipById","summary":"Get WIP time entry by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"WIP time entry details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_190"}},"schemaId":"schema_190"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this WIP time entry"},{"code":"404","description":"WIP time entry not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_191"}},"schemaId":"schema_191"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1wip~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_190","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_190"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_191","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_191"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/getwipbyid"}],"panels":[]}]},"httpPath":"/gql/v1/wip/{id}"},{"label":"List available time management code record types","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/listtimemanagementcodetypes","routeSlug":"/bundle/time-management/listtimemanagementcodetypes","metadata":{"seo":{"title":"List available time management code record types","description":"List available time management code record types"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listTimeManagementCodeTypes","name":"List available time management code record types","isWebhook":false,"pointer":"/paths/~1api~1v1~1codes~1types/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List available time management code record types","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List available time management code record types"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the code types that can be managed via the Product API under "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/api/v1/codes"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/codes/types","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/codes/types","href":"time-management/listtimemanagementcodetypes","openApiOperationId":"listTimeManagementCodeTypes","summary":"List available time management code record types"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Code types retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of TM_CODE_R, TM_CODE_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1codes~1types/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/listtimemanagementcodetypes"}],"panels":[]}]},"httpPath":"/api/v1/codes/types"},{"label":"Get field schema for a time management code type","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/gettimemanagementcodeschema","routeSlug":"/bundle/time-management/gettimemanagementcodeschema","metadata":{"seo":{"title":"Get field schema for a time management code type","description":"Get field schema for a time management code type"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTimeManagementCodeSchema","name":"Get field schema for a time management code type","isWebhook":false,"pointer":"/paths/~1api~1v1~1codes~1schema~1{type}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get field schema for a time management code type","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get field schema for a time management code type"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns field definitions for the requested code type."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/codes/schema/{type}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/codes/schema/{type}","href":"time-management/gettimemanagementcodeschema","openApiOperationId":"getTimeManagementCodeSchema","summary":"Get field schema for a time management code type"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Schema retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of TM_CODE_R, TM_CODE_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1codes~1schema~1{type}/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/gettimemanagementcodeschema"}],"panels":[]}]},"httpPath":"/api/v1/codes/schema/{type}"},{"label":"Create or update time management code records (upsert)","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/upserttimemanagementcodes","routeSlug":"/bundle/time-management/upserttimemanagementcodes","metadata":{"seo":{"title":"Create or update time management code records (upsert)","description":"Create or update time management code records (upsert)"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"upsertTimeManagementCodes","name":"Create or update time management code records (upsert)","isWebhook":false,"pointer":"/paths/~1api~1v1~1codes/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create or update time management code records (upsert)","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create or update time management code records (upsert)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Records are created if they don't exist, or updated if matched by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"systemRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Maximum 100 records per request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/codes' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": example value\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/codes' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": example value\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"schemaId":"schema_192","pointer":"/paths/~1api~1v1~1codes/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/codes","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_192"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/codes","href":"time-management/upserttimemanagementcodes","openApiOperationId":"upsertTimeManagementCodes","summary":"Create or update time management code records (upsert)"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_192","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"All codes processed successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}},"schemaId":"schema_193"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires TM_CODE_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1codes/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_193","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/upserttimemanagementcodes"}],"panels":[]}]},"httpPath":"/api/v1/codes"},{"label":"Lookup time management code records in pages (by type)","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/pagedlookuptimemanagementcodes","routeSlug":"/bundle/time-management/pagedlookuptimemanagementcodes","metadata":{"seo":{"title":"Lookup time management code records in pages (by type)","description":"Lookup time management code records in pages"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"pagedLookupTimeManagementCodes","name":"Lookup time management code records in pages (by type)","isWebhook":false,"pointer":"/paths/~1api~1v1~1codes~1batch~1{type}/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Lookup time management code records in pages (by type)","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Lookup time management code records in pages"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request body:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"pageSize\": 25, \"page\": 0 }"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/codes/batch/{type}' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"page\": 1\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/codes/batch/{type}' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"page\": 1\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_156"}},"schemaId":"schema_156","pointer":"/paths/~1api~1v1~1codes~1batch~1{type}/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/codes/batch/{type}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_156"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/codes/batch/{type}","href":"time-management/pagedlookuptimemanagementcodes","openApiOperationId":"pagedLookupTimeManagementCodes","summary":"Lookup time management code records in pages (by type)"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_156","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_156"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Lookup completed successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_194"}},"schemaId":"schema_194"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of TM_CODE_R, TM_CODE_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1codes~1batch~1{type}/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_194","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_194"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/pagedlookuptimemanagementcodes"}],"panels":[]}]},"httpPath":"/api/v1/codes/batch/{type}"},{"label":"List available time management entry record types","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/listtimemanagemententrytypes","routeSlug":"/bundle/time-management/listtimemanagemententrytypes","metadata":{"seo":{"title":"List available time management entry record types","description":"List available time management entry record types"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listTimeManagementEntryTypes","name":"List available time management entry record types","isWebhook":false,"pointer":"/paths/~1api~1v1~1entries~1types/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List available time management entry record types","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List available time management entry record types"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the entry types that can be managed via the Product API under "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/api/v1/entries"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/entries/types","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/entries/types","href":"time-management/listtimemanagemententrytypes","openApiOperationId":"listTimeManagementEntryTypes","summary":"List available time management entry record types"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Entry types retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of TM_ENTRY_R, TM_ENTRY_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1entries~1types/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/listtimemanagemententrytypes"}],"panels":[]}]},"httpPath":"/api/v1/entries/types"},{"label":"Get field schema for a time management entry type","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/gettimemanagemententryschema","routeSlug":"/bundle/time-management/gettimemanagemententryschema","metadata":{"seo":{"title":"Get field schema for a time management entry type","description":"Get field schema for a time management entry type"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTimeManagementEntrySchema","name":"Get field schema for a time management entry type","isWebhook":false,"pointer":"/paths/~1api~1v1~1entries~1schema~1{type}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get field schema for a time management entry type","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get field schema for a time management entry type"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns field definitions for the requested entry type."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"TimeEntry"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", the schema includes optional "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taskId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (FK to Task) and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"code"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"(work code string). Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/v1/entries/schema/TimeEntry"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to see the full"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"attribute list for your tenant, including custom fields."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/entries/schema/{type}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/entries/schema/{type}","href":"time-management/gettimemanagemententryschema","openApiOperationId":"getTimeManagementEntrySchema","summary":"Get field schema for a time management entry type"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Schema retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of TM_ENTRY_R, TM_ENTRY_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1entries~1schema~1{type}/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/gettimemanagemententryschema"}],"panels":[]}]},"httpPath":"/api/v1/entries/schema/{type}"},{"label":"Create or update time management entry records (upsert)","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/upserttimemanagemententries","routeSlug":"/bundle/time-management/upserttimemanagemententries","metadata":{"seo":{"title":"Create or update time management entry records (upsert)","description":"Create or update time management entry records (upsert)"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"upsertTimeManagementEntries","name":"Create or update time management entry records (upsert)","isWebhook":false,"pointer":"/paths/~1api~1v1~1entries/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create or update time management entry records (upsert)","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create or update time management entry records (upsert)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Records are created if they don't exist, or updated if matched by top-level "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"systemRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Maximum 100 records per request."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"time-management/upserttimemanagemententries/request/timeentry-linking-a-project-task","deepLinkHash":"/time-management/upserttimemanagemententries#time-management/upserttimemanagemententries/request/timeentry-linking-a-project-task"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"TimeEntry — linking a project task"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the optional "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taskId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" attribute to associate a time entry with a project task."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Accepts a systemRef ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"system\": \"PM\", \"reference\": \"<task-pmsRef>\" }"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), a numeric"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Aiwyn id, or a string numeric id (treated as Aiwyn id)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taskId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is set and no work code is supplied, the work code is derived from the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"linked task's task type (same behavior as the firm portal UI)."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"time-management/upserttimemanagemententries/request/timeentry-work-code-(code-attribute)","deepLinkHash":"/time-management/upserttimemanagemententries#time-management/upserttimemanagemententries/request/timeentry-work-code-(code-attribute)"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"TimeEntry — work code ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" attribute)"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"work code"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (stored as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"entry_code_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), not the task. It must match"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"the exact "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"time_management_entry_code.code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" value, or fall back to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"task_type.code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When both "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taskId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are provided, the explicit "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" wins."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"time-management/upserttimemanagemententries/request/resolving-task-references","deepLinkHash":"/time-management/upserttimemanagemententries#time-management/upserttimemanagemententries/request/resolving-task-references"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Resolving task references"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Look up tasks before upserting entries:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /v1/task/{id}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — get a task by Aiwyn id"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /v1/tasks/search"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — search tasks (filter by job, assignee, task type, dates)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"See "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/v1/entries/schema/TimeEntry"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for the full attribute list."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"time-management/upserttimemanagemententries/request/example-timeentry-with-project-task","deepLinkHash":"/time-management/upserttimemanagemententries#time-management/upserttimemanagemententries/request/example-timeentry-with-project-task"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example — TimeEntry with project task"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"records\": [\n    {\n      \"type\": \"TimeEntry\",\n      \"systemRef\": {\"system\": \"PM\", \"reference\": \"beeye-entry-001\"},\n      \"attributes\": {\n        \"pmsRef\": \"beeye-entry-001\",\n        \"loggedDate\": \"2026-06-17T09:00:00\",\n        \"value\": 2.5,\n        \"billable\": true,\n        \"notes\": \"Worked on tax planning deliverable\",\n        \"clientId\": {\"system\": \"PM\", \"reference\": \"37584\"},\n        \"jobId\": {\"system\": \"PM\", \"reference\": \"AIWYN_29059\"},\n        \"loggedStaffId\": {\"system\": \"PM\", \"reference\": \"12345\"},\n        \"taskId\": {\"system\": \"PM\", \"reference\": \"AIWYN_98765\"}\n      }\n    }\n  ]\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"records\": [\n    {\n      \"type\": \"TimeEntry\",\n      \"systemRef\": {\"system\": \"PM\", \"reference\": \"beeye-entry-001\"},\n      \"attributes\": {\n        \"pmsRef\": \"beeye-entry-001\",\n        \"loggedDate\": \"2026-06-17T09:00:00\",\n        \"value\": 2.5,\n        \"billable\": true,\n        \"notes\": \"Worked on tax planning deliverable\",\n        \"clientId\": {\"system\": \"PM\", \"reference\": \"37584\"},\n        \"jobId\": {\"system\": \"PM\", \"reference\": \"AIWYN_29059\"},\n        \"loggedStaffId\": {\"system\": \"PM\", \"reference\": \"12345\"},\n        \"taskId\": {\"system\": \"PM\", \"reference\": \"AIWYN_98765\"}\n      }\n    }\n  ]\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"time-management/upserttimemanagemententries/request/example-timeentry-with-task-and-explicit-work-code","deepLinkHash":"/time-management/upserttimemanagemententries#time-management/upserttimemanagemententries/request/example-timeentry-with-task-and-explicit-work-code"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example — TimeEntry with task and explicit work code"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"records\": [\n    {\n      \"type\": \"TimeEntry\",\n      \"systemRef\": {\"system\": \"PM\", \"reference\": \"beeye-entry-002\"},\n      \"attributes\": {\n        \"pmsRef\": \"beeye-entry-002\",\n        \"loggedDate\": \"2026-06-17T14:00:00\",\n        \"value\": 1.0,\n        \"clientId\": {\"system\": \"PM\", \"reference\": \"37584\"},\n        \"jobId\": {\"system\": \"PM\", \"reference\": \"AIWYN_29059\"},\n        \"loggedStaffId\": {\"system\": \"PM\", \"reference\": \"12345\"},\n        \"taskId\": {\"system\": \"PM\", \"reference\": \"AIWYN_98765\"},\n        \"code\": \"TXBLE30X01\"\n      }\n    }\n  ]\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"records\": [\n    {\n      \"type\": \"TimeEntry\",\n      \"systemRef\": {\"system\": \"PM\", \"reference\": \"beeye-entry-002\"},\n      \"attributes\": {\n        \"pmsRef\": \"beeye-entry-002\",\n        \"loggedDate\": \"2026-06-17T14:00:00\",\n        \"value\": 1.0,\n        \"clientId\": {\"system\": \"PM\", \"reference\": \"37584\"},\n        \"jobId\": {\"system\": \"PM\", \"reference\": \"AIWYN_29059\"},\n        \"loggedStaffId\": {\"system\": \"PM\", \"reference\": \"12345\"},\n        \"taskId\": {\"system\": \"PM\", \"reference\": \"AIWYN_98765\"},\n        \"code\": \"TXBLE30X01\"\n      }\n    }\n  ]\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sync time entries from external time-tracking systems"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Attach project tasks to time entries"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Upsert entries by external system reference"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/entries' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": [\n    {\n      \"type\": \"TimeEntry\",\n      \"systemRef\": {\"system\": \"PM\", \"reference\": \"beeye-entry-001\"},\n      \"attributes\": {\n        \"pmsRef\": \"beeye-entry-001\",\n        \"loggedDate\": \"2026-06-17T09:00:00\",\n        \"value\": 2.5,\n        \"billable\": true,\n        \"notes\": \"Worked on tax planning deliverable\",\n        \"clientId\": {\"system\": \"PM\", \"reference\": \"37584\"},\n        \"jobId\": {\"system\": \"PM\", \"reference\": \"AIWYN_29059\"},\n        \"loggedStaffId\": {\"system\": \"PM\", \"reference\": \"12345\"},\n        \"taskId\": {\"system\": \"PM\", \"reference\": \"AIWYN_98765\"}\n      }\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/entries' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": [\n    {\n      \"type\": \"TimeEntry\",\n      \"systemRef\": {\"system\": \"PM\", \"reference\": \"beeye-entry-001\"},\n      \"attributes\": {\n        \"pmsRef\": \"beeye-entry-001\",\n        \"loggedDate\": \"2026-06-17T09:00:00\",\n        \"value\": 2.5,\n        \"billable\": true,\n        \"notes\": \"Worked on tax planning deliverable\",\n        \"clientId\": {\"system\": \"PM\", \"reference\": \"37584\"},\n        \"jobId\": {\"system\": \"PM\", \"reference\": \"AIWYN_29059\"},\n        \"loggedStaffId\": {\"system\": \"PM\", \"reference\": \"12345\"},\n        \"taskId\": {\"system\": \"PM\", \"reference\": \"AIWYN_98765\"}\n      }\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"schemaId":"schema_192","pointer":"/paths/~1api~1v1~1entries/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/entries","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_192"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/entries","href":"time-management/upserttimemanagemententries","openApiOperationId":"upsertTimeManagementEntries","summary":"Create or update time management entry records (upsert)"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_192","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"All entries processed successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}},"schemaId":"schema_193"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires TM_ENTRY_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1entries/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_193","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/upserttimemanagemententries"}],"panels":[]}]},"httpPath":"/api/v1/entries"},{"label":"Lookup time management entry records in pages (by type)","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/time-management/pagedlookuptimemanagemententries","routeSlug":"/bundle/time-management/pagedlookuptimemanagemententries","metadata":{"seo":{"title":"Lookup time management entry records in pages (by type)","description":"Lookup time management entry records in pages"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"pagedLookupTimeManagementEntries","name":"Lookup time management entry records in pages (by type)","isWebhook":false,"pointer":"/paths/~1api~1v1~1entries~1batch~1{type}/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Lookup time management entry records in pages (by type)","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Lookup time management entry records in pages"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request body:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"pageSize\": 25, \"page\": 0 }"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/entries/batch/{type}' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"page\": 1\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/entries/batch/{type}' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 1,\n  \"page\": 1\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_156"}},"schemaId":"schema_156","pointer":"/paths/~1api~1v1~1entries~1batch~1{type}/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/entries/batch/{type}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_156"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/entries/batch/{type}","href":"time-management/pagedlookuptimemanagemententries","openApiOperationId":"pagedLookupTimeManagementEntries","summary":"Lookup time management entry records in pages (by type)"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_156","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_156"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Lookup completed successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_194"}},"schemaId":"schema_194"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of TM_ENTRY_R, TM_ENTRY_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1entries~1batch~1{type}/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_194","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_194"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/time-management/pagedlookuptimemanagemententries"}],"panels":[]}]},"httpPath":"/api/v1/entries/batch/{type}"}],"content":{"contentType":"group","meta":{"name":"Time Management"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"⏱ Time Management","showPageActions":true},{"nodeType":"markdoc","content":"Track and manage billable and non-billable time entries."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v1/task-types","summary":"List all task types","prefix":{"name":"get","color":"get"},"badges":[],"link":"/time-management/gettasktypes","deprecated":false},{"title":"/v1/task-types/search","summary":"Search task types","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/searchtasktypesdynamic","deprecated":false},{"title":"/v1/task/{id}","summary":"Get task by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/time-management/findtaskbyid","deprecated":false},{"title":"/v1/tasks/search","summary":"Search tasks","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/searchtasksdynamic","deprecated":false},{"title":"/gql/v1/wip","summary":"List WIP entries","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/getwip","deprecated":false},{"title":"/gql/v1/wips/search","summary":"Search WIP entries","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/filterwipsdynamic","deprecated":false},{"title":"/gql/v1/wip/{id}","summary":"Get WIP time entry by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/time-management/getwipbyid","deprecated":false},{"title":"/api/v1/codes/types","summary":"List available time management code record types","prefix":{"name":"get","color":"get"},"badges":[],"link":"/time-management/listtimemanagementcodetypes","deprecated":false},{"title":"/api/v1/codes/schema/{type}","summary":"Get field schema for a time management code type","prefix":{"name":"get","color":"get"},"badges":[],"link":"/time-management/gettimemanagementcodeschema","deprecated":false},{"title":"/api/v1/codes","summary":"Create or update time management code records (upsert)","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/upserttimemanagementcodes","deprecated":false},{"title":"/api/v1/codes/batch/{type}","summary":"Lookup time management code records in pages (by type)","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/pagedlookuptimemanagementcodes","deprecated":false},{"title":"/api/v1/entries/types","summary":"List available time management entry record types","prefix":{"name":"get","color":"get"},"badges":[],"link":"/time-management/listtimemanagemententrytypes","deprecated":false},{"title":"/api/v1/entries/schema/{type}","summary":"Get field schema for a time management entry type","prefix":{"name":"get","color":"get"},"badges":[],"link":"/time-management/gettimemanagemententryschema","deprecated":false},{"title":"/api/v1/entries","summary":"Create or update time management entry records (upsert)","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/upserttimemanagemententries","deprecated":false},{"title":"/api/v1/entries/batch/{type}","summary":"Lookup time management entry records in pages (by type)","prefix":{"name":"post","color":"post"},"badges":[],"link":"/time-management/pagedlookuptimemanagemententries","deprecated":false}]}]}]}]}},{"type":"group","label":"✉️ Engagement","link":"/bundle/engagement","routeSlug":"/bundle/engagement","items":[{"label":"List engagements","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/getengagements","routeSlug":"/bundle/engagement/getengagements","metadata":{"seo":{"title":"List engagements","description":"Project engagement tracking with comprehensive workflow management"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getEngagements","name":"List engagements","isWebhook":false,"pointer":"/paths/~1gql~1v1~1engagements/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List engagements","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project engagement tracking with comprehensive workflow management"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint delivers complete project engagement management including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client engagement tracking with date-based filtering"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Multi-level staff assignment management (partner and manager roles)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project status workflow tracking and reporting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Template-driven engagement naming and standardization"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Date range analysis for project timeline management"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project Management Capabilities:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Start and end date tracking for project lifecycles"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Status-based workflow management (ACTIVE, COMPLETED, ON_HOLD, EXECUTED, etc.)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff assignment tracking at partner and manager levels"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship management for engagement context"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Workflow Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Template-based engagement creation for consistency"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Status progression tracking for project milestones"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff allocation and responsibility assignment"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client-specific engagement history and analysis"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Intelligence:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement duration analysis and reporting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff utilization and assignment tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client engagement patterns and history"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project status distribution and workflow analysis"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Filtering and Analysis:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client-specific engagement retrieval"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Status-based workflow filtering"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Date range queries for period analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff assignment reporting and allocation"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/engagements' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/engagements' \\\n--header 'Authorization: bearer {{token}} \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"pageSize\": 25,\n  \"page\": 0\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_195","exampleIds":["paths/~1gql~1v1~1engagements/post/requestBody/content/application~1json/examples/default_pagination"]}},"schemaId":"schema_195","exampleIds":["paths/~1gql~1v1~1engagements/post/requestBody/content/application~1json/examples/default_pagination"],"pointer":"/paths/~1gql~1v1~1engagements/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/engagements","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_195","exampleIds":["paths/~1gql~1v1~1engagements/post/requestBody/content/application~1json/examples/default_pagination"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/engagements","href":"engagement/getengagements","openApiOperationId":"getEngagements","summary":"List engagements"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_195","exampleIds":["paths/~1gql~1v1~1engagements/post/requestBody/content/application~1json/examples/default_pagination"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_195","exampleIds":["paths/~1gql~1v1~1engagements/post/requestBody/content/application~1json/examples/default_pagination"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successfully retrieved engagement records","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_196","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/single_engagement","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/empty_response"]}},"schemaId":"schema_196","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/single_engagement","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/empty_response"]},{"code":"400","description":"Bad request - invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_client_id"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_client_id"]},{"code":"401","description":"Unauthorized - missing or invalid admin secret","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/401/content/application~1json/examples/missing_auth"]}},"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/401/content/application~1json/examples/missing_auth"]},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}},"schemaId":"schema_116"}],"pointer":"/paths/~1gql~1v1~1engagements/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_196","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/single_engagement","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/empty_response"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_196","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/successful_response","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/single_engagement","paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/empty_response"]}}},{"code":"400","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_client_id"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_date_range","paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_client_id"]}}},{"code":"401","schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/401/content/application~1json/examples/missing_auth"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116","exampleIds":["paths/~1gql~1v1~1engagements/post/responses/401/content/application~1json/examples/missing_auth"]}}},{"code":"500","schemaId":"schema_116","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_116"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/getengagements"}],"panels":[]}]},"httpPath":"/gql/v1/engagements"},{"label":"Search engagements","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/searchengagementsdynamic","routeSlug":"/bundle/engagement/searchengagementsdynamic","metadata":{"seo":{"title":"Search engagements","description":"Search Engagements with Dynamic Filters"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"searchEngagementsDynamic","name":"Search engagements","isWebhook":false,"pointer":"/paths/~1gql~1v1~1engagements~1search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search engagements","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Search Engagements with Dynamic Filters"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint allows you to search engagements using dynamic filters, enabling flexible querying based on various criteria."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supports multiple filter conditions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Pagination for large result sets"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sorting options for results"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/engagements/search' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"name\": {\n              \"_ilike\": \"%review%\"\n            }\n          },\n          {\n            \"engagementNameTemplate\": {\n              \"_ilike\": \"%tax%\"\n            }\n          }\n        ]\n      },\n      {\n        \"status\": {\n          \"_in\": [\"ACTIVE\", \"EXECUTED\"]\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"partnerStaffId\": {\n          \"_in\": [\n            5,\n            6,\n            7,\n            8\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"name\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/engagements/search' \\\n--data '{\n  \"pageSize\": 1,\n  \"where\": {\n    \"_and\": [\n      {\n        \"_or\": [\n          {\n            \"name\": {\n              \"_ilike\": \"%review%\"\n            }\n          },\n          {\n            \"engagementNameTemplate\": {\n              \"_ilike\": \"%tax%\"\n            }\n          }\n        ]\n      },\n      {\n        \"status\": {\n          \"_in\": [\"ACTIVE\", \"EXECUTED\"]\n        }\n      },\n      {\n        \"createdAt\": {\n          \"_gte\": \"1900-01-01T00:00:00Z\"\n        }\n      },\n      {\n        \"partnerStaffId\": {\n          \"_in\": [\n            5,\n            6,\n            7,\n            8\n          ]\n        }\n      }\n    ]\n  },\n  \"orderBy\": [\n    {\n      \"name\": \"asc\"\n    },\n    {\n      \"createdAt\": \"desc\"\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_197","exampleIds":["paths/~1gql~1v1~1engagements~1search/post/requestBody/content/application~1json/examples/default_search"]}},"schemaId":"schema_197","exampleIds":["paths/~1gql~1v1~1engagements~1search/post/requestBody/content/application~1json/examples/default_search"],"pointer":"/paths/~1gql~1v1~1engagements~1search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/gql/v1/engagements/search","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_197","exampleIds":["paths/~1gql~1v1~1engagements~1search/post/requestBody/content/application~1json/examples/default_search"]}},"responseCodes":["200","400","401","500"],"pointer":"/gql/v1/engagements/search","href":"engagement/searchengagementsdynamic","openApiOperationId":"searchEngagementsDynamic","summary":"Search engagements"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_197","exampleIds":["paths/~1gql~1v1~1engagements~1search/post/requestBody/content/application~1json/examples/default_search"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_197","exampleIds":["paths/~1gql~1v1~1engagements~1search/post/requestBody/content/application~1json/examples/default_search"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Engagements retrieved successfully.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_198"}},"schemaId":"schema_198"},{"code":"400","description":"Bad Request - Invalid input parameters.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"},{"code":"500","description":"Internal Server Error - An unexpected error occurred.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}},"schemaId":"components/schemas/Error"}],"pointer":"/paths/~1gql~1v1~1engagements~1search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_198","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_198"}}},{"code":"400","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}},{"code":"401","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}},{"code":"500","schemaId":"components/schemas/Error","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Error"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/searchengagementsdynamic"}],"panels":[]}]},"httpPath":"/gql/v1/engagements/search"},{"label":"Get engagement by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/getengagementbyid","routeSlug":"/bundle/engagement/getengagementbyid","metadata":{"seo":{"title":"Get engagement by ID","description":"Retrieve a specific engagement by its unique identifier"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getEngagementById","name":"Get engagement by ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1engagement~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get engagement by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a specific engagement by its unique identifier"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint provides detailed engagement information including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete engagement details and scope"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement status and lifecycle information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship and contact details"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project portfolio and deliverables"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Team assignments and resource allocation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial terms and billing arrangements"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement Management Features:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement lifecycle tracking"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project portfolio oversight"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Team resource allocation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial terms and billing setup"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement Details Include:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement name and description"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement status and type"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client and contact information"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project portfolio details"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Team assignments"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial terms and billing"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement status monitoring"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client relationship management"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project portfolio analysis"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Resource allocation planning"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Financial performance tracking"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/engagement/34567' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/engagement/34567' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 34567,\n  \"name\": \"Annual Audit Engagement 2024\",\n  \"description\": \"Comprehensive annual audit engagement including financial statements, tax preparation, and compliance review\",\n  \"status\": \"ACTIVE\",\n  \"type\": \"AUDIT\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"clientEmail\": \"finance@acme.com\",\n  \"clientPhone\": \"+1-555-0123\",\n  \"startDate\": \"2024-01-01T00:00:00Z\",\n  \"endDate\": \"2024-12-31T23:59:59Z\",\n  \"estimatedValue\": 50000.00,\n  \"currency\": \"USD\",\n  \"projects\": [\n    {\n      \"id\": 67890,\n      \"name\": \"Q4 Financial Audit\",\n      \"status\": \"IN_PROGRESS\",\n      \"budget\": 25000.00\n    },\n    {\n      \"id\": 67891,\n      \"name\": \"Tax Preparation\",\n      \"status\": \"PLANNING\",\n      \"budget\": 15000.00\n    }\n  ],\n  \"teamMembers\": [\n    {\n      \"staffId\": 123,\n      \"name\": \"John Smith\",\n      \"role\": \"ENGAGEMENT_PARTNER\",\n      \"allocation\": 0.3\n    },\n    {\n      \"staffId\": 124,\n      \"name\": \"Jane Doe\",\n      \"role\": \"SENIOR_MANAGER\",\n      \"allocation\": 0.8\n    }\n  ],\n  \"billingTerms\": {\n    \"billingFrequency\": \"MONTHLY\",\n    \"paymentTerms\": \"NET_30\",\n    \"rateType\": \"HOURLY\",\n    \"defaultRate\": 250.00\n  },\n  \"notes\": \"Annual engagement with quarterly reviews and monthly billing\",\n  \"createdAt\": \"2023-12-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 34567,\n  \"name\": \"Annual Audit Engagement 2024\",\n  \"description\": \"Comprehensive annual audit engagement including financial statements, tax preparation, and compliance review\",\n  \"status\": \"ACTIVE\",\n  \"type\": \"AUDIT\",\n  \"clientId\": 789,\n  \"clientName\": \"Acme Corporation\",\n  \"clientEmail\": \"finance@acme.com\",\n  \"clientPhone\": \"+1-555-0123\",\n  \"startDate\": \"2024-01-01T00:00:00Z\",\n  \"endDate\": \"2024-12-31T23:59:59Z\",\n  \"estimatedValue\": 50000.00,\n  \"currency\": \"USD\",\n  \"projects\": [\n    {\n      \"id\": 67890,\n      \"name\": \"Q4 Financial Audit\",\n      \"status\": \"IN_PROGRESS\",\n      \"budget\": 25000.00\n    },\n    {\n      \"id\": 67891,\n      \"name\": \"Tax Preparation\",\n      \"status\": \"PLANNING\",\n      \"budget\": 15000.00\n    }\n  ],\n  \"teamMembers\": [\n    {\n      \"staffId\": 123,\n      \"name\": \"John Smith\",\n      \"role\": \"ENGAGEMENT_PARTNER\",\n      \"allocation\": 0.3\n    },\n    {\n      \"staffId\": 124,\n      \"name\": \"Jane Doe\",\n      \"role\": \"SENIOR_MANAGER\",\n      \"allocation\": 0.8\n    }\n  ],\n  \"billingTerms\": {\n    \"billingFrequency\": \"MONTHLY\",\n    \"paymentTerms\": \"NET_30\",\n    \"rateType\": \"HOURLY\",\n    \"defaultRate\": 250.00\n  },\n  \"notes\": \"Annual engagement with quarterly reviews and monthly billing\",\n  \"createdAt\": \"2023-12-15T10:00:00Z\",\n  \"updatedAt\": \"2024-11-20T14:30:00Z\"\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_117","description":"Unique identifier of the engagement","required":true,"example":34567}],"pointer":"/paths/~1gql~1v1~1engagement~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/engagement/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":34567,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/gql/v1/engagement/{id}","href":"engagement/getengagementbyid","openApiOperationId":"getEngagementById","summary":"Get engagement by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Engagement details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_199"}},"schemaId":"schema_199"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions to access this engagement"},{"code":"404","description":"Engagement not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_200"}},"schemaId":"schema_200"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1engagement~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_199","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_199"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_200","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_200"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/getengagementbyid"}],"panels":[]}]},"httpPath":"/gql/v1/engagement/{id}"},{"label":"Update an existing engagement","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/updateengagement","routeSlug":"/bundle/engagement/updateengagement","metadata":{"seo":{"title":"Update an existing engagement","description":"Update an existing engagement by ID"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateEngagement","name":"Update an existing engagement","isWebhook":false,"pointer":"/paths/~1api~1v1~1engagements~1{engagementId}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update an existing engagement","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Update an existing engagement by ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Partially updates an engagement. Only the fields included in the request body"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"are modified — omitted fields are left unchanged. At least one field must be"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"provided."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Updatable Fields:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Core engagement data (client, fiscal year, partner/manager staff, contacts,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"start/end dates, billing contact, CC staff, name template)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Engagement letter template and document template"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Additional clients assigned to the engagement (full replace when provided)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Linked jobs/projects (full replace when provided)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The engagement must exist (404 if not found)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The engagement must be in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"DRAFT"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"UNDER_REVISION"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" status (400 otherwise)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"All provided IDs (additional client IDs, job IDs, etc.) must reference valid records"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"At least one field must be provided (400 if request body is empty)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Replace behavior:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" When "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"additionalClientIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is provided, it fully replaces"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"the existing associations — it is not additive. When "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is provided without"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"additionalClientIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", the existing additional clients are preserved."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Nullable fields (e.g. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"secondaryContactId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"endDate"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") cannot be"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"explicitly cleared to null via this endpoint — omitting them leaves the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"existing value unchanged."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location --request PATCH 'https://{{host}}/api/v1/engagements/12345' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"fiscalYear\": 2025,\n  \"partnerStaffId\": 456,\n  \"additionalClientIds\": [789, 790]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location --request PATCH 'https://{{host}}/api/v1/engagements/12345' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"fiscalYear\": 2025,\n  \"partnerStaffId\": 456,\n  \"additionalClientIds\": [789, 790]\n}'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"id\": 12345\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"id\": 12345\n}\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"engagementId","in":"path","schemaId":"schema_151","description":"Unique identifier of the engagement to update","required":true,"example":12345}],"pointer":"/paths/~1api~1v1~1engagements~1{engagementId}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_201"}},"schemaId":"schema_201","pointer":"/paths/~1api~1v1~1engagements~1{engagementId}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/api/v1/engagements/{engagementId}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"engagementId","in":"path","required":true,"example":12345,"schemaId":"schema_151"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_201"}},"responseCodes":["200","400","401","403","404","500"],"pointer":"/api/v1/engagements/{engagementId}","href":"engagement/updateengagement","openApiOperationId":"updateEngagement","summary":"Update an existing engagement"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_201","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_201"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Engagement updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_202"}},"schemaId":"schema_202"},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bad request — no update fields provided, or one or more IDs are invalid"},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_203"}},"schemaId":"schema_203"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unauthorized — invalid or missing authentication token"},"children":[]}]}]}]},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden — insufficient permissions (requires ROLE_ENG_C)"},"children":[]}]}]}]},{"code":"404","description":"Engagement not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_204"}},"schemaId":"schema_204"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1engagements~1{engagementId}/patch/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_202","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_202"}}},{"code":"400","schemaId":"schema_203","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_203"}}},{"code":"401"},{"code":"403"},{"code":"404","schemaId":"schema_204","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_204"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/updateengagement"}],"panels":[]}]},"httpPath":"/api/v1/engagements/{engagementId}"},{"label":"Create a single engagement","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/createengagementletter","routeSlug":"/bundle/engagement/createengagementletter","metadata":{"seo":{"title":"Create a single engagement","description":"Create a single engagement letter"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createEngagementLetter","name":"Create a single engagement","isWebhook":false,"pointer":"/paths/~1api~1v1~1engagements~1create/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a single engagement","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a single engagement letter"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates an engagement letter for a specific client. The engagement letter"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"will be associated with the specified client, fiscal year, and assigned staff."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Required fields:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"clientId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the client for whom the engagement is being created"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fiscalYear"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the fiscal year of the engagement"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partnerStaffId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the partner staff member assigned to the engagement"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"managerStaffId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the manager staff member assigned to the engagement"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"primaryContactId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the primary client contact"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optional fields:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"engagementLetterTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" / "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"documentTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — which template to use"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"engagementNameTemplate"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — override the firm's default naming template"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"startDate"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" / "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"endDate"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — engagement date range"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingContactId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — contact responsible for billing"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"secondaryContactId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — secondary client contact"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ccStaffIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — additional staff members to CC on the engagement"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"additionalClientIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — additional clients to associate with the engagement"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — jobs/projects to link to the engagement"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"additionalDocuments"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — extra documents to attach to the engagement, each requiring a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"documentTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"documentType"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/engagements/create' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"clientId\": 420,\n  \"fiscalYear\": 2024,\n  \"partnerStaffId\": 53,\n  \"managerStaffId\": 15,\n  \"primaryContactId\": 101\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/engagements/create' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"clientId\": 420,\n  \"fiscalYear\": 2024,\n  \"partnerStaffId\": 53,\n  \"managerStaffId\": 15,\n  \"primaryContactId\": 101\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_205","exampleIds":["paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/full"]}},"schemaId":"schema_205","exampleIds":["paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/full"],"pointer":"/paths/~1api~1v1~1engagements~1create/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/engagements/create","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_205","exampleIds":["paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/full"]}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/engagements/create","href":"engagement/createengagementletter","openApiOperationId":"createEngagementLetter","summary":"Create a single engagement"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_205","exampleIds":["paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/full"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_205","exampleIds":["paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/full"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Engagement letter created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_206","exampleIds":["paths/~1api~1v1~1engagements~1create/post/responses/200/content/application~1json/examples/success"]}},"schemaId":"schema_206","exampleIds":["paths/~1api~1v1~1engagements~1create/post/responses/200/content/application~1json/examples/success"]},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_ENG_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1engagements~1create/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_206","exampleIds":["paths/~1api~1v1~1engagements~1create/post/responses/200/content/application~1json/examples/success"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_206","exampleIds":["paths/~1api~1v1~1engagements~1create/post/responses/200/content/application~1json/examples/success"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/createengagementletter"}],"panels":[]}]},"httpPath":"/api/v1/engagements/create"},{"label":"Create a batch of engagements","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/createbatchengagementletters","routeSlug":"/bundle/engagement/createbatchengagementletters","metadata":{"seo":{"title":"Create a batch of engagements","description":"Create a batch of engagement letters asynchronously"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createBatchEngagementLetters","name":"Create a batch of engagements","isWebhook":false,"pointer":"/paths/~1api~1v1~1engagements~1batch~1create/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a batch of engagements","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a batch of engagement letters asynchronously"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Submits a batch of engagement letter creation requests. The batch is processed"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"asynchronously — use the returned batch ID with the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/v1/engagements/batch/{batchId}/status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint to poll for completion"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"and retrieve the IDs of the created engagements."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Batch-level options:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — optional label for the batch"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — apply a single project template to every engagement in the batch"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"includeAdditionalClients"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — include additional clients when creating engagements"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"batchEngagements"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — array of individual engagement records (required)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Constraint:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" You may provide either "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (top-level) "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"or"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectIds"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"on individual engagements — not both."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/engagements/batch/create' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"2024 Annual Batch\",\n  \"batchEngagements\": [\n    {\n      \"clientId\": 420,\n      \"fiscalYear\": 2024,\n      \"partnerStaffId\": 53,\n      \"managerStaffId\": 15,\n      \"primaryContactId\": 101\n    },\n    {\n      \"clientId\": 421,\n      \"fiscalYear\": 2024,\n      \"partnerStaffId\": 53,\n      \"managerStaffId\": 15,\n      \"primaryContactId\": 201\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/engagements/batch/create' \\\n--header 'Authorization: Bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"2024 Annual Batch\",\n  \"batchEngagements\": [\n    {\n      \"clientId\": 420,\n      \"fiscalYear\": 2024,\n      \"partnerStaffId\": 53,\n      \"managerStaffId\": 15,\n      \"primaryContactId\": 101\n    },\n    {\n      \"clientId\": 421,\n      \"fiscalYear\": 2024,\n      \"partnerStaffId\": 53,\n      \"managerStaffId\": 15,\n      \"primaryContactId\": 201\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_207","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/with_project_template"]}},"schemaId":"schema_207","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/with_project_template"],"pointer":"/paths/~1api~1v1~1engagements~1batch~1create/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/engagements/batch/create","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_207","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/with_project_template"]}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/engagements/batch/create","href":"engagement/createbatchengagementletters","openApiOperationId":"createBatchEngagementLetters","summary":"Create a batch of engagements"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_207","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/with_project_template"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_207","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/minimal","paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/with_project_template"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Batch created successfully — process is asynchronous"},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_208","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/responses/200/content/application~1json/examples/success"]}},"schemaId":"schema_208","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/responses/200/content/application~1json/examples/success"]},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invalid input data — for example, both "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and per-engagement "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" were provided"},"children":[]}]}]}]},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_ENG_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1engagements~1batch~1create/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_208","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/responses/200/content/application~1json/examples/success"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_208","exampleIds":["paths/~1api~1v1~1engagements~1batch~1create/post/responses/200/content/application~1json/examples/success"]}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/createbatchengagementletters"}],"panels":[]}]},"httpPath":"/api/v1/engagements/batch/create"},{"label":"Get engagement batch status","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/getengagementbatchstatus","routeSlug":"/bundle/engagement/getengagementbatchstatus","metadata":{"seo":{"title":"Get engagement batch status","description":"Retrieve the status of an engagement batch"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getEngagementBatchStatus","name":"Get engagement batch status","isWebhook":false,"pointer":"/paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get engagement batch status","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve the status of an engagement batch"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the current processing status of a previously submitted engagement batch,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"along with the IDs of any engagements that have been created so far."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use this endpoint to poll for completion after calling"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /api/v1/engagements/batch/create"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Batch statuses:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"DRAFT"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — batch has been recorded but processing has not started"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CREATING"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — engagements are actively being created"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CREATED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — all engagements in the batch have been created successfully"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CANCELED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the batch was canceled before completion"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/engagements/batch/9001/status' \\\n--header 'Authorization: Bearer {{token}}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/engagements/batch/9001/status' \\\n--header 'Authorization: Bearer {{token}}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"batchId","in":"path","schemaId":"schema_151","description":"Unique identifier of the engagement batch","required":true,"example":9001}],"pointer":"/paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/engagements/batch/{batchId}/status","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"batchId","in":"path","required":true,"example":9001,"schemaId":"schema_151"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/api/v1/engagements/batch/{batchId}/status","href":"engagement/getengagementbatchstatus","openApiOperationId":"getEngagementBatchStatus","summary":"Get engagement batch status"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Batch status retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_209","exampleIds":["paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/in_progress","paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/completed"]}},"schemaId":"schema_209","exampleIds":["paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/in_progress","paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/completed"]},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_ENG_C)"},"children":[]}]}]}]},{"code":"404","description":"Batch not found"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_209","exampleIds":["paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/in_progress","paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/completed"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_209","exampleIds":["paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/in_progress","paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/completed"]}}},{"code":"401"},{"code":"403"},{"code":"404"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/getengagementbatchstatus"}],"panels":[]}]},"httpPath":"/api/v1/engagements/batch/{batchId}/status"},{"label":"Get engagement documents by engagement ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/engagement/getengagementdocumentsbyengagementid","routeSlug":"/bundle/engagement/getengagementdocumentsbyengagementid","metadata":{"seo":{"title":"Get engagement documents by engagement ID","description":"Retrieve documents associated with a specific engagement"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getEngagementDocumentsByEngagementId","name":"Get engagement documents by engagement ID","isWebhook":false,"pointer":"/paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get engagement documents by engagement ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve documents associated with a specific engagement"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns all engagement documents linked to the given engagement ID, including"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"the document type name for each record."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/v1/engagement_documents/by_engagement/34567' \\\n--header 'Authorization: bearer {{token}}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/v1/engagement_documents/by_engagement/34567' \\\n--header 'Authorization: bearer {{token}}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"engagementId","in":"path","schemaId":"schema_117","description":"Unique identifier of the engagement","required":true,"example":34567}],"pointer":"/paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/gql/v1/engagement_documents/by_engagement/{engagementId}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[{"name":"engagementId","in":"path","required":true,"example":34567,"schemaId":"schema_117"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","500"],"pointer":"/gql/v1/engagement_documents/by_engagement/{engagementId}","href":"engagement/getengagementdocumentsbyengagementid","openApiOperationId":"getEngagementDocumentsByEngagementId","summary":"Get engagement documents by engagement ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Engagement documents retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_210","exampleIds":["paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/responses/200/content/application~1json/examples/success"]}},"schemaId":"schema_210","exampleIds":["paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/responses/200/content/application~1json/examples/success"]},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_210","exampleIds":["paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/responses/200/content/application~1json/examples/success"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_210","exampleIds":["paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/responses/200/content/application~1json/examples/success"]}}},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/engagement/getengagementdocumentsbyengagementid"}],"panels":[]}]},"httpPath":"/gql/v1/engagement_documents/by_engagement/{engagementId}"}],"content":{"contentType":"group","meta":{"name":"Engagement"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"✉️ Engagement","showPageActions":true},{"nodeType":"markdoc","content":"Create, send, and track engagement."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/gql/v1/engagements","summary":"List engagements","prefix":{"name":"post","color":"post"},"badges":[],"link":"/engagement/getengagements","deprecated":false},{"title":"/gql/v1/engagements/search","summary":"Search engagements","prefix":{"name":"post","color":"post"},"badges":[],"link":"/engagement/searchengagementsdynamic","deprecated":false},{"title":"/gql/v1/engagement/{id}","summary":"Get engagement by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/engagement/getengagementbyid","deprecated":false},{"title":"/api/v1/engagements/{engagementId}","summary":"Update an existing engagement","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/engagement/updateengagement","deprecated":false},{"title":"/api/v1/engagements/create","summary":"Create a single engagement","prefix":{"name":"post","color":"post"},"badges":[],"link":"/engagement/createengagementletter","deprecated":false},{"title":"/api/v1/engagements/batch/create","summary":"Create a batch of engagements","prefix":{"name":"post","color":"post"},"badges":[],"link":"/engagement/createbatchengagementletters","deprecated":false},{"title":"/api/v1/engagements/batch/{batchId}/status","summary":"Get engagement batch status","prefix":{"name":"get","color":"get"},"badges":[],"link":"/engagement/getengagementbatchstatus","deprecated":false},{"title":"/gql/v1/engagement_documents/by_engagement/{engagementId}","summary":"Get engagement documents by engagement ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/engagement/getengagementdocumentsbyengagementid","deprecated":false}]}]}]}]}},{"type":"group","label":"🗃️ Records","link":"/bundle/records","routeSlug":"/bundle/records","items":[{"label":"Create or update records (upsert)","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/createorupdaterecords","routeSlug":"/bundle/records/createorupdaterecords","metadata":{"seo":{"title":"Create or update records (upsert)","description":"Create or update records (upsert)"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createOrUpdateRecords","name":"Create or update records (upsert)","isWebhook":false,"pointer":"/paths/~1api~1v1~1records/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create or update records (upsert)","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create or update records (upsert)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Records are created if they don't exist, or updated if matched by systemRef."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Partial Success Behavior:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each record is processed independently"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Successful records are persisted even if others fail"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Check "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"summary.failed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and individual "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"records[].status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for failures"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Failed records include error details in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"records[].error"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Limits:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Maximum 100 records per request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bulk record import"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Entity synchronization"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": [\n    {\n      \"type\": \"Client\",\n      \"systemRef\": {\"system\": \"CCH\", \"reference\": \"C-12345\"},\n      \"attributes\": {\n        \"name\": \"Acme Corporation\",\n        \"email\": \"contact@acme.com\"\n      }\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": [\n    {\n      \"type\": \"Client\",\n      \"systemRef\": {\"system\": \"CCH\", \"reference\": \"C-12345\"},\n      \"attributes\": {\n        \"name\": \"Acme Corporation\",\n        \"email\": \"contact@acme.com\"\n      }\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"schemaId":"schema_192","pointer":"/paths/~1api~1v1~1records/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/records","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_192"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/records","href":"records/createorupdaterecords","openApiOperationId":"createOrUpdateRecords","summary":"Create or update records (upsert)"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_192","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Records processed successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}},"schemaId":"schema_193"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires RECD_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_193","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/createorupdaterecords"}],"panels":[]}]},"httpPath":"/api/v1/records"},{"label":"Update records (fails if not found)","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/updaterecords","routeSlug":"/bundle/records/updaterecords","metadata":{"seo":{"title":"Update records (fails if not found)","description":"Update existing records only"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateRecords","name":"Update records (fails if not found)","isWebhook":false,"pointer":"/paths/~1api~1v1~1records/put","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update records (fails if not found)","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Update existing records only"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only updates existing records. Returns error if record not found by systemRef."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The systemRef field is required for all records in PUT requests."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Partial Success Behavior:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each record is processed independently"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Successful records are persisted even if others fail"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Records not found will have status "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"FAILED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with error code "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"RECORD_NOT_FOUND"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Check "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"summary.failed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and individual "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"records[].status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for failures"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Limits:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Maximum 100 records per request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Strict update workflows"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Guaranteed existence updates"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": [\n    {\n      \"type\": \"Client\",\n      \"systemRef\": {\"system\": \"CCH\", \"reference\": \"C-12345\"},\n      \"attributes\": {\n        \"email\": \"updated@acme.com\",\n        \"phone\": \"555-1234\"\n      }\n    }\n  ]\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"records\": [\n    {\n      \"type\": \"Client\",\n      \"systemRef\": {\"system\": \"CCH\", \"reference\": \"C-12345\"},\n      \"attributes\": {\n        \"email\": \"updated@acme.com\",\n        \"phone\": \"555-1234\"\n      }\n    }\n  ]\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"schemaId":"schema_192","pointer":"/paths/~1api~1v1~1records/put/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/api/v1/records","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_192"}},"responseCodes":["200","400","401","403","404","500"],"pointer":"/api/v1/records","href":"records/updaterecords","openApiOperationId":"updateRecords","summary":"Update records (fails if not found)"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_192","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_192"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Records updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}},"schemaId":"schema_193"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires RECD_C)"},"children":[]}]}]}]},{"code":"404","description":"Records not found"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records/put/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_193","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_193"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"404"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/updaterecords"}],"panels":[]}]},"httpPath":"/api/v1/records"},{"label":"Delete (inactivate) records","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/deleterecords","routeSlug":"/bundle/records/deleterecords","metadata":{"seo":{"title":"Delete (inactivate) records","description":"Delete (inactivate) records"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deleteRecords","name":"Delete (inactivate) records","isWebhook":false,"pointer":"/paths/~1api~1v1~1records/delete","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete (inactivate) records","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Delete (inactivate) records"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Soft-deletes records by marking them as inactive. Returns error if record not found."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The systemRef field is required for all records in DELETE requests."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Partial Success Behavior:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each record is processed independently"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Successful deletions are persisted even if others fail"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Records not found will have status "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"FAILED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with error code "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"RECORD_NOT_FOUND"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Check "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"summary.failed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and individual "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"records[].status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for failures"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Limits:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Maximum 100 records per request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bulk inactivation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Record cleanup"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_211"}},"schemaId":"schema_211","pointer":"/paths/~1api~1v1~1records/delete/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/api/v1/records","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_211"}},"responseCodes":["200","401","403","404","500"],"pointer":"/api/v1/records","href":"records/deleterecords","openApiOperationId":"deleteRecords","summary":"Delete (inactivate) records"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_211","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_211"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Records deleted successfully"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires RECD_C)"},"children":[]}]}]}]},{"code":"404","description":"Records not found"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records/delete/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/deleterecords"}],"panels":[]}]},"httpPath":"/api/v1/records"},{"label":"List available record types","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/listentitytypes","routeSlug":"/bundle/records/listentitytypes","metadata":{"seo":{"title":"List available record types","description":"List available record types"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listEntityTypes","name":"List available record types","isWebhook":false,"pointer":"/paths/~1api~1v1~1records~1types/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List available record types","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List available record types"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns record types that can be managed via this API, with schema URLs."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Discover record types"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/records/types","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/records/types","href":"records/listentitytypes","openApiOperationId":"listEntityTypes","summary":"List available record types"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Entity types retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of RECD_R, RECD_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records~1types/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/listentitytypes"}],"panels":[]}]},"httpPath":"/api/v1/records/types"},{"label":"Get field schema for a record type","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/getentityschema","routeSlug":"/bundle/records/getentityschema","metadata":{"seo":{"title":"Get field schema for a record type","description":"Get field schema for a record type"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getEntitySchema","name":"Get field schema for a record type","isWebhook":false,"pointer":"/paths/~1api~1v1~1records~1schema~1{type}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get field schema for a record type","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get field schema for a record type"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns field definitions including types, validation, and foreign key relationships."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dynamic form generation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Field validation"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration mapping"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/records/schema/{type}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/records/schema/{type}","href":"records/getentityschema","openApiOperationId":"getEntitySchema","summary":"Get field schema for a record type"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Schema retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of RECD_R, RECD_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records~1schema~1{type}/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/getentityschema"}],"panels":[]}]},"httpPath":"/api/v1/records/schema/{type}"},{"label":"List all custom record types","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/listcustomrecordtypes","routeSlug":"/bundle/records/listcustomrecordtypes","metadata":{"seo":{"title":"List all custom record types","description":"List all custom record types"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listCustomRecordTypes","name":"List all custom record types","isWebhook":false,"pointer":"/paths/~1api~1v1~1records~1custom/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List all custom record types","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List all custom record types"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns all custom record type definitions for the tenant."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use includeInactive=true to include deactivated record types."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Discover custom record types"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration configuration"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/records/custom","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/records/custom","href":"records/listcustomrecordtypes","openApiOperationId":"listCustomRecordTypes","summary":"List all custom record types"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Record types retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of CUSTYP_R, CUSTYP_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records~1custom/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/listcustomrecordtypes"}],"panels":[]}]},"httpPath":"/api/v1/records/custom"},{"label":"Create a new custom record type","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/createcustomrecordtype","routeSlug":"/bundle/records/createcustomrecordtype","metadata":{"seo":{"title":"Create a new custom record type","description":"Create a new custom record type"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createCustomRecordType","name":"Create a new custom record type","isWebhook":false,"pointer":"/paths/~1api~1v1~1records~1custom/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a new custom record type","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a new custom record type"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates a new custom record type with the specified field schema."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The record type name must be unique and follow naming conventions."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Define custom data structures"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Extend system capabilities"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records/custom' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Example Name\",\n  \"displayName\": \"Example Name\",\n  \"description\": \"example value\"\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records/custom' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Example Name\",\n  \"displayName\": \"Example Name\",\n  \"description\": \"example value\"\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_212"}},"schemaId":"schema_212","pointer":"/paths/~1api~1v1~1records~1custom/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/records/custom","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_212"}},"responseCodes":["201","400","401","403","500"],"pointer":"/api/v1/records/custom","href":"records/createcustomrecordtype","openApiOperationId":"createCustomRecordType","summary":"Create a new custom record type"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_212","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_212"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Record type created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_213"}},"schemaId":"schema_213"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires CUSTYP_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records~1custom/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"201","schemaId":"schema_213","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_213"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/createcustomrecordtype"}],"panels":[]}]},"httpPath":"/api/v1/records/custom"},{"label":"Get a custom record type by name","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/getcustomrecordtype","routeSlug":"/bundle/records/getcustomrecordtype","metadata":{"seo":{"title":"Get a custom record type by name","description":"Get a custom record type by name"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getCustomRecordType","name":"Get a custom record type by name","isWebhook":false,"pointer":"/paths/~1api~1v1~1records~1custom~1{name}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get a custom record type by name","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get a custom record type by name"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the full definition of a custom record type including its field schema."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"View record type schema"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration setup"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/records/custom/{name}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/records/custom/{name}","href":"records/getcustomrecordtype","openApiOperationId":"getCustomRecordType","summary":"Get a custom record type by name"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Record type retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires any of CUSTYP_R, CUSTYP_C)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records~1custom~1{name}/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/getcustomrecordtype"}],"panels":[]}]},"httpPath":"/api/v1/records/custom/{name}"},{"label":"Update a custom record type","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/updatecustomrecordtype","routeSlug":"/bundle/records/updatecustomrecordtype","metadata":{"seo":{"title":"Update a custom record type","description":"Update a custom record type"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateCustomRecordType","name":"Update a custom record type","isWebhook":false,"pointer":"/paths/~1api~1v1~1records~1custom~1{name}/put","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a custom record type","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Update a custom record type"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Updates an existing custom record type. Only provided fields will be updated."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note: Changing fields may affect existing data."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Modify record type definitions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Add new fields"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records/custom/{name}' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"displayName\": \"Example Name\",\n  \"description\": \"example value\",\n  \"fields\": example value\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/records/custom/{name}' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"displayName\": \"Example Name\",\n  \"description\": \"example value\",\n  \"fields\": example value\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_214"}},"schemaId":"schema_214","pointer":"/paths/~1api~1v1~1records~1custom~1{name}/put/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/api/v1/records/custom/{name}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_214"}},"responseCodes":["200","400","401","403","404","500"],"pointer":"/api/v1/records/custom/{name}","href":"records/updatecustomrecordtype","openApiOperationId":"updateCustomRecordType","summary":"Update a custom record type"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_214","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_214"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Record type updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_213"}},"schemaId":"schema_213"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires CUSTYP_C)"},"children":[]}]}]}]},{"code":"404","description":"Records not found"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records~1custom~1{name}/put/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_213","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_213"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"404"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/updatecustomrecordtype"}],"panels":[]}]},"httpPath":"/api/v1/records/custom/{name}"},{"label":"Deactivate a custom record type","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/records/deactivatecustomrecordtype","routeSlug":"/bundle/records/deactivatecustomrecordtype","metadata":{"seo":{"title":"Deactivate a custom record type","description":"Deactivate a custom record type"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deactivateCustomRecordType","name":"Deactivate a custom record type","isWebhook":false,"pointer":"/paths/~1api~1v1~1records~1custom~1{name}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Deactivate a custom record type","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Deactivate a custom record type"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Soft-deletes a custom record type by marking it as inactive."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Existing data is preserved but the type will no longer appear in lists."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Remove custom record types"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Clean up unused definitions"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/api/v1/records/custom/{name}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401","403","404","500"],"pointer":"/api/v1/records/custom/{name}","href":"records/deactivatecustomrecordtype","openApiOperationId":"deactivateCustomRecordType","summary":"Deactivate a custom record type"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Record type deactivated successfully"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires CUSTYP_C)"},"children":[]}]}]}]},{"code":"404","description":"Records not found"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1records~1custom~1{name}/delete/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/records/deactivatecustomrecordtype"}],"panels":[]}]},"httpPath":"/api/v1/records/custom/{name}"}],"content":{"contentType":"group","meta":{"name":"Records"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🗃️ Records","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create, update, and manage entity records across standard and custom record types."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Records API provides:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Record Operations"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Create, update, and delete records for any entity type"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Schema Discovery"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Query available entity types and their field definitions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Custom Record Types"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Define and manage custom record type schemas"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/v1/records","summary":"Create or update records (upsert)","prefix":{"name":"post","color":"post"},"badges":[],"link":"/records/createorupdaterecords","deprecated":false},{"title":"/api/v1/records","summary":"Update records (fails if not found)","prefix":{"name":"put","color":"put"},"badges":[],"link":"/records/updaterecords","deprecated":false},{"title":"/api/v1/records","summary":"Delete (inactivate) records","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/records/deleterecords","deprecated":false},{"title":"/api/v1/records/types","summary":"List available record types","prefix":{"name":"get","color":"get"},"badges":[],"link":"/records/listentitytypes","deprecated":false},{"title":"/api/v1/records/schema/{type}","summary":"Get field schema for a record type","prefix":{"name":"get","color":"get"},"badges":[],"link":"/records/getentityschema","deprecated":false},{"title":"/api/v1/records/custom","summary":"List all custom record types","prefix":{"name":"get","color":"get"},"badges":[],"link":"/records/listcustomrecordtypes","deprecated":false},{"title":"/api/v1/records/custom","summary":"Create a new custom record type","prefix":{"name":"post","color":"post"},"badges":[],"link":"/records/createcustomrecordtype","deprecated":false},{"title":"/api/v1/records/custom/{name}","summary":"Get a custom record type by name","prefix":{"name":"get","color":"get"},"badges":[],"link":"/records/getcustomrecordtype","deprecated":false},{"title":"/api/v1/records/custom/{name}","summary":"Update a custom record type","prefix":{"name":"put","color":"put"},"badges":[],"link":"/records/updatecustomrecordtype","deprecated":false},{"title":"/api/v1/records/custom/{name}","summary":"Deactivate a custom record type","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/records/deactivatecustomrecordtype","deprecated":false}]}]}]}]}},{"type":"group","label":"🔔 Event Subscriptions","link":"/bundle/event-subscriptions","routeSlug":"/bundle/event-subscriptions","items":[{"label":"Get available event types catalog","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/geteventsettingscatalog","routeSlug":"/bundle/event-subscriptions/geteventsettingscatalog","metadata":{"seo":{"title":"Get available event types catalog","description":"Get catalog of available event types"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getEventSettingsCatalog","name":"Get available event types catalog","isWebhook":false,"pointer":"/paths/~1api~1v1~1event-subscriptions~1catalog/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get available event types catalog","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get catalog of available event types"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns all entity/operation combinations that can be subscribed to."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the 'enabled' query parameter to filter by enabled status."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Discover available events"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Integration planning"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/event-subscriptions/catalog","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/event-subscriptions/catalog","href":"event-subscriptions/geteventsettingscatalog","openApiOperationId":"getEventSettingsCatalog","summary":"Get available event types catalog"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Event Subscriptions retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}},"schemaId":"schema_157"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_API_ADMIN)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1event-subscriptions~1catalog/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_157","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/geteventsettingscatalog"}],"panels":[]}]},"httpPath":"/api/v1/event-subscriptions/catalog"},{"label":"Create a webhook subscription","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/createeventsubscription","routeSlug":"/bundle/event-subscriptions/createeventsubscription","metadata":{"seo":{"title":"Create a webhook subscription","description":"Create a webhook subscription for entity events"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createEventSubscription","name":"Create a webhook subscription","isWebhook":false,"pointer":"/paths/~1api~1v1~1event-subscriptions/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a webhook subscription","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a webhook subscription for entity events"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Subscribe to receive webhook notifications when entities are created, updated, or deleted."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The webhook URL must use HTTPS and will receive POST requests with event data."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real-time integrations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Event-driven workflows"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"System synchronization"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/event-subscriptions' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"entityType\": example value,\n  \"operation\": example value,\n  \"deliveryUrl\": \"example value\"\n}'\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/event-subscriptions' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"entityType\": example value,\n  \"operation\": example value,\n  \"deliveryUrl\": \"example value\"\n}'\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_215"}},"schemaId":"schema_215","pointer":"/paths/~1api~1v1~1event-subscriptions/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/event-subscriptions","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_215"}},"responseCodes":["201","400","401","403","500"],"pointer":"/api/v1/event-subscriptions","href":"event-subscriptions/createeventsubscription","openApiOperationId":"createEventSubscription","summary":"Create a webhook subscription"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_215","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_215"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Event Subscriptions created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_216"}},"schemaId":"schema_216"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_API_ADMIN)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1event-subscriptions/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"201","schemaId":"schema_216","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_216"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/createeventsubscription"}],"panels":[]}]},"httpPath":"/api/v1/event-subscriptions"},{"label":"Update a webhook subscription","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/updateeventsubscription","routeSlug":"/bundle/event-subscriptions/updateeventsubscription","metadata":{"seo":{"title":"Update a webhook subscription","description":"Update an existing webhook subscription"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateEventSubscription","name":"Update a webhook subscription","isWebhook":false,"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a webhook subscription","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Update an existing webhook subscription"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Modify subscription properties such as delivery URL, filter expression, or description."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only provided fields will be updated."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Update webhook URLs"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Modify event filters"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_217"}},"schemaId":"schema_217","pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/api/v1/event-subscriptions/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_217"}},"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/event-subscriptions/{id}","href":"event-subscriptions/updateeventsubscription","openApiOperationId":"updateEventSubscription","summary":"Update a webhook subscription"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"schemaId":"schema_217","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_217"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Event Subscriptions updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_218"}},"schemaId":"schema_218"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_API_ADMIN)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}/patch/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_218","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_218"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/updateeventsubscription"}],"panels":[]}]},"httpPath":"/api/v1/event-subscriptions/{id}"},{"label":"Deactivate a webhook subscription","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/deactivateeventsubscription","routeSlug":"/bundle/event-subscriptions/deactivateeventsubscription","metadata":{"seo":{"title":"Deactivate a webhook subscription","description":"Deactivate a webhook subscription"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deactivateEventSubscription","name":"Deactivate a webhook subscription","isWebhook":false,"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Deactivate a webhook subscription","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Deactivate a webhook subscription"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Soft-deletes a subscription by marking it as inactive."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The subscription can be reactivated later if needed."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Stop receiving webhooks"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Cleanup unused subscriptions"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/api/v1/event-subscriptions/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["204","401","403","404","500"],"pointer":"/api/v1/event-subscriptions/{id}","href":"event-subscriptions/deactivateeventsubscription","openApiOperationId":"deactivateEventSubscription","summary":"Deactivate a webhook subscription"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"204","description":"Event Subscriptions deleted successfully - No content returned"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_API_ADMIN)"},"children":[]}]}]}]},{"code":"404","description":"Event Subscriptions not found"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}/delete/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/deactivateeventsubscription"}],"panels":[]}]},"httpPath":"/api/v1/event-subscriptions/{id}"},{"label":"Reactivate a webhook subscription","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/reactivateeventsubscription","routeSlug":"/bundle/event-subscriptions/reactivateeventsubscription","metadata":{"seo":{"title":"Reactivate a webhook subscription","description":"Reactivate a webhook subscription"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"reactivateEventSubscription","name":"Reactivate a webhook subscription","isWebhook":false,"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}~1reactivate/post","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Reactivate a webhook subscription","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Reactivate a webhook subscription"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Reactivates a previously deactivated subscription."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Restore webhook integrations"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Resume event notifications"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/event-subscriptions/{id}/reactivate' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/event-subscriptions/{id}/reactivate' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/event-subscriptions/{id}/reactivate","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/event-subscriptions/{id}/reactivate","href":"event-subscriptions/reactivateeventsubscription","openApiOperationId":"reactivateEventSubscription","summary":"Reactivate a webhook subscription"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Subscription reactivated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_218"}},"schemaId":"schema_218"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires EVNT_SUB)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}~1reactivate/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_218","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_218"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/reactivateeventsubscription"}],"panels":[]}]},"httpPath":"/api/v1/event-subscriptions/{id}/reactivate"},{"label":"Retrieve webhook delivery attempts for a subscription","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/getwebhookdeliveryhistory","routeSlug":"/bundle/event-subscriptions/getwebhookdeliveryhistory","metadata":{"seo":{"title":"Retrieve webhook delivery attempts for a subscription","description":"Retrieve webhook delivery attempts for a subscription"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getWebhookDeliveryHistory","name":"Retrieve webhook delivery attempts for a subscription","isWebhook":false,"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}~1deliveries/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve webhook delivery attempts for a subscription","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve webhook delivery attempts for a subscription"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns a paginated list of delivery attempts for webhook events for the given subscription."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supports filtering by HTTP status code and time range."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook troubleshooting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Delivery monitoring"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Operational auditing"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/event-subscriptions/{id}/deliveries","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/event-subscriptions/{id}/deliveries","href":"event-subscriptions/getwebhookdeliveryhistory","openApiOperationId":"getWebhookDeliveryHistory","summary":"Retrieve webhook delivery attempts for a subscription"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Delivery history retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires EVNT_SUB)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1event-subscriptions~1{id}~1deliveries/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/getwebhookdeliveryhistory"}],"panels":[]}]},"httpPath":"/api/v1/event-subscriptions/{id}/deliveries"},{"label":"Get webhook signing secret","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/getsubscriptionsecret","routeSlug":"/bundle/event-subscriptions/getsubscriptionsecret","metadata":{"seo":{"title":"Get webhook signing secret","description":"Get the webhook signing secret"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getSubscriptionSecret","name":"Get webhook signing secret","isWebhook":false,"pointer":"/paths/~1api~1v1~1event-subscriptions~1webhook~1secret/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get webhook signing secret","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get the webhook signing secret"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieves the secret used to sign webhook payloads."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use this secret to verify webhook authenticity on your server."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook signature verification"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Security setup"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/event-subscriptions/webhook/secret","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","404","500"],"pointer":"/api/v1/event-subscriptions/webhook/secret","href":"event-subscriptions/getsubscriptionsecret","openApiOperationId":"getSubscriptionSecret","summary":"Get webhook signing secret"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Event Subscriptions retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}},"schemaId":"schema_157"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires ROLE_API_ADMIN)"},"children":[]}]}]}]},{"code":"404","description":"Event Subscriptions not found"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1event-subscriptions~1webhook~1secret/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_157","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"404"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/getsubscriptionsecret"}],"panels":[]}]},"httpPath":"/api/v1/event-subscriptions/webhook/secret"},{"label":"Generate a test webhook payload and signature","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/generatewebhooktestpayload","routeSlug":"/bundle/event-subscriptions/generatewebhooktestpayload","metadata":{"seo":{"title":"Generate a test webhook payload and signature","description":"Generate a signed test webhook payload"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"generateWebhookTestPayload","name":"Generate a test webhook payload and signature","isWebhook":false,"pointer":"/paths/~1api~1v1~1webhook~1test~1generate/post","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Generate a test webhook payload and signature","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Generate a signed test webhook payload"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Generates a signature for an arbitrary JSON payload using the provided secret."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is intended for debugging webhook integrations."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook troubleshooting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Signature validation testing"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/webhook/test/generate' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/webhook/test/generate' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/webhook/test/generate","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/webhook/test/generate","href":"event-subscriptions/generatewebhooktestpayload","openApiOperationId":"generateWebhookTestPayload","summary":"Generate a test webhook payload and signature"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Generated payload and signature","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_219"}},"schemaId":"schema_219"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1webhook~1test~1generate/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_219","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_219"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/generatewebhooktestpayload"}],"panels":[]}]},"httpPath":"/api/v1/webhook/test/generate"},{"label":"Validate a webhook signature","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/event-subscriptions/validatewebhooktestsignature","routeSlug":"/bundle/event-subscriptions/validatewebhooktestsignature","metadata":{"seo":{"title":"Validate a webhook signature","description":"Validate a webhook signature"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"validateWebhookTestSignature","name":"Validate a webhook signature","isWebhook":false,"pointer":"/paths/~1api~1v1~1webhook~1test~1validate/post","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Validate a webhook signature","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validate a webhook signature"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Verifies that the provided signature matches the payload and secret."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is intended for debugging webhook integrations."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook troubleshooting"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Signature validation testing"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Real Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl --location 'https://{{host}}/api/v1/webhook/test/validate' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl --location 'https://{{host}}/api/v1/webhook/test/validate' \\\n--header 'Authorization: bearer {{token}}' \\\n--header 'Content-Type: application/json' \\\n"},"children":[]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v1/webhook/test/validate","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/webhook/test/validate","href":"event-subscriptions/validatewebhooktestsignature","openApiOperationId":"validateWebhookTestSignature","summary":"Validate a webhook signature"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Validation result","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}},"schemaId":"schema_157"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":"Forbidden - Insufficient permissions"},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1webhook~1test~1validate/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_157","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_157"}}},{"code":"400"},{"code":"401"},{"code":"403"},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/event-subscriptions/validatewebhooktestsignature"}],"panels":[]}]},"httpPath":"/api/v1/webhook/test/validate"}],"content":{"contentType":"group","meta":{"name":"Event Subscriptions"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"🔔 Event Subscriptions","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage webhook subscriptions for entity events."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Event Subscriptions API provides:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook Management"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Create, update, and deactivate webhook subscriptions"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Event Filtering"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Subscribe to specific entity types and operations (CREATE, UPDATE, DELETE)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Security"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Retrieve webhook signing secrets for payload verification"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/v1/event-subscriptions/catalog","summary":"Get available event types catalog","prefix":{"name":"get","color":"get"},"badges":[],"link":"/event-subscriptions/geteventsettingscatalog","deprecated":false},{"title":"/api/v1/event-subscriptions","summary":"Create a webhook subscription","prefix":{"name":"post","color":"post"},"badges":[],"link":"/event-subscriptions/createeventsubscription","deprecated":false},{"title":"/api/v1/event-subscriptions/{id}","summary":"Update a webhook subscription","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/event-subscriptions/updateeventsubscription","deprecated":false},{"title":"/api/v1/event-subscriptions/{id}","summary":"Deactivate a webhook subscription","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/event-subscriptions/deactivateeventsubscription","deprecated":false},{"title":"/api/v1/event-subscriptions/{id}/reactivate","summary":"Reactivate a webhook subscription","prefix":{"name":"post","color":"post"},"badges":[],"link":"/event-subscriptions/reactivateeventsubscription","deprecated":false},{"title":"/api/v1/event-subscriptions/{id}/deliveries","summary":"Retrieve webhook delivery attempts for a subscription","prefix":{"name":"get","color":"get"},"badges":[],"link":"/event-subscriptions/getwebhookdeliveryhistory","deprecated":false},{"title":"/api/v1/event-subscriptions/webhook/secret","summary":"Get webhook signing secret","prefix":{"name":"get","color":"get"},"badges":[],"link":"/event-subscriptions/getsubscriptionsecret","deprecated":false},{"title":"/api/v1/webhook/test/generate","summary":"Generate a test webhook payload and signature","prefix":{"name":"post","color":"post"},"badges":[],"link":"/event-subscriptions/generatewebhooktestpayload","deprecated":false},{"title":"/api/v1/webhook/test/validate","summary":"Validate a webhook signature","prefix":{"name":"post","color":"post"},"badges":[],"link":"/event-subscriptions/validatewebhooktestsignature","deprecated":false}]}]}]}]}},{"type":"group","label":"📁 File","link":"/bundle/file","routeSlug":"/bundle/file","items":[{"label":"List files with filters and cursor pagination","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/file/listfiles","routeSlug":"/bundle/file/listfiles","metadata":{"seo":{"title":"List files with filters and cursor pagination","description":"Retrieve a paginated list of files scoped to the tenant"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listFiles","name":"List files with filters and cursor pagination","isWebhook":false,"pointer":"/paths/~1api~1v1~1files/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List files with filters and cursor pagination","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a paginated list of files scoped to the tenant"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns files across whitelisted sources: CLIENT_REQUEST, DELIVERABLE, REFERENCE_FILE, DMS_DIRECT_UPLOAD."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optional Filters:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"createdAfter"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (ISO-8601) — only files created strictly after this timestamp"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"createdBefore"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (ISO-8601) — only files created strictly before this timestamp"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"clientId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — filter by numeric client ID"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — filter by project/job ID"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ids"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — filter by one or more specific file IDs (multi-value: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"?ids=1&ids=2"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Pagination:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Results ordered by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_at ASC, id ASC"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Pass "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"next_cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" from a previous response as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to fetch the next page"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pageSize"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" defaults to 20, max 100"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response per item:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"File metadata (id, name, created_at, size_bytes, path as slash-joined folder names)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"download_url"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — time-limited direct-link URL; only populated when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"includeDownloadUrl=true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and the file has a DMS path or external ID. Omit this flag for metadata-only queries (pagination, search) to avoid unnecessary URL minting on every page."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"context"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — client, project, and uploader fields"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Invalid date formats return 400."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve all files associated with a client or project"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Paginate through large file sets using cursor pagination"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Filter files by upload date range"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Fetch specific files by ID"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/files","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/files","href":"file/listfiles","openApiOperationId":"listFiles","summary":"List files with filters and cursor pagination"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Files retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires API_ADMIN)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1files/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/file/listfiles"}],"panels":[]}]},"httpPath":"/api/v1/files"},{"label":"Get file metadata by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/bundle/file/getfilebyid","routeSlug":"/bundle/file/getfilebyid","metadata":{"seo":{"title":"Get file metadata by ID","description":"Retrieve file metadata by Aiwyn ID"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getFileById","name":"Get file metadata by ID","isWebhook":false,"pointer":"/paths/~1api~1v1~1files~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get file metadata by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve file metadata by Aiwyn ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns file metadata including filename, source type, status, and optional download URL."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Query Parameters:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"includeDownloadUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (optional, default: false) - When true, generates a time-limited signed download URL"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response includes:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"File metadata (id, filename, fileSource, fileStatus, active, timestamps)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"FileInfo metadata (size, creator information) if available"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Signed download URL (only when includeDownloadUrl=true and file has GCS path)"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Download URLs are time-limited (15 minutes) and should be used promptly."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Business Applications:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve file metadata for display"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Generate download URLs for file access"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Verify file existence and status"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuth","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/v1/files/{id}","servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","500"],"pointer":"/api/v1/files/{id}","href":"file/getfilebyid","openApiOperationId":"getFileById","summary":"Get file metadata by ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/bundle","description":"Mock server","isMockServer":true},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"File retrieved successfully"},{"code":"400","description":"Invalid input data"},{"code":"401","description":"Unauthorized - Invalid or missing authentication token"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Forbidden - Insufficient permissions (requires API_ADMIN)"},"children":[]}]}]}]},{"code":"500","description":"Internal server error"}],"pointer":"/paths/~1api~1v1~1files~1{id}/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/file/getfilebyid"}],"panels":[]}]},"httpPath":"/api/v1/files/{id}"}],"content":{"contentType":"group","meta":{"name":"File"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"📁 File","showPageActions":true},{"nodeType":"markdoc","content":"Download and access files associated with records and documents."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/v1/files","summary":"List files with filters and cursor pagination","prefix":{"name":"get","color":"get"},"badges":[],"link":"/file/listfiles","deprecated":false},{"title":"/api/v1/files/{id}","summary":"Get file metadata by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/file/getfilebyid","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/Error":{"id":"components/schemas/Error","kind":"json-schema","title":"Error","data":{"type":"object","description":"Standard error response format","required":["error","code"],"properties":{"error":{"type":"string","description":"Human-readable error message","example":"Invalid parameter value"},"code":{"type":"string","description":"Machine-readable error code","example":"INVALID_PARAMETER"},"details":{"type":"string","description":"Additional error context","example":"The 'pageSize' parameter must be between 1 and 1000"}}}},"components/schemas/DraftInvoiceHistory":{"id":"components/schemas/DraftInvoiceHistory","kind":"json-schema","title":"DraftInvoiceHistory","data":{"type":"object","description":"Draft invoice history record with client and draft invoice details","properties":{"clientId":{"type":"integer","description":"Client identifier","example":7720},"invoiceId":{"type":"integer","description":"Invoice identifier","example":125890},"jobId":{"type":"integer","description":"Associated job/project identifier","example":2514},"client":{"type":"object","description":"Client summary information","properties":{"active":{"type":"boolean","example":true},"clientRef":{"type":"string","example":"TF-2024-789"},"name":{"type":"string","example":"TechFlow Enterprises"},"pmsRef":{"type":"string","example":"240815"}}},"draftInvoice":{"type":"object","description":"Draft invoice metadata","properties":{"approvedAt":{"type":"string","format":"date-time","example":"2024-03-15T14:32:18+00:00"},"arTranId":{"type":"integer","example":125890},"approverStaffId":{"type":"integer","example":301},"approvedByStaffId":{"type":"integer","example":301},"invoiceId":{"type":"integer","example":125890},"isActive":{"type":"boolean","example":true},"pms_invoice_number":{"type":"string","example":"INV-2024-4850"},"status":{"type":"string","example":"APPROVED"}}}}}},"components/schemas/DraftInvoiceHistoryListResponse":{"id":"components/schemas/DraftInvoiceHistoryListResponse","kind":"json-schema","title":"DraftInvoiceHistoryListResponse","data":{"type":"object","description":"Standard response format for draft invoice history endpoints","properties":{"draftInvoices":{"type":"array","items":{"$ref":"#/components/schemas/DraftInvoiceHistory"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of draft invoice history records matching criteria","example":94}}}}}}}},"components/schemas/StaffMember":{"id":"components/schemas/StaffMember","kind":"json-schema","title":"StaffMember","data":{"type":"object","description":"Staff member basic information","properties":{"id":{"type":"integer","example":53},"firstName":{"type":"string","example":"Allen"},"lastName":{"type":"string","example":"Hermiston"},"email":{"type":"string","format":"email","example":"allen.hermiston@company.com"}}}},"components/schemas/ClientGroup":{"id":"components/schemas/ClientGroup","kind":"json-schema","title":"ClientGroup","data":{"type":"object","description":"Client group record with assigned staff and office information","properties":{"id":{"type":"integer","description":"Unique client group identifier","example":10},"name":{"type":"string","description":"Client group name","example":"Acme Corp Group"},"pmsRef":{"type":"string","description":"Practice Management System reference","example":"GRP-001"},"parentClientId":{"type":"integer","nullable":true,"description":"ID of the parent client, if any","example":null},"primaryContactId":{"type":"integer","nullable":true,"description":"ID of the primary contact","example":201},"billingContactId":{"type":"integer","nullable":true,"description":"ID of the billing contact","example":202},"partnerStaffId":{"type":"integer","nullable":true,"description":"ID of the assigned partner staff member","example":101},"managerStaffId":{"type":"integer","nullable":true,"description":"ID of the assigned manager staff member","example":102},"officeId":{"type":"integer","nullable":true,"description":"ID of the associated office","example":5},"active":{"type":"boolean","description":"Whether the client group is active","example":true},"isManagedByAiwyn":{"type":"boolean","description":"Whether the client group is managed by Aiwyn","example":false},"createdAt":{"type":"string","format":"date-time","description":"Record creation timestamp","example":"2024-01-15T10:00:00.000000+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Last modification timestamp","example":"2024-06-20T14:30:00.000000+00:00"},"version":{"type":"integer","description":"Record version number","example":3},"partnerStaff":{"$ref":"#/components/schemas/StaffMember"},"managerStaff":{"$ref":"#/components/schemas/StaffMember"},"office":{"type":"object","nullable":true,"description":"Associated office","properties":{"id":{"type":"integer","example":5},"pmsRef":{"type":"string","example":"OFF-5"},"name":{"type":"string","example":"San Francisco"}}}}}},"components/schemas/ClientContactInfo":{"id":"components/schemas/ClientContactInfo","kind":"json-schema","title":"ClientContactInfo","data":{"type":"object","description":"Client contact information details","properties":{"id":{"type":"integer","example":9957},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"Doe"},"email":{"type":"string","format":"email","example":"loree.kling@yahoo.com"},"phone":{"type":"string","example":"1-555-123-4567"},"address":{"type":"string","example":"123 Main Street"},"city":{"type":"string","example":"Anytown"},"state":{"type":"string","example":"CA"},"zip_code":{"type":"string","example":"12345"}}}},"components/schemas/Client":{"id":"components/schemas/Client","kind":"json-schema","title":"Client","data":{"type":"object","description":"Complete client record with all associated data","properties":{"id":{"type":"integer","description":"Unique client identifier","example":2180},"pmsRef":{"type":"string","description":"Practice Management System reference","example":"1155"},"clientRef":{"type":"string","description":"External client reference number","example":"41664"},"name":{"type":"string","description":"Client full name or company name","example":"Aaron Fahey"},"clientKey":{"type":"string","description":"Formatted client key with padding","example":"000000041664                              f"},"active":{"type":"boolean","description":"Client active status","example":true},"partnerStaffId":{"type":"integer","description":"ID of assigned partner staff member","example":53},"managerStaffId":{"type":"integer","description":"ID of assigned manager staff member","example":19},"createdAt":{"type":"string","format":"date-time","description":"Client record creation timestamp","example":"2023-05-12T22:43:55.488054+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Last modification timestamp","example":"2023-06-09T21:34:28.817274+00:00"},"clientContactInfo":{"$ref":"#/components/schemas/ClientContactInfo"},"partnerStaff":{"$ref":"#/components/schemas/StaffMember"},"managerStaff":{"$ref":"#/components/schemas/StaffMember"}}}},"components/schemas/ClientWithNumber":{"id":"components/schemas/ClientWithNumber","kind":"json-schema","title":"ClientWithNumber","data":{"type":"object","description":"Client details with number field","properties":{"id":{"type":"integer","example":420},"name":{"type":"string","example":"TechFlow Enterprises"},"number":{"type":"string","example":"52150"}}}},"components/schemas/Engagement":{"id":"components/schemas/Engagement","kind":"json-schema","title":"Engagement","data":{"type":"object","description":"Project engagement record with staff assignments","properties":{"id":{"type":"integer","description":"Unique engagement identifier","example":8},"name":{"type":"string","description":"Generated engagement name from template","example":"2024 Annual Review and Tax 52150"},"start_dt":{"type":"string","format":"date","description":"Engagement start date","example":"2024-03-15"},"end_dt":{"type":"string","format":"date","description":"Engagement end date","example":"2024-04-30"},"status":{"type":"string","description":"Current engagement status","example":"EXECUTED"},"client_id":{"type":"integer","description":"Associated client identifier","example":420},"partner_staff_id":{"type":"integer","description":"Partner staff member assigned to engagement","example":53},"manager_staff_id":{"type":"integer","description":"Manager staff member assigned to engagement","example":15},"created_at":{"type":"string","format":"date-time","description":"Engagement record creation timestamp","example":"2024-03-14T10:58:38.605333+00:00"},"updated_at":{"type":"string","format":"date-time","description":"Engagement record last update timestamp","example":"2024-07-27T00:08:05.822177+00:00"},"engagement_name_template":{"type":"string","description":"Template used to generate engagement name","example":"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}"},"client":{"$ref":"#/components/schemas/ClientWithNumber"},"partnerStaff":{"$ref":"#/components/schemas/StaffMember"},"managerStaff":{"$ref":"#/components/schemas/StaffMember"}}}},"components/schemas/Department":{"id":"components/schemas/Department","kind":"json-schema","title":"Department","data":{"type":"object","description":"Department information","properties":{"id":{"type":"integer","example":7},"name":{"type":"string","example":"Technology"}}}},"components/schemas/StaffType":{"id":"components/schemas/StaffType","kind":"json-schema","title":"StaffType","data":{"type":"object","description":"Staff type classification details","properties":{"id":{"type":"integer","example":11},"description":{"type":"string","example":"Senior Associate"}}}},"components/schemas/ClientBasic":{"id":"components/schemas/ClientBasic","kind":"json-schema","title":"ClientBasic","data":{"type":"object","description":"Basic client information for relationships","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"TechFlow Enterprises"}}}},"components/schemas/CreditLabel":{"id":"components/schemas/CreditLabel","kind":"json-schema","title":"CreditLabel","data":{"type":"object","description":"Credit label details for categorization","properties":{"id":{"type":"integer","example":3},"name":{"type":"string","example":"Service Credit"},"description":{"type":"string","example":"Credit for service issues or complaints"}}}},"components/schemas/DebitLabel":{"id":"components/schemas/DebitLabel","kind":"json-schema","title":"DebitLabel","data":{"type":"object","description":"Debit label details for categorization","properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"Late Fee"},"description":{"type":"string","example":"Late payment penalty charge"},"is_active":{"type":"boolean","example":true}}}},"components/schemas/ARTransactionBasic":{"id":"components/schemas/ARTransactionBasic","kind":"json-schema","title":"ARTransactionBasic","data":{"type":"object","description":"Basic AR transaction details for invoice relationships","properties":{"id":{"type":"integer","example":125890},"pmsRef":{"type":"string","description":"Practice management system reference","example":"240815"},"transactionDate":{"type":"string","format":"date-time","description":"Transaction date","example":"2024-03-22T05:00:00"},"amount":{"type":"number","format":"decimal","description":"Transaction amount","example":4250},"allocated":{"type":"number","format":"decimal","description":"Allocated amount","example":4250},"clientId":{"type":"integer","description":"Client identifier","example":7720},"client":{"$ref":"#/components/schemas/ClientBasic"}}}},"components/schemas/ClientWithRef":{"id":"components/schemas/ClientWithRef","kind":"json-schema","title":"ClientWithRef","data":{"type":"object","description":"Client information with reference number","properties":{"id":{"type":"integer","example":789},"name":{"type":"string","example":"TechFlow Enterprises"},"clientRef":{"type":"string","example":"TF-2024-789"}}}},"components/schemas/Job":{"id":"components/schemas/Job","kind":"json-schema","title":"Job","data":{"type":"object","description":"Job information for WIP tracking","properties":{"id":{"type":"integer","example":2514},"name":{"type":"string","example":"Q1 Financial Review 2024"}}}},"components/schemas/PaginationRequest":{"id":"components/schemas/PaginationRequest","kind":"json-schema","title":"PaginationRequest","data":{"type":"object","description":"Standard pagination parameters","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Number of records to skip for pagination navigation","example":0}}}},"components/schemas/AggregateCount":{"id":"components/schemas/AggregateCount","kind":"json-schema","title":"AggregateCount","data":{"type":"object","description":"Standard count aggregation","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of records matching criteria","example":13697}}}}}},"components/schemas/ARTransaction":{"id":"components/schemas/ARTransaction","kind":"json-schema","title":"ARTransaction","data":{"type":"object","description":"Accounts receivable transaction record","properties":{"id":{"type":"integer","description":"Unique transaction identifier","example":125001},"pmsRef":{"type":"string","description":"Practice management system reference number","example":"240815"},"type":{"type":"string","description":"Transaction type classification","example":"Receipt"},"transactionDate":{"type":"string","format":"date-time","description":"Date when transaction occurred","example":"2024-02-15T05:00:00"},"amount":{"type":"number","format":"decimal","description":"Transaction amount (negative for receipts/credits)","example":-1250},"allocated":{"type":"number","format":"decimal","description":"Amount allocated/applied to invoices","example":-1250},"notes":{"type":"string","description":"Additional transaction notes or comments","example":null},"clientId":{"type":"integer","description":"Associated client identifier","example":1},"createdAt":{"type":"string","format":"date-time","description":"Record creation timestamp","example":"2024-05-12T22:50:18.418236+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Record last update timestamp","example":"2024-05-12T22:50:18.418236+00:00"},"client":{"$ref":"#/components/schemas/ClientBasic"}}}},"components/schemas/AggregateCountSum":{"id":"components/schemas/AggregateCountSum","kind":"json-schema","title":"AggregateCountSum","data":{"type":"object","description":"Count and sum aggregation for financial data","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of records matching criteria","example":48},"sum":{"type":"object","properties":{"amount":{"type":"number","format":"decimal","description":"Sum of amounts","example":-52750},"allocated":{"type":"number","format":"decimal","description":"Sum of allocated amounts","example":-52750}}}}}}}},"components/schemas/Credit":{"id":"components/schemas/Credit","kind":"json-schema","title":"Credit","data":{"type":"object","description":"Credit entry with categorization","properties":{"ar_tran_id":{"type":"integer","description":"Associated AR transaction identifier","example":125890},"is_partial":{"type":"boolean","description":"Whether this is a partial credit (true) or full credit (false)","example":false},"credit_label_id":{"type":"integer","description":"Reference to credit categorization label","example":3},"created_at":{"type":"string","format":"date-time","description":"Credit record creation timestamp","example":"2024-05-12T22:50:21.31979+00:00"},"updated_at":{"type":"string","format":"date-time","description":"Credit record last update timestamp","example":"2024-05-12T22:50:21.31979+00:00"},"creditLabel":{"$ref":"#/components/schemas/CreditLabel"}}}},"components/schemas/Debit":{"id":"components/schemas/Debit","kind":"json-schema","title":"Debit","data":{"type":"object","description":"Debit entry with categorization and staff tracking","properties":{"ar_tran_id":{"type":"integer","description":"Associated AR transaction identifier","example":125890},"debit_label_id":{"type":"integer","description":"Reference to debit categorization label","example":2},"created_at":{"type":"string","format":"date-time","description":"Debit record creation timestamp","example":"2024-05-12T22:50:21.31979+00:00"},"updated_at":{"type":"string","format":"date-time","description":"Debit record last update timestamp","example":"2024-05-12T22:50:21.31979+00:00"},"created_by_staff_id":{"type":"integer","description":"ID of staff member who created the debit","example":15},"last_updated_by_staff_id":{"type":"integer","description":"ID of staff member who last updated the debit","example":15},"custom_field_values":{"type":"object","description":"Additional custom field data in JSON format","example":{"reason":"Late payment fee","approved_by":"manager"}},"debitLabel":{"$ref":"#/components/schemas/DebitLabel"},"createdByStaff":{"$ref":"#/components/schemas/StaffMember"},"lastUpdatedByStaff":{"$ref":"#/components/schemas/StaffMember"}}}},"components/schemas/Invoice":{"id":"components/schemas/Invoice","kind":"json-schema","title":"Invoice","data":{"type":"object","description":"Invoice record with AR transaction details","properties":{"arTranId":{"type":"integer","description":"Associated AR transaction identifier","example":125890},"invoiceNumber":{"type":"string","description":"Unique invoice number for client reference","example":"INV-2024-4850"},"dueDate":{"type":"string","format":"date-time","description":"Invoice payment due date","example":"2024-04-24T05:00:00"},"status":{"type":"string","description":"Current invoice status","example":"POSTED"},"tax":{"type":"number","format":"decimal","description":"Tax amount charged on invoice","example":0},"interest":{"type":"number","format":"decimal","description":"Interest charges applied to invoice","example":0},"description":{"type":"string","description":"Additional invoice description or notes","example":null},"createdAt":{"type":"string","format":"date-time","description":"Invoice record creation timestamp","example":"2024-05-12T22:50:20.595961+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Invoice record last update timestamp","example":"2024-05-12T22:50:20.595961+00:00"},"ar_tran":{"$ref":"#/components/schemas/ARTransactionBasic"}}}},"components/schemas/Payment":{"id":"components/schemas/Payment","kind":"json-schema","title":"Payment","data":{"type":"object","description":"Payment record with security compliance","properties":{"id":{"type":"integer","description":"Unique payment identifier","example":45201},"arTranId":{"type":"integer","description":"Associated AR transaction identifier","example":125890},"paymentMethod":{"type":"string","description":"Payment method type","example":"CREDIT_CARD"},"amount":{"type":"number","format":"decimal","description":"Payment amount","example":2750},"paymentDate":{"type":"string","format":"date-time","description":"Date when payment was processed","example":"2024-03-15T14:30:22+00:00"},"confirmationDate":{"type":"string","format":"date-time","description":"Date when payment was confirmed","example":"2024-03-15T14:32:18+00:00"},"status":{"type":"string","description":"Current payment status","example":"CONFIRMED"},"processorId":{"type":"string","description":"Payment processor identifier","example":"stripe"},"processorReferenceId":{"type":"string","description":"Payment processor transaction reference","example":"pi_3N1K2mL4uZ5v6w7x8y9z0a1b"},"last4Digits":{"type":"string","description":"Last 4 digits of card (PCI compliant)","example":"4242"},"cardType":{"type":"string","description":"Credit card type","example":"VISA"},"currency":{"type":"string","description":"Payment currency code","example":"USD"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"createdAt":{"type":"string","format":"date-time","description":"Payment record creation timestamp","example":"2024-03-15T14:30:22.123456+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Payment record last update timestamp","example":"2024-03-15T14:32:18.789012+00:00"},"client":{"$ref":"#/components/schemas/ClientWithRef"},"ar_tran":{"$ref":"#/components/schemas/ARTransactionBasic"}}}},"components/schemas/StaffComplete":{"id":"components/schemas/StaffComplete","kind":"json-schema","title":"StaffComplete","data":{"type":"object","description":"Complete staff record with department and type information","properties":{"id":{"type":"integer","description":"Unique staff identifier","example":301},"pmsRef":{"type":"string","description":"Practice management system reference","example":"2650"},"staffRef":{"type":"string","description":"Staff reference code or initials","example":"JDM"},"firstName":{"type":"string","description":"Employee first name","example":"Sarah"},"lastName":{"type":"string","description":"Employee last name","example":"Johnson"},"email":{"type":"string","description":"Employee email address","example":"sarah.johnson@company.com"},"active":{"type":"boolean","description":"Employee active status","example":true},"deptId":{"type":"integer","description":"Department identifier","example":7},"staffTypeId":{"type":"integer","description":"Staff type classification identifier","example":11},"createdAt":{"type":"string","format":"date-time","description":"Staff record creation timestamp","example":"2024-05-12T22:42:02.719873+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Staff record last update timestamp","example":"2024-05-12T22:42:05.487898+00:00"},"department":{"$ref":"#/components/schemas/Department"},"staff_type":{"$ref":"#/components/schemas/StaffType"}}}},"components/schemas/WIP":{"id":"components/schemas/WIP","kind":"json-schema","title":"WIP","data":{"type":"object","description":"Work in Progress record with financial tracking","properties":{"id":{"type":"integer","description":"Unique WIP record identifier","example":850321},"pmsRef":{"type":"string","description":"Practice management system reference","example":"1789456"},"wipType":{"type":"string","description":"Type of WIP entry","example":"Time"},"loggedDate":{"type":"string","format":"date-time","description":"Date when WIP was logged","example":"2024-01-17T05:00:00"},"wipValue":{"type":"number","format":"decimal","description":"Original WIP value recorded","example":1250},"wipValueOutstanding":{"type":"number","format":"decimal","description":"Outstanding WIP value yet to be billed","example":0},"billedAmount":{"type":"number","format":"decimal","description":"Amount that has been billed from this WIP","example":1225},"writeOffAmount":{"type":"number","format":"decimal","description":"Amount written off as uncollectible","example":25},"notes":{"type":"string","description":"Additional notes or description for the WIP entry","example":"Consultation and analysis for Q1 financial review"},"clientId":{"type":"integer","description":"Associated client identifier","example":1561},"jobId":{"type":"integer","description":"Associated job identifier","example":2514},"createdAt":{"type":"string","format":"date-time","description":"WIP record creation timestamp","example":"2024-05-12T23:02:33.24516+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"WIP record last update timestamp","example":"2024-05-12T23:02:33.24516+00:00"},"client":{"$ref":"#/components/schemas/ClientBasic"},"job":{"$ref":"#/components/schemas/Job"}}}},"components/schemas/WIPAggregate":{"id":"components/schemas/WIPAggregate","kind":"json-schema","title":"WIPAggregate","data":{"type":"object","description":"WIP-specific aggregation with financial summaries","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of WIP records","example":84},"sum":{"type":"object","properties":{"wipValue":{"type":"number","format":"decimal","description":"Total WIP value","example":24186.15},"billedAmount":{"type":"number","format":"decimal","description":"Total billed amount","example":19612.07},"wipValueOutstanding":{"type":"number","format":"decimal","description":"Total outstanding WIP value","example":125}}}}}}}},"components/schemas/Contact":{"id":"components/schemas/Contact","kind":"json-schema","title":"Contact","data":{"type":"object","description":"Contact record with contact info and client relationships","properties":{"id":{"type":"integer","example":1001},"pms_ref":{"type":"string","example":"C-4451"},"active":{"type":"boolean","example":true},"contact_info_id":{"type":"integer","example":7001},"office_id":{"type":"integer","example":3},"staff_id":{"type":"integer","example":53},"type":{"type":"string","example":"Billing"},"fwd_email_confirmation":{"type":"boolean","example":false},"contact_info":{"$ref":"#/components/schemas/ClientContactInfo"},"contact_clients":{"type":"array","description":"Relationships linking this contact to clients","items":{"type":"object","properties":{"client_id":{"type":"integer","example":2180},"contact_id":{"type":"integer","example":1001},"pms_ref":{"type":"string","example":"LL-9981"},"active":{"type":"boolean","example":true},"client":{"type":"object","properties":{"id":{"type":"integer","example":2180},"name":{"type":"string","example":"TechFlow Enterprises"},"clientRef":{"type":"string","example":"TF-2024-789"},"active":{"type":"boolean","example":true}}}}}}}}},"components/schemas/Project":{"id":"components/schemas/Project","kind":"json-schema","title":"Project","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project record from vw_job with status, client and staff references"},"children":[]}]}]}],"properties":{"id":{"type":"integer","example":5012},"name":{"type":"string","example":"Q1 Financial Review 2024"},"startDate":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"targetEndDate":{"type":"string","format":"date-time","example":"2024-03-31T23:59:59Z"},"dueDate":{"type":"string","format":"date-time","example":"2024-03-15T00:00:00Z"},"targetStartDate":{"type":"string","format":"date-time","example":"2023-12-01T00:00:00Z"},"pmsRef":{"type":"string","example":"JOB-2024-115"},"isCreatedByAiwyn":{"type":"boolean","example":true},"managerStaffId":{"type":"integer","example":102},"partnerStaffId":{"type":"integer","example":101},"status":{"type":"string","example":"ACTIVE"},"updatedAt":{"type":"string","format":"date-time","example":"2024-05-20T12:34:56.123456+00:00"},"sysRefs":{"type":"object"},"jobStatus":{"type":"object","properties":{"id":{"type":"integer","example":4},"name":{"type":"string","example":"In Progress"},"state":{"type":"string","example":"ACTIVE"}}},"client":{"type":"object","properties":{"id":{"type":"integer","example":2180},"name":{"type":"string","example":"TechFlow Enterprises"},"clientRef":{"type":"string","example":"TF-2024-789"},"clientGroup":{"type":"object","properties":{"id":{"type":"integer","example":12},"name":{"type":"string","example":"Enterprise"}}}}},"managerStaff":{"$ref":"#/components/schemas/StaffMember"},"partnerStaff":{"$ref":"#/components/schemas/StaffMember"}}}},"components/schemas/StaffUserTask":{"id":"components/schemas/StaffUserTask","kind":"json-schema","title":"StaffUserTask","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Staff user task from vw_my_task with task type and job info"},"children":[]}]}]}],"properties":{"id":{"type":"integer","example":88015},"taskType":{"type":"object","properties":{"code":{"type":"string","example":"BILLABLE"},"id":{"type":"integer","example":12},"display":{"type":"string","example":"Billable Work"},"billable":{"type":"boolean","example":true},"updatedAt":{"type":"string","format":"date-time","example":"2024-05-10T09:10:11.000000+00:00"},"createdAt":{"type":"string","format":"date-time","example":"2023-05-10T09:10:11.000000+00:00"},"isManagedByAiwyn":{"type":"boolean","example":true},"rate_type":{"type":"object","properties":{"id":{"type":"integer","example":3},"name":{"type":"string","example":"Hourly"},"createdAt":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00+00:00"},"updatedAt":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00+00:00"}}},"task_type_category":{"type":"object","properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"Consulting"},"description":{"type":"string","example":"Client-facing consulting tasks"},"associatedTaskTypes":{"type":"array","items":{"type":"integer"},"example":[11,12,13]},"createdAt":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00+00:00"},"updatedAt":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00+00:00"}}},"job_templates":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","example":5}}}}}}},"job":{"type":"object","description":"Project information for the task","properties":{"id":{"type":"integer","example":5012},"name":{"type":"string","example":"Q1 Financial Review 2024"},"client":{"type":"object","properties":{"id":{"type":"integer","example":2180},"name":{"type":"string","example":"TechFlow Enterprises"},"clientRef":{"type":"string","example":"TF-2024-789"}}}}}}}},"components/schemas/FilterRequest":{"id":"components/schemas/FilterRequest","kind":"json-schema","title":"FilterRequest","data":{"allOf":[{"$ref":"#/components/schemas/PaginationRequest"},{"type":"object","properties":{"where":{"type":"object","description":"GraphQL-style boolean expression for filtering","additionalProperties":true,"example":{"_and":[{"active":{"_eq":true}},{"name":{"_ilike":"%searchterm%"}}]}},"orderBy":{"type":"array","description":"Array of sorting criteria","items":{"type":"object","additionalProperties":true},"example":[{"name":"asc"},{"createdAt":"desc"}]}}}]}},"components/schemas/ClientListResponse":{"id":"components/schemas/ClientListResponse","kind":"json-schema","title":"ClientListResponse","data":{"type":"object","description":"Standard response format for client list endpoints","properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"total":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/ARTransactionListResponse":{"id":"components/schemas/ARTransactionListResponse","kind":"json-schema","title":"ARTransactionListResponse","data":{"type":"object","description":"Standard response format for AR transaction endpoints","properties":{"deid_ar_tran":{"type":"array","items":{"$ref":"#/components/schemas/ARTransaction"}},"deid_ar_tran_aggregate":{"$ref":"#/components/schemas/AggregateCountSum"}}}},"components/schemas/CreditListResponse":{"id":"components/schemas/CreditListResponse","kind":"json-schema","title":"CreditListResponse","data":{"type":"object","description":"Standard response format for credit endpoints","properties":{"deid_credit":{"type":"array","items":{"$ref":"#/components/schemas/Credit"}},"deid_credit_aggregate":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/DebitListResponse":{"id":"components/schemas/DebitListResponse","kind":"json-schema","title":"DebitListResponse","data":{"type":"object","description":"Standard response format for debit endpoints","properties":{"deid_debit":{"type":"array","items":{"$ref":"#/components/schemas/Debit"}},"deid_debit_aggregate":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/EngagementListResponse":{"id":"components/schemas/EngagementListResponse","kind":"json-schema","title":"EngagementListResponse","data":{"type":"object","description":"Standard response format for engagement endpoints","properties":{"deid_engagement":{"type":"array","items":{"$ref":"#/components/schemas/Engagement"}},"deid_engagement_aggregate":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/InvoiceListResponse":{"id":"components/schemas/InvoiceListResponse","kind":"json-schema","title":"InvoiceListResponse","data":{"type":"object","description":"Standard response format for invoice endpoints","properties":{"deid_invoice":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"deid_invoice_aggregate":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/PaymentListResponse":{"id":"components/schemas/PaymentListResponse","kind":"json-schema","title":"PaymentListResponse","data":{"type":"object","description":"Standard response format for payment endpoints","properties":{"deid_payment":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"deid_payment_aggregate":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","example":15},"sum":{"type":"object","properties":{"amount":{"type":"number","format":"decimal","description":"Total payment amount","example":28750}}}}}}}}}},"components/schemas/StaffListResponse":{"id":"components/schemas/StaffListResponse","kind":"json-schema","title":"StaffListResponse","data":{"type":"object","description":"Standard response format for staff endpoints","properties":{"deid_staff":{"type":"array","items":{"$ref":"#/components/schemas/StaffComplete"}},"deid_staff_aggregate":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/WIPListResponse":{"id":"components/schemas/WIPListResponse","kind":"json-schema","title":"WIPListResponse","data":{"type":"object","description":"Standard response format for WIP endpoints","properties":{"deid_wip":{"type":"array","items":{"$ref":"#/components/schemas/WIP"}},"deid_wip_aggregate":{"$ref":"#/components/schemas/WIPAggregate"}}}},"components/schemas/TransactionType":{"id":"components/schemas/TransactionType","kind":"json-schema","title":"TransactionType","data":{"type":"string","enum":["Receipt","Invoice","Payment","Credit","Adjustment"],"description":"Available AR transaction types"}},"components/schemas/PaymentMethod":{"id":"components/schemas/PaymentMethod","kind":"json-schema","title":"PaymentMethod","data":{"type":"string","enum":["CREDIT_CARD","DEBIT_CARD","ACH","BANK_TRANSFER","CHECK","WIRE","PAYPAL","APPLE_PAY","GOOGLE_PAY"],"description":"Available payment methods"}},"components/schemas/PaymentStatus":{"id":"components/schemas/PaymentStatus","kind":"json-schema","title":"PaymentStatus","data":{"type":"string","enum":["PENDING","CONFIRMED","FAILED","CANCELLED","REFUNDED"],"description":"Available payment statuses"}},"components/schemas/InvoiceStatus":{"id":"components/schemas/InvoiceStatus","kind":"json-schema","title":"InvoiceStatus","data":{"type":"string","enum":["PENDING","POSTED","PAID","OVERDUE","CANCELLED","DRAFT"],"description":"Available invoice statuses"}},"components/schemas/EngagementStatus":{"id":"components/schemas/EngagementStatus","kind":"json-schema","title":"EngagementStatus","data":{"type":"string","enum":["ACTIVE","COMPLETED","ON_HOLD","EXECUTED","CANCELLED","PLANNED"],"description":"Available engagement statuses"}},"components/schemas/WIPType":{"id":"components/schemas/WIPType","kind":"json-schema","title":"WIPType","data":{"type":"string","enum":["Time","Expense","Fixed_Fee","Disbursement"],"description":"Available WIP types"}},"components/schemas/SortOrder":{"id":"components/schemas/SortOrder","kind":"json-schema","title":"SortOrder","data":{"type":"string","enum":["asc","desc"],"description":"Sort order options"}},"components/schemas/ContactListResponse":{"id":"components/schemas/ContactListResponse","kind":"json-schema","title":"ContactListResponse","data":{"type":"object","description":"Standard response format for contact endpoints","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"total":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/ProjectListResponse":{"id":"components/schemas/ProjectListResponse","kind":"json-schema","title":"ProjectListResponse","data":{"type":"object","description":"Standard response format for project endpoints","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"total":{"$ref":"#/components/schemas/AggregateCount"}}}},"components/schemas/StaffUserTaskListResponse":{"id":"components/schemas/StaffUserTaskListResponse","kind":"json-schema","title":"StaffUserTaskListResponse","data":{"type":"object","description":"Standard response format for staff user task endpoints","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/StaffUserTask"}},"total":{"$ref":"#/components/schemas/AggregateCount"}}}},"schema_110":{"kind":"json-schema","data":{"type":"object","properties":{"jwtApiKey":{"type":"string","description":"JWT API key obtained from Aiwyn Support."}},"required":["jwtApiKey"]},"id":"schema_110"},"schema_111":{"kind":"json-schema","data":{"type":"object","properties":{"token":{"type":"string","description":"Bearer JWT for accessing Product APIs."}}},"id":"schema_111"},"schema_112":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of client records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Number of records to skip for pagination navigation","example":0}}},"id":"schema_112"},"schema_113":{"kind":"json-schema","data":{"type":"object","properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of clients in the system","example":13697}}}}}}},"id":"schema_113"},"schema_114":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1,"description":"Maximum number of filtered clients to return","example":1},"where":{"type":"object","description":"GraphQL-style where clause for complex filtering","example":{"_and":[{"_or":[{"name":{"_ilike":"%tech%"}},{"clientRef":{"_ilike":"%45%"}}]},{"active":{"_eq":true}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"partnerStaffId":{"_in":[5,6,7,8]}}]}},"orderBy":{"type":"array","description":"Dynamic ordering specifications with multiple fields","items":{"type":"object"},"example":[{"name":"asc"},{"createdAt":"desc"}]}}},"id":"schema_114"},"schema_115":{"kind":"json-schema","data":{"type":"object","properties":{"clients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique client identifier","example":3001},"pmsRef":{"type":"string","description":"Practice management system reference","example":"1650"},"clientRef":{"type":"string","description":"Client reference number","example":"48250"},"name":{"type":"string","description":"Client name or company name","example":"TechFlow Enterprises"},"clientKey":{"type":"string","description":"Client key identifier","example":"000000048250                              f"},"active":{"type":"boolean","description":"Client active status","example":true},"partnerStaffId":{"type":"integer","description":"Partner staff member assigned to client","example":6},"managerStaffId":{"type":"integer","description":"Manager staff member assigned to client","example":25},"createdAt":{"type":"string","format":"date-time","description":"Client record creation timestamp","example":"2024-05-12T22:43:57.189235+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Client record last update timestamp","example":"2024-05-12T22:43:57.189235+00:00"},"clientContactInfo":{"type":"object","nullable":true,"description":"Client contact information","properties":{"id":{"type":"integer","example":2850},"firstName":{"type":"string","nullable":true,"example":"Jennifer"},"lastName":{"type":"string","nullable":true,"example":"Martinez"},"email":{"type":"string","nullable":true,"example":"jennifer@techflow.com"},"phone":{"type":"string","nullable":true,"example":"555-0123"},"address":{"type":"string","nullable":true,"example":"123 Business Plaza"},"city":{"type":"string","nullable":true,"example":"San Francisco"},"state":{"type":"string","nullable":true,"example":"CA"},"zip_code":{"type":"string","nullable":true,"example":"94105"}}},"partnerStaff":{"type":"object","description":"Partner staff member details","properties":{"id":{"type":"integer","example":6},"firstName":{"type":"string","example":"Robert"},"lastName":{"type":"string","example":"Chen"},"email":{"type":"string","example":"robert.chen@company.com"}}},"managerStaff":{"type":"object","description":"Manager staff member details","properties":{"id":{"type":"integer","example":25},"firstName":{"type":"string","example":"Sarah"},"lastName":{"type":"string","example":"Johnson"},"email":{"type":"string","example":"sarah.johnson@company.com"}}}}}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of clients matching filter criteria","example":59}}}}}}},"id":"schema_115"},"schema_116":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"id":"schema_116"},"schema_117":{"kind":"json-schema","data":{"type":"integer","minimum":1},"id":"schema_117"},"schema_118":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique client identifier","example":789},"name":{"type":"string","description":"Client name","example":"Acme Corporation"},"legalName":{"type":"string","description":"Legal business name","example":"Acme Corporation, Inc."},"status":{"type":"string","description":"Client status","enum":["ACTIVE","INACTIVE","PROSPECT","FORMER"],"example":"ACTIVE"},"type":{"type":"string","description":"Client type","enum":["CORPORATE","INDIVIDUAL","PARTNERSHIP","LLC","NONPROFIT"],"example":"CORPORATE"},"industry":{"type":"string","description":"Industry classification","enum":["MANUFACTURING","RETAIL","HEALTHCARE","FINANCIAL","TECHNOLOGY","CONSULTING","OTHER"],"example":"MANUFACTURING"},"size":{"type":"string","description":"Company size classification","enum":["SMALL","MEDIUM","LARGE","ENTERPRISE"],"example":"LARGE"},"website":{"type":"string","format":"uri","description":"Company website URL","example":"https://www.acme.com"},"taxId":{"type":"string","description":"Tax identification number","example":"12-3456789"},"phone":{"type":"string","description":"Primary phone number","example":"+1-555-0123"},"email":{"type":"string","format":"email","description":"Primary email address","example":"info@acme.com"},"address":{"type":"object","description":"Primary business address","properties":{"street":{"type":"string","description":"Street address","example":"123 Business Ave"},"city":{"type":"string","description":"City","example":"New York"},"state":{"type":"string","description":"State or province","example":"NY"},"zipCode":{"type":"string","description":"ZIP or postal code","example":"10001"},"country":{"type":"string","description":"Country","example":"USA"}}},"billingAddress":{"type":"object","description":"Billing address (if different from primary)","properties":{"street":{"type":"string","description":"Street address","example":"456 Finance Blvd"},"city":{"type":"string","description":"City","example":"New York"},"state":{"type":"string","description":"State or province","example":"NY"},"zipCode":{"type":"string","description":"ZIP or postal code","example":"10002"},"country":{"type":"string","description":"Country","example":"USA"}}},"primaryContact":{"type":"object","description":"Primary contact information","properties":{"id":{"type":"integer","description":"Contact identifier","example":23456},"name":{"type":"string","description":"Contact name","example":"John Smith"},"title":{"type":"string","description":"Contact title","example":"Chief Financial Officer"},"email":{"type":"string","format":"email","description":"Contact email","example":"john.smith@acme.com"},"phone":{"type":"string","description":"Contact phone","example":"+1-555-0123"}}},"engagements":{"type":"array","description":"Active engagements for this client","items":{"type":"object","properties":{"id":{"type":"integer","description":"Engagement identifier","example":34567},"name":{"type":"string","description":"Engagement name","example":"Annual Audit Engagement 2024"},"status":{"type":"string","description":"Engagement status","enum":["PLANNING","ACTIVE","ON_HOLD","COMPLETED","CANCELLED"],"example":"ACTIVE"},"type":{"type":"string","description":"Engagement type","enum":["AUDIT","REVIEW","COMPILATION","TAX","CONSULTING","ADVISORY"],"example":"AUDIT"},"startDate":{"type":"string","format":"date-time","description":"Engagement start date","example":"2024-01-01T00:00:00Z"},"endDate":{"type":"string","format":"date-time","description":"Engagement end date","example":"2024-12-31T23:59:59Z"}}}},"financialSummary":{"type":"object","description":"Financial summary for this client","properties":{"totalRevenue":{"type":"number","format":"decimal","description":"Total revenue from this client","example":150000},"outstandingBalance":{"type":"number","format":"decimal","description":"Outstanding balance owed","example":25000},"currency":{"type":"string","description":"Currency code","example":"USD"},"lastPaymentDate":{"type":"string","format":"date-time","description":"Date of last payment","example":"2024-11-15T10:30:00Z"}}},"notes":{"type":"string","description":"Additional notes about the client","example":"Long-term client with excellent payment history and strong relationship"},"createdAt":{"type":"string","format":"date-time","description":"Client creation timestamp","example":"2020-01-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-11-20T14:30:00Z"}}},"id":"schema_118"},"schema_119":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Client not found"},"message":{"type":"string","example":"Client with ID 789 does not exist"}}},"id":"schema_119"},"schema_120":{"kind":"json-schema","data":{"type":"object","required":["name","pmsRef","clientRef","officeId"],"properties":{"name":{"type":"string","description":"Client display name","example":"Acme Corporation"},"pmsRef":{"type":"string","description":"Practice management system reference identifier","example":"ACME-001"},"clientRef":{"type":"string","description":"Unique client reference identifier","example":"ACME-001"},"officeId":{"type":"integer","format":"int64","description":"ID of the office this client belongs to","example":1},"description":{"type":"string","nullable":true,"description":"Optional client description","example":"A multinational technology company"},"sortName":{"type":"string","nullable":true,"description":"Alternate name used for alphabetical sorting","example":"Acme"},"notes":{"type":"string","nullable":true,"description":"Internal notes about the client","example":"Preferred billing on the 1st of the month"},"departmentId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the department associated with this client","example":10},"orgId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the organization associated with this client","example":5},"industryId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the industry classification for this client","example":3},"partnerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the partner staff member assigned to this client","example":53},"managerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the manager staff member assigned to this client","example":15},"clientTypeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the client type classification","example":7},"clientBusinessEntityId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the client business entity (entity type)","example":4},"staffBillingManagerId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the staff member acting as billing manager for this client","example":22},"fiscalYearEndMonth":{"type":"integer","format":"int32","nullable":true,"minimum":1,"maximum":12,"description":"Month (1-12) the client's fiscal year ends","example":12},"fiscalYearEndDay":{"type":"integer","format":"int32","nullable":true,"minimum":1,"maximum":31,"description":"Day of month (1-31) the client's fiscal year ends","example":31},"customFieldValuesJson":{"type":"string","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JSON object, encoded as a string, mapping custom field keys to values. Keys not defined in the tenant's CLIENT custom-field schema are ignored and reported back in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"data.ignoredCustomFields"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"{\"industry_niche\":\"Manufacturing\",\"naics_code\":\"333120\"}"},"taxRegionIds":{"type":"array","nullable":true,"description":"IDs of existing tax regions to assign to the new client. Duplicates are de-duplicated; an unknown ID returns 400.\n","items":{"type":"integer","format":"int64"},"example":[3,7]},"ebilling":{"type":"boolean","default":false,"description":"Whether this client is enrolled in electronic billing","example":true},"invoiceDeliveryMethod":{"type":"string","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"How invoices are delivered to the client. Defaults to EMAIL when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ebilling"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is true, otherwise DOWNLOAD."},"children":[]}]}]}],"enum":["EMAIL","DOWNLOAD","EMAIL_AND_DOWNLOAD","POST_ONLY"],"example":"EMAIL"},"emailStatement":{"type":"boolean","default":false,"description":"Whether statements are emailed to the client","example":false},"chargeAdminFee":{"type":"boolean","default":false,"description":"Whether an administrative fee is charged to this client","example":false},"active":{"type":"boolean","default":true,"description":"Whether the client is active","example":true},"address":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The client's own address, stored as the client's contact info record (the portal's \"Address\" section). At least one address field is required; "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is optional and generated as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"AIWYN_<uuid>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when omitted."},"children":[]}]}]}],"properties":{"pmsRef":{"type":"string","nullable":true,"description":"PMS reference for the address record. Must not already exist.","example":"ACME-001-ADDRESS"},"address":{"type":"string","nullable":true,"example":"123 Main St"},"address2":{"type":"string","nullable":true,"example":"Suite 400"},"city":{"type":"string","nullable":true,"example":"Charlotte"},"state":{"type":"string","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"country: US"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" a US state name or abbreviation, stored as the abbreviation. Free text for other countries."},"children":[]}]}]}],"example":"NC"},"country":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 country code; stored upper-case.","example":"US"},"zipCode":{"type":"string","nullable":true,"example":"28202"}}},"billingAddress":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billing address, stored as a client address of type Billing (the portal's \"Billing Address\" section). Same shape and rules as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"address"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"properties":{"pmsRef":{"type":"string","nullable":true,"description":"PMS reference for the billing address record. Must not already exist.","example":"ACME-001-BILLING"},"address":{"type":"string","nullable":true,"example":"PO Box 999"},"address2":{"type":"string","nullable":true,"example":null},"city":{"type":"string","nullable":true,"example":"Raleigh"},"state":{"type":"string","nullable":true,"example":"NC"},"country":{"type":"string","nullable":true,"example":"US"},"zipCode":{"type":"string","nullable":true,"example":"27601"}}},"prefContact":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Preferred contact. Provide either "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (existing contact) or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contactInfo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (create new) — not both. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pmsRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is required when creating a new contact."},"children":[]}]}]}],"properties":{"id":{"type":"integer","format":"int64","nullable":true,"description":"ID of an existing contact to link","example":501},"username":{"type":"string","format":"email","nullable":true,"description":"Email address used as the contact's login username","example":"jane.smith@acme.com"},"pmsRef":{"type":"string","nullable":true,"description":"PMS reference for the contact. Required when creating a new contact.","example":"CONT-001"},"type":{"type":"string","nullable":true,"description":"Contact type classification","example":"PRIMARY"},"staffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the staff member associated with this contact","example":53},"officeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the office associated with this contact","example":1},"contactInfo":{"type":"object","nullable":true,"description":"Full contact details for creating a new contact record","required":["pmsRef"],"properties":{"pmsRef":{"type":"string","description":"PMS reference for the contact info record","example":"CONT-001"},"shortName":{"type":"string","nullable":true,"example":"Jane S."},"firstName":{"type":"string","nullable":true,"example":"Jane"},"lastName":{"type":"string","nullable":true,"example":"Smith"},"jobTitle":{"type":"string","nullable":true,"example":"CFO"},"prefix":{"type":"string","nullable":true,"example":"Ms."},"salutation":{"type":"string","nullable":true,"example":"Dear Jane"},"phone":{"type":"string","nullable":true,"example":"+1-555-0123"},"email":{"type":"string","format":"email","nullable":true,"example":"jane.smith@acme.com"},"address":{"type":"string","nullable":true,"example":"123 Main St"},"address2":{"type":"string","nullable":true,"example":"Suite 400"},"city":{"type":"string","nullable":true,"example":"New York"},"state":{"type":"string","nullable":true,"example":"NY"},"country":{"type":"string","nullable":true,"example":"US"},"zipCode":{"type":"string","nullable":true,"example":"10001"}}}}},"billingContact":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billing contact. Same shape as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"prefContact"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — provide either "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contactInfo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"properties":{"id":{"type":"integer","format":"int64","nullable":true,"example":502},"username":{"type":"string","format":"email","nullable":true,"example":"billing@acme.com"},"pmsRef":{"type":"string","nullable":true,"example":"CONT-002"},"type":{"type":"string","nullable":true,"example":"BILLING"},"staffId":{"type":"integer","format":"int64","nullable":true,"example":null},"officeId":{"type":"integer","format":"int64","nullable":true,"example":1},"contactInfo":{"type":"object","nullable":true,"required":["pmsRef"],"properties":{"pmsRef":{"type":"string","example":"CONT-002"},"shortName":{"type":"string","nullable":true,"example":null},"firstName":{"type":"string","nullable":true,"example":"Bob"},"lastName":{"type":"string","nullable":true,"example":"Finance"},"jobTitle":{"type":"string","nullable":true,"example":"Accounts Payable"},"prefix":{"type":"string","nullable":true,"example":null},"salutation":{"type":"string","nullable":true,"example":null},"phone":{"type":"string","nullable":true,"example":"+1-555-0124"},"email":{"type":"string","format":"email","nullable":true,"example":"billing@acme.com"},"address":{"type":"string","nullable":true,"example":null},"address2":{"type":"string","nullable":true,"example":null},"city":{"type":"string","nullable":true,"example":null},"state":{"type":"string","nullable":true,"example":null},"country":{"type":"string","nullable":true,"example":null},"zipCode":{"type":"string","nullable":true,"example":null}}}}},"secondaryContact":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Secondary contact. Same shape as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"prefContact"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — provide either "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"contactInfo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"properties":{"id":{"type":"integer","format":"int64","nullable":true,"example":503},"username":{"type":"string","format":"email","nullable":true,"example":null},"pmsRef":{"type":"string","nullable":true,"example":null},"type":{"type":"string","nullable":true,"example":null},"staffId":{"type":"integer","format":"int64","nullable":true,"example":null},"officeId":{"type":"integer","format":"int64","nullable":true,"example":null},"contactInfo":{"type":"object","nullable":true,"required":["pmsRef"],"properties":{"pmsRef":{"type":"string","example":"CONT-003"},"firstName":{"type":"string","nullable":true,"example":"Carol"},"lastName":{"type":"string","nullable":true,"example":"Secondary"},"email":{"type":"string","format":"email","nullable":true,"example":"carol@acme.com"}}}}}}},"id":"schema_120"},"schema_121":{"kind":"json-schema","data":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Success message. When custom field keys are dropped, this is suffixed with \"; ignored unknown custom fields: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{keys}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"\"."},"children":[]}]}]}],"example":"Client onboarded successfully"},"data":{"type":"object","properties":{"client":{"type":"object","description":"The newly created client record","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the created client","example":1001},"pmsRef":{"type":"string","example":"ACME-001"},"clientRef":{"type":"string","example":"ACME-001"},"name":{"type":"string","example":"Acme Corporation"},"description":{"type":"string","nullable":true,"example":null},"sortName":{"type":"string","nullable":true,"example":null},"officeId":{"type":"integer","format":"int64","example":1},"departmentId":{"type":"integer","format":"int64","nullable":true,"example":null},"orgId":{"type":"integer","format":"int64","nullable":true,"example":null},"industryId":{"type":"integer","format":"int64","nullable":true,"example":null},"partnerStaffId":{"type":"integer","format":"int64","nullable":true,"example":53},"managerStaffId":{"type":"integer","format":"int64","nullable":true,"example":15},"clientTypeId":{"type":"integer","format":"int64","nullable":true,"example":7},"clientBusinessEntityId":{"type":"integer","format":"int64","nullable":true,"example":4},"staffBillingManagerId":{"type":"integer","format":"int64","nullable":true,"example":22},"fiscalYearEndMonth":{"type":"integer","format":"int32","nullable":true,"example":12},"fiscalYearEndDay":{"type":"integer","format":"int32","nullable":true,"example":31},"customFieldValuesJson":{"type":"string","nullable":true,"description":"JSON object, encoded as a string, of persisted custom field values","example":"{\"industry_niche\":\"Manufacturing\"}"},"active":{"type":"boolean","example":true},"status":{"type":"string","example":"ACTIVE"},"version":{"type":"integer","format":"int64","example":1},"createdAt":{"type":"string","format":"date-time","nullable":true,"example":"2024-03-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","nullable":true,"example":"2024-03-15T10:00:00Z"}}},"prefContactId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the resolved preferred contact","example":601},"billingContactId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the resolved billing contact","example":null},"secondaryContactId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the resolved secondary contact","example":null},"clientContactInfoId":{"type":"integer","format":"int64","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"ID of the contact info record created from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"address"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"; null when no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"address"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" was supplied"},"children":[]}]}]}],"example":44489},"billingAddressId":{"type":"integer","format":"int64","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"ID of the Billing client address created from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingAddress"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"; null when no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"billingAddress"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" was supplied"},"children":[]}]}]}],"example":211},"taxRegionIds":{"type":"array","description":"IDs of the tax regions assigned to the client during onboarding","items":{"type":"integer","format":"int64"},"example":[3,7]},"ignoredCustomFields":{"type":"array","description":"Custom field keys that were provided but ignored because they are not defined in the tenant's CLIENT custom-field schema\n","items":{"type":"string"},"example":[]}}}}},"id":"schema_121"},"schema_122":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of records to return"},"page":{"type":"integer","minimum":0,"default":0,"description":"Number of records to skip (offset)"}}},"id":"schema_122"},"schema_123":{"kind":"json-schema","data":{"type":"object","properties":{"clientTypes":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_123"},"schema_124":{"kind":"json-schema","data":{"type":"object","properties":{"taxRegions":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_124"},"schema_125":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of client group records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Number of records to skip for pagination navigation","example":0}}},"id":"schema_125"},"schema_126":{"kind":"json-schema","data":{"type":"object","properties":{"clientGroups":{"type":"array","items":{"$ref":"#/components/schemas/ClientGroup"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of client groups in the tenant","example":142}}}}}}},"id":"schema_126"},"schema_127":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of contacts to return"},"page":{"type":"integer","minimum":0,"default":0,"description":"Number of records to skip for pagination"}}},"id":"schema_127"},"schema_128":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1},"where":{"type":"object","description":"GraphQL-style where clause for complex contact filtering","example":{"_and":[{"_or":[{"contact_info":{"firstName":{"_ilike":"%john%"}}},{"contact_info":{"lastName":{"_ilike":"%doe%"}}}]},{"active":{"_eq":true}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"contact_info":{"email":{"_ilike":"%@company.com%"}}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":"Dynamic ordering with nested relationship fields","example":[{"contact_info":{"lastName":"asc"}},{"createdAt":"desc"}]}}},"id":"schema_128"},"schema_129":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique contact identifier","example":23456},"firstName":{"type":"string","description":"Contact first name","example":"John"},"lastName":{"type":"string","description":"Contact last name","example":"Smith"},"email":{"type":"string","format":"email","description":"Primary email address","example":"john.smith@acme.com"},"phone":{"type":"string","description":"Primary phone number","example":"+1-555-0123"},"mobile":{"type":"string","description":"Mobile phone number","example":"+1-555-0456"},"title":{"type":"string","description":"Job title or position","example":"Chief Financial Officer"},"department":{"type":"string","description":"Department or division","example":"Finance"},"status":{"type":"string","description":"Contact status","enum":["ACTIVE","INACTIVE","PENDING","BLOCKED"],"example":"ACTIVE"},"type":{"type":"string","description":"Contact type","enum":["CLIENT_CONTACT","PROSPECT","VENDOR","PARTNER","STAFF"],"example":"CLIENT_CONTACT"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"clientName":{"type":"string","description":"Client name","example":"Acme Corporation"},"isPrimaryContact":{"type":"boolean","description":"Whether this is the primary contact for the client","example":true},"address":{"type":"object","description":"Contact address information","properties":{"street":{"type":"string","description":"Street address","example":"123 Business Ave"},"city":{"type":"string","description":"City","example":"New York"},"state":{"type":"string","description":"State or province","example":"NY"},"zipCode":{"type":"string","description":"ZIP or postal code","example":"10001"},"country":{"type":"string","description":"Country","example":"USA"}}},"communicationPreferences":{"type":"object","description":"Communication preferences","properties":{"preferredMethod":{"type":"string","description":"Preferred communication method","enum":["EMAIL","PHONE","SMS","MAIL"],"example":"EMAIL"},"emailFrequency":{"type":"string","description":"Preferred email frequency","enum":["DAILY","WEEKLY","MONTHLY","QUARTERLY","NEVER"],"example":"WEEKLY"},"newsletterSubscription":{"type":"boolean","description":"Whether subscribed to newsletters","example":true},"marketingEmails":{"type":"boolean","description":"Whether accepts marketing emails","example":false}}},"notes":{"type":"string","description":"Additional notes about the contact","example":"Primary contact for all financial matters and audit communications"},"createdAt":{"type":"string","format":"date-time","description":"Contact creation timestamp","example":"2023-01-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-11-20T14:30:00Z"}}},"id":"schema_129"},"schema_130":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Contact not found"},"message":{"type":"string","example":"Contact with ID 23456 does not exist"}}},"id":"schema_130"},"schema_131":{"kind":"json-schema","data":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"contact_id":{"type":"integer","description":"Unique contact identifier","example":23456},"client_id":{"type":"integer","description":"Associated client identifier","example":789},"active":{"type":"boolean","description":"Whether this contact-client relationship is active","example":true},"relationship":{"type":"string","description":"Relationship type between the contact and client","example":"PRIMARY"},"receives_invoice":{"type":"boolean","description":"Whether this contact receives invoices","example":true},"receives_statement":{"type":"boolean","description":"Whether this contact receives statements","example":false},"receives_payment_confirmation":{"type":"boolean","description":"Whether this contact receives payment confirmations","example":true},"contact":{"type":"object","properties":{"id":{"type":"integer","example":23456},"pms_ref":{"type":"string","description":"PMS reference identifier","example":"PMS-001"},"active":{"type":"boolean","example":true},"type":{"type":"string","description":"Contact type","example":"CLIENT_CONTACT"},"fwd_email_confirmation":{"type":"boolean","description":"Whether to forward email confirmations to this contact","example":true},"contact_info":{"type":"object","properties":{"id":{"type":"integer","example":5678},"salutation":{"type":"string","example":"Mr."},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"Smith"},"email":{"type":"string","format":"email","example":"john.smith@acme.com"},"phone":{"type":"string","example":"+1-555-0123"},"address":{"type":"string","example":"123 Business Ave"},"address2":{"type":"string","example":"Suite 400"},"city":{"type":"string","example":"New York"},"state":{"type":"string","example":"NY"},"country":{"type":"string","example":"USA"},"zip_code":{"type":"string","example":"10001"},"active":{"type":"boolean","example":true}}}}}}}}}},"id":"schema_131"},"schema_132":{"kind":"json-schema","data":{"type":"object","properties":{"clientBusinessEntities":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_132"},"schema_133":{"kind":"json-schema","data":{"type":"object","properties":{"contactClients":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_133"},"schema_134":{"kind":"json-schema","data":{"type":"object","properties":{"contactInfos":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_134"},"schema_135":{"kind":"json-schema","data":{"type":"object","properties":{"departments":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_135"},"schema_136":{"kind":"json-schema","data":{"type":"object","properties":{"industries":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_136"},"schema_137":{"kind":"json-schema","data":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_137"},"schema_138":{"kind":"json-schema","data":{"type":"object","properties":{"job":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique job identifier","example":5012},"pmsRef":{"type":"string","description":"External PMS reference","example":"JOB-5012"},"jobRef":{"type":"string","description":"Internal job reference","example":"J-0005012"},"name":{"type":"string","description":"Job name","example":"Q1 Financial Review 2025"},"status":{"type":"string","description":"Job status","example":"ACTIVE"},"isActive":{"type":"boolean","description":"Whether the job is active","example":true},"clientId":{"type":"integer","description":"Associated client identifier","example":1001},"deptId":{"type":"integer","description":"Associated department identifier","example":7},"officeId":{"type":"integer","description":"Associated office identifier","example":2},"jobTemplateId":{"type":"integer","description":"Associated job template identifier","example":300},"managerStaffId":{"type":"integer","description":"Staff identifier for the job manager","example":102},"partnerStaffId":{"type":"integer","description":"Staff identifier for the job partner","example":101},"startDate":{"type":"string","format":"date-time","description":"Job start date","example":"2025-01-01T00:00:00Z"},"endDate":{"type":"string","format":"date-time","description":"Job end date","example":"2025-03-31T23:59:59Z"},"dueDate":{"type":"string","format":"date-time","description":"Job due date (alias for endDate)","example":"2025-03-31T23:59:59Z"},"targetStartDate":{"type":"string","format":"date-time","description":"Target start date","example":"2025-01-01T00:00:00Z"},"targetEndDate":{"type":"string","format":"date-time","description":"Target end date","example":"2025-03-31T23:59:59Z"},"feeStructureId":{"type":"integer","description":"Associated fee structure identifier","example":42},"feeStructureV4":{"type":"object","description":"Fee structure details","properties":{"id":{"type":"integer","example":42},"type":{"type":"string","example":"FIXED"},"amount":{"type":"number","example":5000},"active":{"type":"boolean","example":true}}},"sysRefs":{"type":"object","description":"System reference metadata"},"createdAt":{"type":"string","format":"date-time","description":"Record creation timestamp","example":"2025-01-02T03:04:05Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2025-01-03T10:11:12Z"},"version":{"type":"integer","description":"Record version for optimistic concurrency","example":3}}}}}},"id":"schema_138"},"schema_139":{"kind":"json-schema","data":{"type":"object","properties":{"jobTemplates":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_139"},"schema_140":{"kind":"json-schema","data":{"type":"object","properties":{"offices":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_140"},"schema_141":{"kind":"json-schema","data":{"type":"object","properties":{"orgs":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_141"},"schema_142":{"kind":"json-schema","data":{"type":"object","properties":{"serviceLines":{"type":"array","items":{"type":"object"}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"id":"schema_142"},"schema_143":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":25,"description":"Maximum number of staff records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Page number for pagination (0-based)","example":0},"isActive":{"type":"boolean","description":"Filter by active employee status","example":true},"departmentId":{"type":"integer","description":"Filter staff by specific department ID","example":7},"nameSearch":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Search term for first and last names (use % for wildcard)"},"children":[]}]}]}],"example":"%"},"sortOrder":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order for staff names","example":"asc"}}},"id":"schema_143"},"schema_144":{"kind":"json-schema","data":{"type":"object","properties":{"deid_staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique staff identifier","example":202},"pmsRef":{"type":"string","description":"PMS reference identifier","example":"2254"},"firstName":{"type":"string","description":"Staff member first name","example":"Holley"},"lastName":{"type":"string","description":"Staff member last name","example":"Abbott"},"email":{"type":"string","format":"email","description":"Primary email address","example":"ena.toy@hotmail.com"},"active":{"type":"boolean","description":"Whether the staff member is active","example":true},"deptId":{"type":"integer","description":"Department identifier","example":8},"jobTitle":{"type":"string","nullable":true,"description":"Job title of the staff member","example":null},"type":{"type":"string","nullable":true,"description":"Staff member type or category","example":null},"officeId":{"type":"integer","description":"Office identifier where the staff member is based","example":2},"staffManagerId":{"type":"integer","nullable":true,"description":"Identifier of the staff member's manager","example":null}}}},"deid_staff_aggregate":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of staff records matching criteria","example":138}}}}}}},"id":"schema_144"},"schema_145":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1,"description":"Maximum number of staff to return","example":1},"where":{"type":"object","description":"GraphQL-style where clause for complex staff filtering","example":{"_and":[{"_or":[{"firstName":{"_ilike":"%john%"}},{"lastName":{"_ilike":"%doe%"}}]},{"active":{"_eq":true}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"deptId":{"_in":[1,2,3]}}]}},"orderBy":{"type":"array","description":"Dynamic ordering specifications with multiple fields","items":{"type":"object"},"example":[{"lastName":"asc"},{"firstName":"asc"}]}}},"id":"schema_145"},"schema_146":{"kind":"json-schema","data":{"type":"object","properties":{"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique staff identifier","example":202},"pmsRef":{"type":"string","description":"PMS reference identifier","example":"2254"},"firstName":{"type":"string","description":"Staff member first name","example":"Holley"},"lastName":{"type":"string","description":"Staff member last name","example":"Abbott"},"email":{"type":"string","format":"email","description":"Primary email address","example":"ena.toy@hotmail.com"},"active":{"type":"boolean","description":"Whether the staff member is active","example":true},"deptId":{"type":"integer","description":"Department identifier","example":8},"jobTitle":{"type":"string","nullable":true,"description":"Job title of the staff member","example":null},"type":{"type":"string","nullable":true,"description":"Staff member type or category","example":null},"officeId":{"type":"integer","description":"Office identifier where the staff member is based","example":2},"staffManagerId":{"type":"integer","nullable":true,"description":"Identifier of the staff member's manager","example":null}}}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of staff records matching criteria","example":1}}}}}}},"id":"schema_146"},"schema_147":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique staff member identifier","example":202},"pmsRef":{"type":"string","description":"PMS reference identifier","example":"2254"},"firstName":{"type":"string","description":"Staff member first name","example":"Holley"},"lastName":{"type":"string","description":"Staff member last name","example":"Abbott"},"email":{"type":"string","format":"email","description":"Primary email address","example":"ena.toy@hotmail.com"},"active":{"type":"boolean","description":"Whether the staff member is active","example":true},"deptId":{"type":"integer","description":"Department identifier","example":8},"jobTitle":{"type":"string","nullable":true,"description":"Job title of the staff member","example":null},"type":{"type":"string","nullable":true,"description":"Staff member type or category","example":null},"officeId":{"type":"integer","description":"Office identifier where the staff member is based","example":2},"staffManagerId":{"type":"integer","nullable":true,"description":"Identifier of the staff member's manager","example":null}}},"id":"schema_147"},"schema_148":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Staff member not found"},"message":{"type":"string","example":"Staff member with ID 123 does not exist"}}},"id":"schema_148"},"schema_149":{"kind":"json-schema","data":{"type":"object","required":["firstName","lastName","pmsRef","ref"],"properties":{"firstName":{"type":"string","description":"Staff member's first name","example":"Jane"},"lastName":{"type":"string","description":"Staff member's last name","example":"Doe"},"pmsRef":{"type":"string","description":"Practice management system reference identifier","example":"EMP-1042"},"ref":{"type":"string","description":"Unique staff reference code","example":"doe-j"},"email":{"type":"string","format":"email","nullable":true,"description":"Primary email address","example":"jane.doe@firm.com"},"jobTitle":{"type":"string","nullable":true,"description":"Job title (free-text)","example":"Senior Associate"},"jobTitleId":{"type":"integer","format":"int64","nullable":true,"description":"ID of a job title lookup record","example":7},"departmentId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the department this staff member belongs to","example":3},"officeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the office this staff member is based in","example":2},"orgId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the organization","example":1},"serviceLineId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the service line","example":4},"staffTypeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the staff type (e.g. Partner, Manager, Associate)","example":2},"partnerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the partner staff member assigned to this person","example":50},"managerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the manager staff member","example":30},"supervisorStaffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the supervisor staff member","example":null},"prefix":{"type":"string","nullable":true,"description":"Name prefix (e.g. Dr., Ms.)","example":"Ms."},"startDate":{"type":"string","format":"date-time","nullable":true,"description":"Employment start date","example":"2024-01-15T00:00:00"},"endDate":{"type":"string","format":"date-time","nullable":true,"description":"Employment end date","example":null},"active":{"type":"boolean","default":true,"description":"Whether the staff member is active","example":true},"rateCardAssignment":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optional rate card assignment. When provided, billing rate and average"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"cost records are created atomically with the staff record."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and all "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values must reference existing records"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"or the entire request is rejected with HTTP 400."},"children":[]}]}]}],"required":["rateCardId","billingRates"],"properties":{"rateCardId":{"type":"integer","format":"int64","description":"ID of an existing rate card to assign this staff member to","example":5},"billingRates":{"type":"array","description":"One billing rate record per rate type. Can be an empty array if only an average cost is being set.\n","items":{"type":"object","required":["rateTypeId"],"properties":{"rateTypeId":{"type":"integer","format":"int64","description":"ID of an existing rate type","example":12},"hourlyBillingRate":{"type":"number","format":"decimal","nullable":true,"description":"Hourly billing rate in the firm's currency. Defaults to 0 when omitted.","example":150}}}},"averageCost":{"type":"number","format":"decimal","nullable":true,"description":"Average hourly cost for this staff member. One record per rate card assignment.","example":75}}}}},"id":"schema_149"},"schema_150":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the created staff member","example":312},"pmsRef":{"type":"string","example":"EMP-1042"},"ref":{"type":"string","example":"doe-j"},"firstName":{"type":"string","example":"Jane"},"lastName":{"type":"string","example":"Doe"},"fullName":{"type":"string","nullable":true,"example":"Jane Doe"},"email":{"type":"string","format":"email","nullable":true,"example":"jane.doe@firm.com"},"jobTitle":{"type":"string","nullable":true,"example":"Senior Associate"},"departmentId":{"type":"integer","format":"int64","nullable":true,"example":null},"officeId":{"type":"integer","format":"int64","nullable":true,"example":null},"active":{"type":"boolean","example":true},"version":{"type":"integer","format":"int64","example":1},"createdAt":{"type":"string","format":"date-time","nullable":true,"example":"2024-03-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","nullable":true,"example":"2024-03-15T10:00:00Z"},"rateCardAssignment":{"type":"object","nullable":true,"description":"Present only when a rate card assignment was provided in the request","properties":{"rateCardId":{"type":"integer","format":"int64","description":"ID of the rate card the staff member was assigned to","example":5},"billingRateIds":{"type":"array","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"IDs of the created rate_card_staff_billing_rate records"},"children":[]}]}]}],"items":{"type":"integer","format":"int64"},"example":[101,102]},"averageCostId":{"type":"integer","format":"int64","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"ID of the created rate_card_staff_average_cost record, or null if averageCost was not provided"},"children":[]}]}]}],"example":201}}}}},"meta":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Staff member created successfully"},"timestamp":{"type":"string","format":"date-time","example":"2024-03-15T10:00:00Z"},"version":{"type":"string","example":"v1"}}}}},"id":"schema_150"},"schema_151":{"kind":"json-schema","data":{"type":"integer","format":"int64","minimum":1},"id":"schema_151"},"schema_152":{"kind":"json-schema","data":{"type":"object","properties":{"firstName":{"type":"string","nullable":true,"description":"Updated first name","example":"Jane"},"lastName":{"type":"string","nullable":true,"description":"Updated last name","example":"Doe"},"email":{"type":"string","format":"email","nullable":true,"description":"Updated primary email address","example":"jane.doe@firm.com"},"jobTitle":{"type":"string","nullable":true,"description":"Updated job title (free-text)","example":"Manager"},"jobTitleId":{"type":"integer","format":"int64","nullable":true,"description":"Updated job title lookup record ID","example":8},"departmentId":{"type":"integer","format":"int64","nullable":true,"description":"Updated department ID","example":3},"officeId":{"type":"integer","format":"int64","nullable":true,"description":"Updated office ID","example":2},"orgId":{"type":"integer","format":"int64","nullable":true,"description":"Updated organization ID","example":1},"serviceLineId":{"type":"integer","format":"int64","nullable":true,"description":"Updated service line ID","example":4},"staffTypeId":{"type":"integer","format":"int64","nullable":true,"description":"Updated staff type ID (e.g. Partner, Manager, Associate)","example":3},"partnerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"Updated partner staff member ID","example":50},"managerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"Updated manager staff member ID","example":31},"supervisorStaffId":{"type":"integer","format":"int64","nullable":true,"description":"Updated supervisor staff member ID","example":null},"prefix":{"type":"string","nullable":true,"description":"Updated name prefix","example":"Dr."},"startDate":{"type":"string","format":"date-time","nullable":true,"description":"Updated employment start date","example":"2023-06-01T00:00:00"},"endDate":{"type":"string","format":"date-time","nullable":true,"description":"Updated employment end date","example":null},"active":{"type":"boolean","nullable":true,"description":"Updated active status","example":true},"rateCardAssignment":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When provided, replaces the staff member's entire rate card assignment."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"All current active billing rate and average cost records are deactivated"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"and new records are created for the specified rate card. Validated before"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"any writes — invalid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateTypeId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values return HTTP 400."},"children":[]}]}]}],"required":["rateCardId","billingRates"],"properties":{"rateCardId":{"type":"integer","format":"int64","description":"ID of the rate card to assign","example":6},"billingRates":{"type":"array","description":"New billing rate records to create, one per rate type. Can be an empty array if only the average cost is being updated.\n","items":{"type":"object","required":["rateTypeId"],"properties":{"rateTypeId":{"type":"integer","format":"int64","description":"ID of an existing rate type","example":12},"hourlyBillingRate":{"type":"number","format":"decimal","nullable":true,"description":"Hourly billing rate. Defaults to 0 when omitted.","example":200}}}},"averageCost":{"type":"number","format":"decimal","nullable":true,"description":"New average hourly cost. Omit to leave the average cost unset.","example":95}}}}},"id":"schema_152"},"schema_153":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Staff member identifier","example":312},"pmsRef":{"type":"string","example":"EMP-1042"},"ref":{"type":"string","example":"doe-j"},"firstName":{"type":"string","example":"Jane"},"lastName":{"type":"string","example":"Doe"},"fullName":{"type":"string","nullable":true,"example":"Jane Doe"},"email":{"type":"string","format":"email","nullable":true,"example":"jane.doe@firm.com"},"jobTitle":{"type":"string","nullable":true,"example":"Manager"},"active":{"type":"boolean","example":true},"version":{"type":"integer","format":"int64","example":2},"createdAt":{"type":"string","format":"date-time","nullable":true,"example":"2024-03-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","nullable":true,"example":"2024-06-01T09:00:00Z"},"rateCardAssignment":{"type":"object","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Present only when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rateCardAssignment"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" was provided in the request. Contains the IDs of the newly created records."},"children":[]}]}]}],"properties":{"rateCardId":{"type":"integer","format":"int64","example":6},"billingRateIds":{"type":"array","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"IDs of the newly created rate_card_staff_billing_rate records"},"children":[]}]}]}],"items":{"type":"integer","format":"int64"},"example":[205]},"averageCostId":{"type":"integer","format":"int64","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"ID of the newly created rate_card_staff_average_cost record, or null if averageCost was not provided"},"children":[]}]}]}],"example":301}}}}},"meta":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Staff member updated successfully"},"timestamp":{"type":"string","format":"date-time","example":"2024-06-01T09:00:00Z"},"version":{"type":"string","example":"v1"}}}}},"id":"schema_153"},"schema_154":{"kind":"json-schema","data":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"display":{"type":"string","description":"Display"},"description":{"type":"string","description":"Description","nullable":true},"permissionSetId":{"type":"integer","format":"int64","description":"Permissionsetid","nullable":true}}},"description":"Items"}}},"id":"schema_154"},"schema_155":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"index":{"type":"integer","format":"int32","description":"Index"},"display":{"type":"string","description":"Display"},"id":{"type":"integer","format":"int64","description":"Id"}}},"error":{"type":"object","nullable":true},"meta":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}}}},"id":"schema_155"},"schema_156":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","format":"int32","description":"Pagesize"},"page":{"type":"integer","format":"int32","description":"Page"}}},"id":"schema_156"},"schema_157":{"kind":"json-schema","data":{"type":"object"},"id":"schema_157"},"schema_158":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":25,"description":"Maximum number of payment records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Page number for pagination (0-based)","example":0},"clientId":{"type":"integer","description":"Filter payments by specific client ID","example":789},"paymentMethod":{"type":"string","description":"Filter by payment method type","enum":["CREDIT_CARD","DEBIT_CARD","ACH","BANK_TRANSFER","CHECK","WIRE","PAYPAL","APPLE_PAY","GOOGLE_PAY"],"example":"CREDIT_CARD"},"startDate":{"type":"string","format":"date-time","description":"Start date for payment date range filter","example":"2024-01-01T00:00:00"},"endDate":{"type":"string","format":"date-time","description":"End date for payment date range filter","example":"2024-12-31T23:59:59"},"status":{"type":"string","description":"Filter by payment status","enum":["PENDING","CONFIRMED","FAILED","CANCELLED","REFUNDED"],"example":"CONFIRMED"},"sortOrder":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order for payment date","example":"desc"}}},"id":"schema_158"},"schema_159":{"kind":"json-schema","data":{"type":"object","properties":{"deid_payment":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique payment identifier","example":45201},"arTranId":{"type":"integer","description":"Associated AR transaction identifier","example":125890},"paymentMethod":{"type":"string","description":"Payment method type","example":"CREDIT_CARD"},"amount":{"type":"number","format":"decimal","description":"Payment amount","example":2750},"paymentDate":{"type":"string","format":"date-time","description":"Date when payment was processed","example":"2024-03-15T14:30:22+00:00"},"confirmationDate":{"type":"string","format":"date-time","nullable":true,"description":"Date when payment was confirmed","example":"2024-03-15T14:32:18+00:00"},"status":{"type":"string","description":"Current payment status","example":"CONFIRMED"},"processorId":{"type":"string","description":"Payment processor identifier","example":"stripe"},"processorReferenceId":{"type":"string","description":"Payment processor transaction reference","example":"pi_3N1K2mL4uZ5v6w7x8y9z0a1b"},"last4Digits":{"type":"string","nullable":true,"description":"Last 4 digits of card (PCI compliant)","example":"4242"},"cardType":{"type":"string","nullable":true,"description":"Credit card type","example":"VISA"},"currency":{"type":"string","description":"Payment currency code","example":"USD"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"createdAt":{"type":"string","format":"date-time","description":"Payment record creation timestamp","example":"2024-03-15T14:30:22.123456+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Payment record last update timestamp","example":"2024-03-15T14:32:18.789012+00:00"},"client":{"type":"object","description":"Associated client information","properties":{"id":{"type":"integer","example":789},"name":{"type":"string","example":"TechFlow Enterprises"},"clientRef":{"type":"string","example":"TF-2024-789"}}},"ar_tran":{"type":"object","description":"Associated AR transaction details","properties":{"id":{"type":"integer","example":125890},"pmsRef":{"type":"string","example":"INV-2024-3456"},"transactionDate":{"type":"string","format":"date-time","example":"2024-03-01T00:00:00+00:00"},"amount":{"type":"number","format":"decimal","example":2750}}}}}},"deid_payment_aggregate":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of payment records matching criteria","example":15},"sum":{"type":"object","properties":{"amount":{"type":"number","format":"decimal","description":"Total payment amount across all matching records","example":28750}}}}}}}}},"id":"schema_159"},"schema_160":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1},"where":{"type":"object","description":"GraphQL-style where clause for complex payment filtering","example":{"_and":[{"_or":[{"paymentMethod":{"_ilike":"%CREDIT%"}},{"cardType":{"_ilike":"%VISA%"}}]},{"isAutomatic":{"_eq":false}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"paymentConfirmationDate":{"_is_null":false}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":"Dynamic ordering specifications","example":[{"paymentConfirmationDate":"desc"},{"createdAt":"desc"}]}}},"id":"schema_160"},"schema_161":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique payment identifier","example":12345},"amount":{"type":"number","format":"decimal","description":"Payment amount","example":1500},"currency":{"type":"string","description":"Payment currency code","example":"USD"},"paymentMethod":{"type":"string","description":"Method used for payment","enum":["CREDIT_CARD","DEBIT_CARD","ACH","BANK_TRANSFER","CHECK","WIRE","PAYPAL","APPLE_PAY","GOOGLE_PAY"],"example":"CREDIT_CARD"},"cardLastFour":{"type":"string","description":"Last four digits of payment card (PCI compliant)","example":"1234"},"cardType":{"type":"string","description":"Type of payment card","example":"VISA"},"status":{"type":"string","description":"Current payment status","enum":["PENDING","CONFIRMED","FAILED","CANCELLED","REFUNDED"],"example":"CONFIRMED"},"confirmationDate":{"type":"string","format":"date-time","description":"Date and time when payment was confirmed","example":"2024-01-15T10:30:00Z"},"processorReference":{"type":"string","description":"Payment processor reference ID","example":"stripe_pi_1234567890"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"clientName":{"type":"string","description":"Name of the client who made the payment","example":"Acme Corporation"},"invoiceId":{"type":"integer","description":"Associated invoice identifier","example":456},"invoiceNumber":{"type":"string","description":"Invoice number for the payment","example":"INV-2024-001"},"createdAt":{"type":"string","format":"date-time","description":"Payment creation timestamp","example":"2024-01-15T10:25:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-01-15T10:30:00Z"}}},"id":"schema_161"},"schema_162":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Payment not found"},"message":{"type":"string","example":"Payment with ID 12345 does not exist"}}},"id":"schema_162"},"schema_163":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of records to return"},"page":{"type":"integer","minimum":0,"default":0,"description":"Number of records to skip for pagination"}}},"id":"schema_163"},"schema_164":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1},"where":{"type":"object","description":"GraphQL-style where clause for complex filtering","example":{"_and":[{"_or":[{"clientId":{"_in":[1001,1002]}},{"jobId":{"_in":[2001,2002]}}]},{"active":{"_eq":true}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"activityType":{"_in":["DRAFT_INVOICE_CREATED","DRAFT_INVOICE_RECONCILED"]}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":"Dynamic ordering specifications","example":[{"clientId":"asc"},{"createdAt":"desc"}]}}},"id":"schema_164"},"schema_165":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique draft invoice identifier","example":56789},"draftNumber":{"type":"string","description":"Draft invoice number","example":"DRAFT-2024-001"},"reference":{"type":"string","description":"Draft invoice reference or description","example":"Q4-AUDIT-DRAFT-2024"},"status":{"type":"string","description":"Draft invoice status","enum":["DRAFT","UNDER_REVIEW","APPROVED","REJECTED","CONVERTED"],"example":"UNDER_REVIEW"},"reviewStatus":{"type":"string","description":"Review status","enum":["NOT_STARTED","IN_REVIEW","PENDING_APPROVAL","APPROVED","REJECTED"],"example":"PENDING_APPROVAL"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"clientName":{"type":"string","description":"Client name","example":"Acme Corporation"},"clientEmail":{"type":"string","description":"Client billing email","example":"billing@acme.com"},"projectId":{"type":"integer","description":"Associated project identifier","example":67890},"projectName":{"type":"string","description":"Project name","example":"Q4 Financial Audit"},"preparedDate":{"type":"string","format":"date-time","description":"Date when draft was prepared","example":"2024-12-01T00:00:00Z"},"proposedIssueDate":{"type":"string","format":"date-time","description":"Proposed invoice issue date","example":"2024-12-15T00:00:00Z"},"proposedDueDate":{"type":"string","format":"date-time","description":"Proposed invoice due date","example":"2025-01-15T23:59:59Z"},"subtotal":{"type":"number","format":"decimal","description":"Draft subtotal before tax","example":20000},"taxAmount":{"type":"number","format":"decimal","description":"Total tax amount","example":2000},"totalAmount":{"type":"number","format":"decimal","description":"Total draft amount including tax","example":22000},"currency":{"type":"string","description":"Draft currency code","example":"USD"},"lineItems":{"type":"array","description":"Draft invoice line items","items":{"type":"object","properties":{"id":{"type":"integer","description":"Line item identifier","example":1},"description":{"type":"string","description":"Line item description","example":"Financial Statement Audit"},"quantity":{"type":"number","format":"decimal","description":"Quantity of units","example":80},"unitPrice":{"type":"number","format":"decimal","description":"Unit price","example":250},"amount":{"type":"number","format":"decimal","description":"Line item total amount","example":20000},"taxRate":{"type":"number","format":"decimal","description":"Tax rate applied","example":0.1},"notes":{"type":"string","description":"Additional notes for line item","example":"Includes fieldwork and report preparation"}}}},"reviewHistory":{"type":"array","description":"Review history for this draft invoice","items":{"type":"object","properties":{"id":{"type":"integer","description":"Review record identifier","example":1},"reviewerId":{"type":"integer","description":"Reviewer identifier","example":123},"reviewerName":{"type":"string","description":"Reviewer name","example":"John Smith"},"reviewDate":{"type":"string","format":"date-time","description":"Review date","example":"2024-12-05T10:30:00Z"},"status":{"type":"string","description":"Review status","enum":["APPROVED","REJECTED","PENDING_APPROVAL","COMMENTS"],"example":"APPROVED"},"comments":{"type":"string","description":"Review comments","example":"All calculations verified and approved"}}}},"notes":{"type":"string","description":"Additional notes or terms","example":"Draft invoice for Q4 audit services - pending final review"},"createdAt":{"type":"string","format":"date-time","description":"Draft invoice creation timestamp","example":"2024-12-01T09:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-12-06T14:15:00Z"}}},"id":"schema_165"},"schema_166":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Draft invoice not found"},"message":{"type":"string","example":"Draft invoice with ID 56789 does not exist"}}},"id":"schema_166"},"schema_167":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":25,"description":"Maximum number of invoice records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Page number for pagination (0-based)","example":0},"clientId":{"type":"integer","description":"Filter invoices by specific client ID","example":7720},"status":{"type":"string","description":"Filter by invoice status","enum":["PENDING","POSTED","PAID","OVERDUE","CANCELLED","DRAFT"],"example":"POSTED"},"startDate":{"type":"string","format":"date-time","description":"Start date for invoice date range filter","example":"1990-01-01T00:00:00"},"endDate":{"type":"string","format":"date-time","description":"End date for invoice date range filter","example":"2024-12-31T23:59:59"},"sortOrder":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order for invoice dates","example":"desc"}}},"id":"schema_167"},"schema_168":{"kind":"json-schema","data":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"arTranId":{"type":"integer","description":"Invoice identifier (equal to the AR transaction id)","example":125890},"invoiceNumber":{"type":"string","description":"Unique invoice number for client reference","example":"INV-2024-4850"},"dueDate":{"type":"string","format":"date-time","description":"Invoice payment due date","example":"2024-04-24T05:00:00"},"status":{"type":"string","description":"Current invoice status","example":"POSTED"},"tax":{"type":"number","format":"decimal","description":"Tax amount charged on invoice","example":0},"interest":{"type":"number","format":"decimal","description":"Interest charges applied to invoice","example":0},"description":{"type":"string","nullable":true,"description":"Additional invoice description or notes","example":null},"createdAt":{"type":"string","format":"date-time","description":"Invoice record creation timestamp","example":"2024-05-12T22:50:20.595961+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Invoice record last update timestamp","example":"2024-05-12T22:50:20.595961+00:00"},"ar_tran":{"type":"object","description":"Associated AR transaction details","properties":{"id":{"type":"integer","example":125890},"pmsRef":{"type":"string","description":"Practice management system reference","example":"240815"},"transactionDate":{"type":"string","format":"date-time","description":"Transaction date","example":"2024-03-22T05:00:00"},"amount":{"type":"number","format":"decimal","description":"Transaction amount","example":4250},"allocated":{"type":"number","format":"decimal","description":"Allocated amount","example":4250},"clientId":{"type":"integer","description":"Client identifier","example":7720}}}}}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of invoices","example":94}}}}}}},"id":"schema_168"},"schema_169":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1},"where":{"type":"object","description":"GraphQL-style where clause for complex invoice filtering","example":{"_and":[{"_or":[{"invoiceNumber":{"_ilike":"%2024%"}},{"description":{"_ilike":"%service%"}}]},{"status":{"_in":["POSTED","CLOSED"]}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"dueDate":{"_gte":"2024-01-01T00:00:00Z"}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":"Dynamic ordering specifications","example":[{"invoiceNumber":"asc"},{"createdAt":"desc"}]}}},"id":"schema_169"},"schema_170":{"kind":"json-schema","data":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"arTranId":{"type":"integer","description":"Invoice identifier (equal to the AR transaction id)","example":125890},"invoiceNumber":{"type":"string","example":"INV-2024-4850"},"dueDate":{"type":"string","format":"date-time","example":"2024-04-24T05:00:00"},"status":{"type":"string","example":"POSTED"},"tax":{"type":"number","description":"Tax amount recorded on the invoice","example":0},"interest":{"type":"number","description":"Interest amount recorded on the invoice","example":0},"description":{"type":"string","nullable":true,"example":null},"createdAt":{"type":"string","format":"date-time","example":"2024-05-12T22:50:20.595961+00:00"},"updatedAt":{"type":"string","format":"date-time","example":"2024-05-12T22:50:20.595961+00:00"},"ar_tran":{"type":"object","description":"Associated AR transaction details","properties":{"id":{"type":"integer","example":125890},"pmsRef":{"type":"string","description":"Practice-management-system reference","example":"240815"},"transactionDate":{"type":"string","format":"date-time","example":"2024-03-22T05:00:00"},"amount":{"type":"number","description":"Total transaction amount","example":4250},"allocated":{"type":"number","description":"Amount allocated (applied/paid) against the transaction","example":4250},"clientId":{"type":"integer","example":7720}}}}}},"total":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of invoices matching the where clause","example":12}}}}}}},"id":"schema_170"},"schema_171":{"kind":"json-schema","data":{"type":"object","properties":{"arTranId":{"type":"integer","description":"Invoice identifier (equal to the AR transaction id)","example":45678},"invoiceNumber":{"type":"string","description":"Invoice number","example":"INV-2024-001"},"dueDate":{"type":"string","format":"date-time","description":"Invoice due date","example":"2024-12-31T23:59:59Z"},"status":{"type":"string","description":"Invoice status","example":"POSTED"},"tax":{"type":"number","description":"Tax amount recorded on the invoice","example":2000},"interest":{"type":"number","description":"Interest amount recorded on the invoice","example":0},"description":{"type":"string","description":"Invoice description","example":"Q4 Financial Audit"},"createdAt":{"type":"string","format":"date-time","description":"Invoice creation timestamp","example":"2024-12-01T09:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-12-15T10:30:00Z"},"ar_tran":{"type":"object","description":"Underlying accounts-receivable transaction","properties":{"id":{"type":"integer","description":"AR transaction identifier","example":45678},"pmsRef":{"type":"string","description":"Practice-management-system reference","example":"AR-2024-045678"},"transactionDate":{"type":"string","format":"date-time","description":"AR transaction date","example":"2024-12-01T00:00:00Z"},"amount":{"type":"number","description":"Total transaction amount","example":22000},"allocated":{"type":"number","description":"Amount allocated (applied/paid) against the transaction","example":15000},"clientId":{"type":"integer","description":"Associated client identifier","example":789}}}}},"id":"schema_171"},"schema_172":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Invoice not found"},"message":{"type":"string","example":"Invoice with ID 45678 does not exist"}}},"id":"schema_172"},"schema_173":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of projects to return"},"page":{"type":"integer","minimum":0,"default":0,"description":"Number of records to skip for pagination"}}},"id":"schema_173"},"schema_174":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1},"where":{"type":"object","description":"GraphQL-style where clause for complex project filtering","example":{"_and":[{"_or":[{"name":{"_ilike":"%migration%"}},{"serviceDescription":{"_ilike":"%review%"}}]},{"active":{"_eq":true}},{"updatedAt":{"_gte":"1900-01-01T00:00:00Z"}},{"partnerId":{"_in":[101,102,103]}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":"Dynamic ordering specifications","example":[{"updatedAt":"desc"},{"name":"asc"}]}}},"id":"schema_174"},"schema_175":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique project identifier","example":67890},"name":{"type":"string","description":"Project name","example":"Q4 Financial Audit"},"description":{"type":"string","description":"Detailed project description","example":"Comprehensive financial audit for Q4 2024 including tax preparation and compliance review"},"status":{"type":"string","description":"Current project status","enum":["PLANNING","IN_PROGRESS","ON_HOLD","COMPLETED","CANCELLED"],"example":"IN_PROGRESS"},"phase":{"type":"string","description":"Current project phase","enum":["PLANNING","EXECUTION","REVIEW","DELIVERY","CLOSED"],"example":"EXECUTION"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"clientName":{"type":"string","description":"Name of the client","example":"Acme Corporation"},"engagementId":{"type":"integer","description":"Associated engagement identifier","example":456},"engagementName":{"type":"string","description":"Name of the engagement","example":"Annual Audit Engagement"},"startDate":{"type":"string","format":"date-time","description":"Project start date","example":"2024-10-01T00:00:00Z"},"endDate":{"type":"string","format":"date-time","description":"Project end date","example":"2024-12-31T23:59:59Z"},"budget":{"type":"number","format":"decimal","description":"Project budget amount","example":25000},"currency":{"type":"string","description":"Budget currency code","example":"USD"},"actualCost":{"type":"number","format":"decimal","description":"Actual cost incurred to date","example":18500},"teamMembers":{"type":"array","description":"Team members assigned to the project","items":{"type":"object","properties":{"staffId":{"type":"integer","description":"Staff member identifier","example":123},"name":{"type":"string","description":"Staff member name","example":"John Smith"},"role":{"type":"string","description":"Role on the project","enum":["PROJECT_MANAGER","SENIOR_AUDITOR","AUDITOR","ASSOCIATE","INTERN"],"example":"SENIOR_AUDITOR"},"allocation":{"type":"number","format":"decimal","description":"Time allocation percentage (0.0 to 1.0)","example":0.8}}}},"milestones":{"type":"array","description":"Project milestones","items":{"type":"object","properties":{"id":{"type":"integer","description":"Milestone identifier","example":1},"name":{"type":"string","description":"Milestone name","example":"Planning Phase Complete"},"dueDate":{"type":"string","format":"date-time","description":"Milestone due date","example":"2024-10-15T00:00:00Z"},"status":{"type":"string","description":"Milestone status","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED","OVERDUE"],"example":"COMPLETED"}}}},"createdAt":{"type":"string","format":"date-time","description":"Project creation timestamp","example":"2024-09-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-11-20T14:30:00Z"}}},"id":"schema_175"},"schema_176":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Project not found"},"message":{"type":"string","example":"Project with ID 67890 does not exist"}}},"id":"schema_176"},"schema_177":{"kind":"json-schema","data":{"type":"object","required":["clientId","jobTemplates"],"properties":{"clientId":{"type":"integer","format":"int64","description":"Unique identifier of the client for whom jobs are being created","example":420},"jobTemplates":{"type":"array","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List of job templates to instantiate (1–100 entries)"},"children":[]}]}]}],"minItems":1,"maxItems":100,"items":{"type":"object","required":["jobTemplateId"],"properties":{"jobTemplateId":{"type":"integer","format":"int64","description":"Unique identifier of the job template to use","example":7},"startDate":{"type":"string","format":"date","nullable":true,"description":"Job start date (YYYY-MM-DD); overrides the template default","example":"2025-01-01"},"name":{"type":"string","nullable":true,"description":"Job name; overrides the template default","example":"Tax Return 2024"},"serviceDescription":{"type":"string","nullable":true,"description":"Service description; overrides the template default","example":"Annual federal and state tax preparation"},"estimationHours":{"type":"number","nullable":true,"description":"Estimated hours for the job; overrides the template default","example":8.5},"feeAmount":{"type":"number","nullable":true,"description":"Fee amount for the job; overrides the template default","example":1500},"requiredPrepayment":{"type":"number","nullable":true,"description":"Required prepayment amount; overrides the template default","example":500},"includeWipType":{"type":"string","nullable":true,"description":"WIP billing behavior; overrides the template default","enum":["INCLUDE_WIP","INCLUDE_WIP_IF_FINAL","DO_NOT_INCLUDE"],"example":"INCLUDE_WIP_IF_FINAL"}}}}}},"id":"schema_177"},"schema_178":{"kind":"json-schema","data":{"type":"array","items":{"type":"integer","format":"int64"},"description":"List of IDs for the newly created jobs"},"id":"schema_178"},"schema_179":{"kind":"json-schema","data":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"integer","format":"int64","description":"Jobid"},"staffJobAssignments":{"type":"array","items":{"type":"object","properties":{"staffId":{"type":"integer","format":"int64","description":"Staffid"}}},"description":"Staffjobassignments"},"staffTaskAssignments":{"type":"array","items":{"type":"object","properties":{"staffId":{"type":"integer","format":"int64","description":"Staffid"},"taskTypeId":{"type":"integer","format":"int64","description":"Tasktypeid"}}},"description":"Stafftaskassignments"}}},"id":"schema_179"},"schema_180":{"kind":"json-schema","data":{"type":"object","properties":{"taskTypes":{"type":"array","description":"List of task types ordered by display name","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the task type","example":1},"pmsRef":{"type":"string","description":"Practice management system reference identifier","example":"TAX-PREP"},"code":{"type":"string","description":"Short code used to identify the task type","example":"TXPRP"},"display":{"type":"string","description":"Human-readable display name","example":"Tax Preparation"},"description":{"type":"string","nullable":true,"description":"Detailed description of the task type","example":"Federal and state income tax preparation"},"billable":{"type":"boolean","description":"Whether time logged under this task type is billable","example":true},"taxable":{"type":"boolean","description":"Whether this task type is subject to tax","example":false},"active":{"type":"boolean","description":"Whether the task type is currently active","example":true},"customHourlyRate":{"type":"number","format":"decimal","nullable":true,"description":"Optional custom hourly rate that overrides the default rate","example":275},"rateTypeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the rate type associated with this task type","example":3},"taskTypeCategoryId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the task type category","example":2},"serviceLineId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the service line this task type belongs to","example":5},"projectsUsedInCount":{"type":"integer","description":"Number of projects this task type is used in","example":42},"invoicesUsedInCount":{"type":"integer","description":"Number of invoices this task type appears on","example":118},"isCreatedByAiwyn":{"type":"boolean","description":"Whether this task type was created by Aiwyn","example":false},"isManagedByAiwyn":{"type":"boolean","description":"Whether this task type is managed by Aiwyn","example":false},"createdAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task type was created","example":"2023-01-15T08:00:00Z"},"updatedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task type was last updated","example":"2024-06-01T12:30:00Z"},"version":{"type":"integer","format":"int64","description":"Optimistic locking version number","example":3}}}},"total":{"type":"object","description":"Aggregate count information","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of task types","example":25}}}}}}},"id":"schema_180"},"schema_181":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of task types to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Offset (number of records to skip) for pagination","example":0},"where":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"GraphQL-style where clause for filtering. Supports operators such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_eq"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_neq"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_in"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_nin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_ilike"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_gte"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_lte"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and logical combinators "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_and"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_or"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_not"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":{"_and":[{"billable":{"_eq":true}},{"active":{"_eq":true}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dynamic ordering specifications. Each element is an object mapping a field name to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"asc\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"desc\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Defaults to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[{ \"display\": \"asc\" }]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":[{"display":"asc"}]}}},"id":"schema_181"},"schema_182":{"kind":"json-schema","data":{"type":"object","properties":{"taskTypes":{"type":"array","description":"List of task types matching the filter criteria","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the task type","example":1},"pmsRef":{"type":"string","description":"Practice management system reference identifier","example":"TAX-PREP"},"code":{"type":"string","description":"Short code used to identify the task type","example":"TXPRP"},"display":{"type":"string","description":"Human-readable display name","example":"Tax Preparation"},"description":{"type":"string","nullable":true,"description":"Detailed description of the task type","example":"Federal and state income tax preparation"},"billable":{"type":"boolean","description":"Whether time logged under this task type is billable","example":true},"taxable":{"type":"boolean","description":"Whether this task type is subject to tax","example":false},"active":{"type":"boolean","description":"Whether the task type is currently active","example":true},"customHourlyRate":{"type":"number","format":"decimal","nullable":true,"description":"Optional custom hourly rate that overrides the default rate","example":275},"rateTypeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the rate type associated with this task type","example":3},"taskTypeCategoryId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the task type category","example":2},"serviceLineId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the service line this task type belongs to","example":5},"projectsUsedInCount":{"type":"integer","description":"Number of projects this task type is used in","example":42},"invoicesUsedInCount":{"type":"integer","description":"Number of invoices this task type appears on","example":118},"isCreatedByAiwyn":{"type":"boolean","description":"Whether this task type was created by Aiwyn","example":false},"isManagedByAiwyn":{"type":"boolean","description":"Whether this task type is managed by Aiwyn","example":false},"createdAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task type was created","example":"2023-01-15T08:00:00Z"},"updatedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task type was last updated","example":"2024-06-01T12:30:00Z"},"version":{"type":"integer","format":"int64","description":"Optimistic locking version number","example":3}}}},"total":{"type":"object","description":"Aggregate count matching the filter (ignores pagination)","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of task types matching the where clause","example":12}}}}}}},"id":"schema_182"},"schema_183":{"kind":"json-schema","data":{"type":"integer","format":"int32","minimum":1},"id":"schema_183"},"schema_184":{"kind":"json-schema","data":{"type":"object","properties":{"tasks":{"type":"array","description":"Single-element array containing the matching task (empty if not found)","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique identifier of the task","example":456},"name":{"type":"string","description":"Task name","example":"Q4 Financial Statement Review"},"overrideName":{"type":"string","nullable":true,"description":"Optional name that overrides the default task name","example":null},"status":{"type":"string","description":"Current status of the task","example":"IN_PROGRESS"},"pmsRef":{"type":"string","nullable":true,"description":"Practice management system reference identifier","example":"TASK-001"},"jobId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the job this task belongs to","example":67890},"taskTypeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the task type","example":1},"assigneeStaffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the staff member assigned to this task","example":123},"startDate":{"type":"string","format":"date","nullable":true,"description":"Actual start date of the task","example":"2024-10-01"},"dueDate":{"type":"string","format":"date","nullable":true,"description":"Actual due date of the task","example":"2024-12-31"},"targetStartDate":{"type":"string","format":"date","nullable":true,"description":"Planned target start date","example":"2024-09-15"},"targetDueDate":{"type":"string","format":"date","nullable":true,"description":"Planned target due date","example":"2024-12-15"},"estimatedHours":{"type":"number","format":"decimal","nullable":true,"description":"Estimated hours to complete the task","example":40},"completedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task was completed","example":null},"description":{"type":"string","nullable":true,"description":"Detailed description of the task","example":"Review and analyse Q4 financial statements including variance analysis"},"ordinal":{"type":"integer","nullable":true,"description":"Display order position of the task","example":1},"parentTaskId":{"type":"integer","format":"int32","nullable":true,"description":"ID of the parent task if this is a subtask","example":null},"jobTemplateTaskId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the job template task this was created from","example":10},"isCreatedByAiwyn":{"type":"boolean","description":"Whether this task was created by Aiwyn","example":false},"isManagedByAiwyn":{"type":"boolean","description":"Whether this task is managed by Aiwyn","example":false},"createdAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task was created","example":"2024-09-01T08:00:00Z"},"updatedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task was last updated","example":"2024-10-01T09:30:00Z"},"taskType":{"type":"object","nullable":true,"description":"The task type associated with this task","properties":{"id":{"type":"integer","format":"int64","example":1},"code":{"type":"string","example":"TXPRP"},"display":{"type":"string","example":"Tax Preparation"},"billable":{"type":"boolean","example":true},"taxable":{"type":"boolean","example":false},"active":{"type":"boolean","example":true}}},"assigneeStaff":{"type":"object","nullable":true,"description":"The staff member assigned to this task","properties":{"id":{"type":"integer","format":"int64","example":123},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"Smith"},"email":{"type":"string","format":"email","example":"john.smith@firm.com"}}},"job":{"type":"object","nullable":true,"description":"The job this task belongs to","properties":{"id":{"type":"integer","format":"int64","example":67890}}}}}}}},"id":"schema_184"},"schema_185":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of tasks to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Offset (number of records to skip) for pagination","example":0},"where":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"GraphQL-style where clause for filtering. Supports operators such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_eq"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_neq"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_in"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_nin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_ilike"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_gte"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_lte"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and logical combinators "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_and"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_or"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"_not"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Nested relations "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"taskType"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"job"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" can be filtered inline."},"children":[]}]}]}],"example":{"_and":[{"taskType":{"code":{"_eq":"PREP"}}},{"assigneeStaffId":{"_eq":789}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dynamic ordering specifications. Each element maps a field name to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"asc\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"desc\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Defaults to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[{ \"id\": \"asc\" }]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":[{"dueDate":"asc"}]}}},"id":"schema_185"},"schema_186":{"kind":"json-schema","data":{"type":"object","properties":{"tasks":{"type":"array","description":"List of tasks matching the filter criteria","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique identifier of the task","example":456},"name":{"type":"string","description":"Task name","example":"Q4 Financial Statement Review"},"overrideName":{"type":"string","nullable":true,"description":"Optional name that overrides the default task name","example":null},"status":{"type":"string","description":"Current status of the task","example":"IN_PROGRESS"},"pmsRef":{"type":"string","nullable":true,"description":"Practice management system reference identifier","example":"TASK-001"},"jobId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the job this task belongs to","example":67890},"taskTypeId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the task type","example":1},"assigneeStaffId":{"type":"integer","format":"int64","nullable":true,"description":"ID of the staff member assigned to this task","example":789},"startDate":{"type":"string","format":"date","nullable":true,"description":"Actual start date of the task","example":"2024-10-01"},"dueDate":{"type":"string","format":"date","nullable":true,"description":"Actual due date of the task","example":"2024-12-31"},"targetStartDate":{"type":"string","format":"date","nullable":true,"description":"Planned target start date","example":"2024-09-15"},"targetDueDate":{"type":"string","format":"date","nullable":true,"description":"Planned target due date","example":"2024-12-15"},"estimatedHours":{"type":"number","format":"decimal","nullable":true,"description":"Estimated hours to complete the task","example":40},"completedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task was completed","example":null},"description":{"type":"string","nullable":true,"description":"Detailed description of the task","example":"Review and analyse Q4 financial statements"},"ordinal":{"type":"integer","nullable":true,"description":"Display order position of the task","example":1},"parentTaskId":{"type":"integer","format":"int32","nullable":true,"description":"ID of the parent task if this is a subtask","example":null},"isCreatedByAiwyn":{"type":"boolean","description":"Whether this task was created by Aiwyn","example":false},"isManagedByAiwyn":{"type":"boolean","description":"Whether this task is managed by Aiwyn","example":false},"createdAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task was created","example":"2024-09-01T08:00:00Z"},"updatedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the task was last updated","example":"2024-10-01T09:30:00Z"},"taskType":{"type":"object","nullable":true,"description":"The task type associated with this task","properties":{"id":{"type":"integer","format":"int64","example":1},"code":{"type":"string","example":"PREP"},"display":{"type":"string","example":"Tax Preparation"},"billable":{"type":"boolean","example":true},"taxable":{"type":"boolean","example":false},"active":{"type":"boolean","example":true}}},"assigneeStaff":{"type":"object","nullable":true,"description":"The staff member assigned to this task","properties":{"id":{"type":"integer","format":"int64","example":789},"firstName":{"type":"string","example":"Jane"},"lastName":{"type":"string","example":"Doe"},"email":{"type":"string","format":"email","example":"jane.doe@firm.com"}}},"job":{"type":"object","nullable":true,"description":"The job this task belongs to","properties":{"id":{"type":"integer","format":"int64","example":67890}}}}}},"total":{"type":"object","description":"Aggregate count matching the filter (ignores pagination)","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of tasks matching the where clause","example":84}}}}}}},"id":"schema_186"},"schema_187":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":25,"description":"Maximum number of WIP records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Page number for pagination (0-based)","example":0},"clientId":{"type":"integer","description":"Filter WIP records by specific client ID","example":1561},"jobId":{"type":"integer","description":"Filter WIP records by specific job ID","example":2514},"wipType":{"type":"string","description":"Filter by WIP type","enum":["Time","Expense","Fixed_Fee","Disbursement"],"example":"Time"},"startDate":{"type":"string","format":"date-time","description":"Start date for WIP logged date range filter","example":"2024-01-01T00:00:00"},"endDate":{"type":"string","format":"date-time","description":"End date for WIP logged date range filter","example":"2024-12-31T23:59:59"},"sortOrder":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order for logged date","example":"desc"}}},"id":"schema_187"},"schema_188":{"kind":"json-schema","data":{"type":"object","properties":{"deid_wip":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique WIP record identifier","example":850321},"pmsRef":{"type":"string","description":"Practice management system reference","example":"1789456"},"wipType":{"type":"string","description":"Type of WIP entry","example":"Time"},"loggedDate":{"type":"string","format":"date-time","description":"Date when WIP was logged","example":"2024-01-17T05:00:00"},"wipValue":{"type":"number","format":"decimal","description":"Original WIP value recorded","example":1250},"wipValueOutstanding":{"type":"number","format":"decimal","description":"Outstanding WIP value yet to be billed","example":0},"billedAmount":{"type":"number","format":"decimal","description":"Amount that has been billed from this WIP","example":1225},"writeOffAmount":{"type":"number","format":"decimal","description":"Amount written off as uncollectible","example":25},"notes":{"type":"string","nullable":true,"description":"Additional notes or description for the WIP entry","example":"Consultation and analysis for Q1 financial review"},"clientId":{"type":"integer","description":"Associated client identifier","example":1561},"jobId":{"type":"integer","description":"Associated job identifier","example":2514},"isActive":{"type":"boolean","description":"Whether the WIP record is active (inactive records represent deletions)","example":true},"createdAt":{"type":"string","format":"date-time","description":"WIP record creation timestamp","example":"2024-05-12T23:02:33.24516+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"WIP record last update timestamp","example":"2024-05-12T23:02:33.24516+00:00"},"client":{"type":"object","description":"Associated client information","properties":{"id":{"type":"integer","example":1561},"name":{"type":"string","example":"TechFlow Enterprises"}}},"job":{"type":"object","description":"Associated job information","properties":{"id":{"type":"integer","example":2514},"name":{"type":"string","example":"Q1 Financial Review 2024"}}}}}},"deid_wip_aggregate":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of WIP records matching criteria","example":84},"sum":{"type":"object","properties":{"wipValue":{"type":"number","format":"decimal","description":"Total WIP value across all matching records","example":24186.15},"billedAmount":{"type":"number","format":"decimal","description":"Total billed amount across all matching records","example":19612.07},"wipValueOutstanding":{"type":"number","format":"decimal","description":"Total outstanding WIP value","example":0}}}}}}}}},"id":"schema_188"},"schema_189":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1},"where":{"type":"object","description":"GraphQL-style where clause for complex WIP filtering","example":{"_and":[{"_or":[{"type":{"_in":["TIME","EXPENSE"]}},{"notes":{"_ilike":"%consultation%"}}]},{"approved":{"_eq":true}},{"loggedDate":{"_gte":"1900-01-01T00:00:00Z"}},{"clientId":{"_in":[1001,1002,1003]}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":"Dynamic ordering specifications","example":[{"loggedDate":"desc"},{"value":"desc"}]}}},"id":"schema_189"},"schema_190":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique WIP time entry identifier","example":89012},"description":{"type":"string","description":"Time entry description","example":"Financial statement review and analysis"},"status":{"type":"string","description":"Time entry status","enum":["DRAFT","SUBMITTED","PENDING_APPROVAL","APPROVED","REJECTED","BILLED"],"example":"PENDING_APPROVAL"},"type":{"type":"string","description":"Time entry type","enum":["BILLABLE","NON_BILLABLE","PTO","TRAINING","ADMINISTRATIVE"],"example":"BILLABLE"},"staffId":{"type":"integer","description":"Staff member identifier","example":123},"staffName":{"type":"string","description":"Staff member name","example":"John Smith"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"clientName":{"type":"string","description":"Client name","example":"Acme Corporation"},"projectId":{"type":"integer","description":"Associated project identifier","example":67890},"projectName":{"type":"string","description":"Project name","example":"Q4 Financial Audit"},"taskId":{"type":"integer","description":"Associated task identifier","example":456},"taskName":{"type":"string","description":"Task name","example":"Financial Statement Review"},"date":{"type":"string","format":"date","description":"Date of time entry","example":"2024-11-20T00:00:00Z"},"startTime":{"type":"string","format":"date-time","description":"Start time of work","example":"2024-11-20T09:00:00Z"},"endTime":{"type":"string","format":"date-time","description":"End time of work","example":"2024-11-20T17:00:00Z"},"duration":{"type":"number","format":"decimal","description":"Total duration in hours","example":8},"billableHours":{"type":"number","format":"decimal","description":"Billable hours","example":8},"nonBillableHours":{"type":"number","format":"decimal","description":"Non-billable hours","example":0},"hourlyRate":{"type":"number","format":"decimal","description":"Hourly rate for this time entry","example":250},"billableAmount":{"type":"number","format":"decimal","description":"Total billable amount","example":2000},"currency":{"type":"string","description":"Currency code","example":"USD"},"notes":{"type":"string","description":"Additional notes about the time entry","example":"Completed comprehensive review of Q4 financial statements including variance analysis"},"approvalHistory":{"type":"array","description":"Approval history for this time entry","items":{"type":"object","properties":{"id":{"type":"integer","description":"Approval record identifier","example":1},"approverId":{"type":"integer","description":"Approver identifier","example":124},"approverName":{"type":"string","description":"Approver name","example":"Jane Doe"},"approvalDate":{"type":"string","format":"date-time","description":"Approval date","example":"2024-11-21T10:30:00Z"},"status":{"type":"string","description":"Approval status","enum":["PENDING","APPROVED","REJECTED","COMMENTS"],"example":"PENDING"},"comments":{"type":"string","description":"Approval comments","example":"Under review"}}}},"createdAt":{"type":"string","format":"date-time","description":"Time entry creation timestamp","example":"2024-11-20T17:30:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-11-21T10:30:00Z"},"isActive":{"type":"boolean","description":"Whether the WIP record is active (inactive records represent deletions)","example":true}}},"id":"schema_190"},"schema_191":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"WIP time entry not found"},"message":{"type":"string","example":"WIP time entry with ID 89012 does not exist"}}},"id":"schema_191"},"schema_192":{"kind":"json-schema","data":{"type":"object","required":["records"],"properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Type"},"systemRef":{"type":"object","description":"Systemref","nullable":true},"attributes":{"type":"object","description":"Attributes"}}},"description":"Records"}}},"id":"schema_192"},"schema_193":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"object","description":"Summary"},"records":{"type":"array","items":{"type":"object"},"description":"Records"}}},"error":{"type":"object","nullable":true},"meta":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}}}},"id":"schema_193"},"schema_194":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","description":"Type"},"pageSize":{"type":"integer","format":"int32","description":"Pagesize"},"page":{"type":"integer","format":"int32","description":"Page"},"returned":{"type":"integer","format":"int32","description":"Returned"},"records":{"type":"array","items":{"type":"object"},"description":"Records"}}},"error":{"type":"object","nullable":true},"meta":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}}}},"id":"schema_194"},"schema_195":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":25,"description":"Maximum number of engagement records to return","example":25},"page":{"type":"integer","minimum":0,"default":0,"description":"Page number for pagination (0-based)","example":0},"clientId":{"type":"integer","description":"Filter engagements by specific client ID","example":420},"status":{"type":"string","description":"Filter by engagement status","enum":["ACTIVE","COMPLETED","ON_HOLD","EXECUTED","CANCELLED","PLANNED"],"example":"EXECUTED"},"startDate":{"type":"string","format":"date","description":"Start date for engagement date range filter","example":"2023-06-29"},"endDate":{"type":"string","format":"date","description":"End date for engagement date range filter","example":"2023-06-29"},"sortOrder":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order for engagement dates","example":"desc"}}},"id":"schema_195"},"schema_196":{"kind":"json-schema","data":{"type":"object","properties":{"deid_engagement":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique engagement identifier","example":8},"name":{"type":"string","description":"Generated engagement name from template","example":"2024 Annual Review and Tax 52150"},"start_dt":{"type":"string","format":"date","description":"Engagement start date","example":"2024-03-15"},"end_dt":{"type":"string","format":"date","description":"Engagement end date","example":"2024-04-30"},"status":{"type":"string","description":"Current engagement status","example":"EXECUTED"},"client_id":{"type":"integer","description":"Associated client identifier","example":420},"partner_staff_id":{"type":"integer","description":"Partner staff member assigned to engagement","example":53},"manager_staff_id":{"type":"integer","description":"Manager staff member assigned to engagement","example":15},"created_at":{"type":"string","format":"date-time","description":"Engagement record creation timestamp","example":"2024-03-14T10:58:38.605333+00:00"},"updated_at":{"type":"string","format":"date-time","description":"Engagement record last update timestamp","example":"2024-07-27T00:08:05.822177+00:00"},"engagement_name_template":{"type":"string","description":"Template used to generate engagement name","example":"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}"},"client":{"type":"object","nullable":true,"description":"Associated client details","properties":{"id":{"type":"integer","example":420},"name":{"type":"string","example":"TechFlow Enterprises"},"number":{"type":"string","example":"52150"}}},"partnerStaff":{"type":"object","nullable":true,"description":"Partner staff member details","properties":{"id":{"type":"integer","example":53},"firstName":{"type":"string","example":"Robert"},"lastName":{"type":"string","example":"Johnson"},"email":{"type":"string","example":"r.johnson@company.com"}}},"managerStaff":{"type":"object","nullable":true,"description":"Manager staff member details","properties":{"id":{"type":"integer","example":15},"firstName":{"type":"string","example":"Sarah"},"lastName":{"type":"string","example":"Martinez"},"email":{"type":"string","example":"s.martinez@company.com"}}}}}},"deid_engagement_aggregate":{"type":"object","properties":{"aggregate":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of engagement records matching criteria","example":1}}}}}}},"id":"schema_196"},"schema_197":{"kind":"json-schema","data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1,"description":"Maximum number of engagements to return","example":1},"where":{"type":"object","description":"GraphQL-style where clause for complex filtering","example":{"_and":[{"_or":[{"name":{"_ilike":"%review%"}},{"engagementNameTemplate":{"_ilike":"%tax%"}}]},{"status":{"_in":["ACTIVE","EXECUTED"]}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"partnerStaffId":{"_in":[5,6,7,8]}}]}},"orderBy":{"type":"array","items":{"type":"object"},"description":"Dynamic ordering specifications","example":[{"name":"asc"},{"createdAt":"desc"}]}}},"id":"schema_197"},"schema_198":{"kind":"json-schema","data":{"type":"object","properties":{"engagements":{"type":"array","items":{"$ref":"#/components/schemas/Engagement"}},"totalCount":{"type":"integer","description":"Total number of engagements matching the filters","example":100}}},"id":"schema_198"},"schema_199":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","description":"Unique engagement identifier","example":34567},"name":{"type":"string","description":"Engagement name","example":"Annual Audit Engagement 2024"},"description":{"type":"string","description":"Detailed engagement description","example":"Comprehensive annual audit engagement including financial statements, tax preparation, and compliance review"},"status":{"type":"string","description":"Engagement status","enum":["PLANNING","ACTIVE","ON_HOLD","COMPLETED","CANCELLED"],"example":"ACTIVE"},"type":{"type":"string","description":"Engagement type","enum":["AUDIT","REVIEW","COMPILATION","TAX","CONSULTING","ADVISORY"],"example":"AUDIT"},"clientId":{"type":"integer","description":"Associated client identifier","example":789},"clientName":{"type":"string","description":"Client name","example":"Acme Corporation"},"clientEmail":{"type":"string","description":"Primary client contact email","example":"finance@acme.com"},"clientPhone":{"type":"string","description":"Primary client contact phone","example":"+1-555-0123"},"startDate":{"type":"string","format":"date-time","description":"Engagement start date","example":"2024-01-01T00:00:00Z"},"endDate":{"type":"string","format":"date-time","description":"Engagement end date","example":"2024-12-31T23:59:59Z"},"estimatedValue":{"type":"number","format":"decimal","description":"Estimated engagement value","example":50000},"currency":{"type":"string","description":"Engagement currency code","example":"USD"},"projects":{"type":"array","description":"Projects within this engagement","items":{"type":"object","properties":{"id":{"type":"integer","description":"Project identifier","example":67890},"name":{"type":"string","description":"Project name","example":"Q4 Financial Audit"},"status":{"type":"string","description":"Project status","enum":["PLANNING","IN_PROGRESS","ON_HOLD","COMPLETED","CANCELLED"],"example":"IN_PROGRESS"},"budget":{"type":"number","format":"decimal","description":"Project budget","example":25000}}}},"teamMembers":{"type":"array","description":"Team members assigned to the engagement","items":{"type":"object","properties":{"staffId":{"type":"integer","description":"Staff member identifier","example":123},"name":{"type":"string","description":"Staff member name","example":"John Smith"},"role":{"type":"string","description":"Role on the engagement","enum":["ENGAGEMENT_PARTNER","SENIOR_MANAGER","MANAGER","SENIOR_AUDITOR","AUDITOR","ASSOCIATE"],"example":"ENGAGEMENT_PARTNER"},"allocation":{"type":"number","format":"decimal","description":"Time allocation percentage (0.0 to 1.0)","example":0.3}}}},"billingTerms":{"type":"object","description":"Billing terms and arrangements","properties":{"billingFrequency":{"type":"string","description":"Billing frequency","enum":["WEEKLY","MONTHLY","QUARTERLY","UPON_COMPLETION"],"example":"MONTHLY"},"paymentTerms":{"type":"string","description":"Payment terms","enum":["NET_15","NET_30","NET_45","NET_60"],"example":"NET_30"},"rateType":{"type":"string","description":"Rate type","enum":["HOURLY","FIXED","PERCENTAGE"],"example":"HOURLY"},"defaultRate":{"type":"number","format":"decimal","description":"Default hourly rate","example":250}}},"notes":{"type":"string","description":"Additional notes or terms","example":"Annual engagement with quarterly reviews and monthly billing"},"createdAt":{"type":"string","format":"date-time","description":"Engagement creation timestamp","example":"2023-12-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-11-20T14:30:00Z"}}},"id":"schema_199"},"schema_200":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Engagement not found"},"message":{"type":"string","example":"Engagement with ID 34567 does not exist"}}},"id":"schema_200"},"schema_201":{"kind":"json-schema","data":{"type":"object","properties":{"clientId":{"type":"integer","format":"int64","description":"ID of the primary client for this engagement","nullable":true,"example":789},"fiscalYear":{"type":"integer","format":"int32","description":"Fiscal year of the engagement","nullable":true,"example":2025},"partnerStaffId":{"type":"integer","format":"int64","description":"ID of the partner staff member assigned to the engagement","nullable":true,"example":456},"managerStaffId":{"type":"integer","format":"int64","description":"ID of the manager staff member assigned to the engagement","nullable":true,"example":457},"primaryContactId":{"type":"integer","format":"int64","description":"ID of the primary contact for this engagement","nullable":true,"example":101},"secondaryContactId":{"type":"integer","format":"int64","description":"ID of the secondary contact for this engagement","nullable":true,"example":102},"startDate":{"type":"string","format":"date","description":"Engagement start date (YYYY-MM-DD)","nullable":true,"example":"2025-01-01"},"endDate":{"type":"string","format":"date","description":"Engagement end date (YYYY-MM-DD)","nullable":true,"example":"2025-12-31"},"billingContactId":{"type":"integer","format":"int64","description":"ID of the billing contact for this engagement","nullable":true,"example":103},"ccStaffIds":{"type":"array","items":{"type":"integer","format":"int64"},"description":"IDs of staff members to CC on engagement communications","nullable":true,"example":[458,459]},"engagementLetterTemplateId":{"type":"integer","format":"int64","description":"ID of the engagement letter template to use","nullable":true,"example":55},"documentTemplateId":{"type":"integer","format":"int64","description":"ID of the document template to use","nullable":true,"example":66},"engagementNameTemplate":{"type":"string","description":"Template string used to generate the engagement name","nullable":true,"example":"{clientName} {fiscalYear} Audit"},"additionalClientIds":{"type":"array","items":{"type":"integer","format":"int64"},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"IDs of additional clients to associate with this engagement."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When provided, "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"replaces"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" all existing additional client associations."},"children":[]}]}]}],"nullable":true,"example":[790,791]},"jobIds":{"type":"array","items":{"type":"integer","format":"int64"},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"IDs of jobs (projects) to link to this engagement."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When provided, "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"replaces"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" all existing job links."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"additionalClientIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is omitted when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is provided, existing additional"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"clients are preserved."},"children":[]}]}]}],"nullable":true,"example":[101,102]}}},"id":"schema_201"},"schema_202":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"ID of the updated engagement","example":12345}}},"id":"schema_202"},"schema_203":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Invalid additional client IDs: 999999, 999998"}}},"id":"schema_203"},"schema_204":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","example":"Engagement not found: 12345"}}},"id":"schema_204"},"schema_205":{"kind":"json-schema","data":{"type":"object","required":["clientId","fiscalYear","partnerStaffId","managerStaffId","primaryContactId"],"properties":{"clientId":{"type":"integer","format":"int64","description":"Unique identifier of the client for this engagement","example":420},"fiscalYear":{"type":"integer","description":"Fiscal year of the engagement","example":2024},"partnerStaffId":{"type":"integer","format":"int64","description":"Unique identifier of the partner staff member","example":53},"managerStaffId":{"type":"integer","format":"int64","description":"Unique identifier of the manager staff member","example":15},"primaryContactId":{"type":"integer","format":"int64","description":"Unique identifier of the primary client contact","example":101},"secondaryContactId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the secondary client contact","example":102},"billingContactId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the billing contact","example":103},"engagementLetterTemplateId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the engagement letter template to use","example":5},"documentTemplateId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the document template to use","example":7},"engagementNameTemplate":{"type":"string","nullable":true,"description":"Template string used to generate the engagement name. Overrides the firm's default naming template.\n","example":"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}"},"startDate":{"type":"string","format":"date","nullable":true,"description":"Engagement start date (YYYY-MM-DD)","example":"2024-01-01"},"endDate":{"type":"string","format":"date","nullable":true,"description":"Engagement end date (YYYY-MM-DD)","example":"2024-12-31"},"ccStaffIds":{"type":"array","nullable":true,"description":"List of staff member IDs to CC on the engagement","items":{"type":"integer","format":"int64"},"example":[20,21]},"additionalClientIds":{"type":"array","nullable":true,"description":"IDs of additional clients to associate with the engagement","items":{"type":"integer","format":"int64"},"example":[790,791]},"jobIds":{"type":"array","nullable":true,"description":"IDs of jobs (projects) to link to this engagement","items":{"type":"integer","format":"int64"},"example":[101,102]},"additionalDocuments":{"type":"array","nullable":true,"description":"Extra documents to attach to the engagement","items":{"type":"object","required":["documentTemplateId","documentType"],"properties":{"documentTemplateId":{"type":"integer","format":"int64","description":"Unique identifier of the document template","example":12},"documentType":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Type of the document (e.g. ENGAGEMENT_LETTER, ADDITIONAL_DOCUMENT)"},"children":[]}]}]}],"example":"ADDITIONAL_DOCUMENT"}}}}}},"id":"schema_205"},"schema_206":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the newly created engagement","example":34567}}},"id":"schema_206"},"schema_207":{"kind":"json-schema","data":{"type":"object","required":["batchEngagements"],"properties":{"name":{"type":"string","nullable":true,"description":"Optional label for the batch","example":"2024 Annual Batch"},"projectTemplateId":{"type":"integer","format":"int64","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Project template ID to apply to every engagement in the batch. Cannot be combined with per-engagement "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectIds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":10},"includeAdditionalClients":{"type":"boolean","default":false,"description":"Whether to include additional clients when creating engagements","example":false},"batchEngagements":{"type":"array","description":"List of engagement records to create","items":{"type":"object","required":["clientId","fiscalYear","primaryContactId"],"properties":{"clientId":{"type":"integer","format":"int64","description":"Unique identifier of the client","example":420},"fiscalYear":{"type":"integer","description":"Fiscal year of the engagement","example":2024},"primaryContactId":{"type":"integer","format":"int64","description":"Unique identifier of the primary client contact","example":101},"partnerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the partner staff member","example":53},"managerStaffId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the manager staff member","example":15},"secondaryContactId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the secondary client contact","example":102},"billingContactId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the billing contact","example":103},"engagementLetterTemplateId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the engagement letter template to use","example":5},"documentTemplateId":{"type":"integer","format":"int64","nullable":true,"description":"Unique identifier of the document template to use","example":7},"engagementNameTemplate":{"type":"string","nullable":true,"description":"Template string used to generate the engagement name. Overrides the firm's default naming template.\n","example":"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}"},"startDate":{"type":"string","format":"date","nullable":true,"description":"Engagement start date (YYYY-MM-DD)","example":"2024-01-01"},"endDate":{"type":"string","format":"date","nullable":true,"description":"Engagement end date (YYYY-MM-DD)","example":"2024-12-31"},"ccStaffIds":{"type":"array","nullable":true,"description":"List of staff member IDs to CC on the engagement","items":{"type":"integer","format":"int64"},"example":[20,21]},"projectIds":{"type":"array","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List of project IDs to associate with this engagement. Cannot be used when a top-level "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projectTemplateId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is provided."},"children":[]}]}]}],"items":{"type":"integer","format":"int64"},"example":[301,302]}}}}}},"id":"schema_207"},"schema_208":{"kind":"json-schema","data":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the created engagement batch","example":9001}}},"id":"schema_208"},"schema_209":{"kind":"json-schema","data":{"type":"object","properties":{"batchId":{"type":"integer","format":"int64","description":"Unique identifier of the engagement batch","example":9001},"status":{"type":"string","description":"Current processing status of the batch","enum":["DRAFT","CREATING","CREATED","CANCELED"],"example":"CREATED"},"engagementIds":{"type":"array","description":"IDs of engagements created by this batch","items":{"type":"integer","format":"int64"},"example":[34567,34568]}}},"id":"schema_209"},"schema_210":{"kind":"json-schema","data":{"type":"object","properties":{"engagementDocuments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique engagement document identifier","example":101},"fileId":{"type":"integer","description":"Associated file identifier","example":5001},"engagementId":{"type":"integer","description":"Associated engagement identifier","example":34567},"engagementDocumentTypeId":{"type":"integer","description":"Document type identifier","example":2},"is_active":{"type":"boolean","description":"Whether this document record is active","example":true},"clientFacing":{"type":"boolean","description":"Whether the document is visible to the client","example":true},"blocksExecution":{"type":"boolean","description":"Whether this document must be signed before the engagement executes","example":true},"signatureRequirementType":{"type":"string","description":"Signature requirement mode","enum":["ALL_SIGNATURES_REQUIRED","ONE_SIGNATURE_REQUIRED"],"example":"ALL_SIGNATURES_REQUIRED"},"createdAt":{"type":"string","format":"date-time","description":"Record creation timestamp","example":"2024-01-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"Record last updated timestamp","example":"2024-03-20T14:30:00Z"},"affirmativeStatus":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Consent acceptance status of the document. NEGATIVE = one or more negative responses AFFIRMATIVE = all signers responded positively INDETERMINATE = at least one positive response but not all signers have responded yet"},"children":[]}]}]}],"enum":["NEGATIVE","AFFIRMATIVE","INDETERMINATE"],"example":"AFFIRMATIVE"},"documentType":{"type":"object","description":"The document type associated with this record","properties":{"id":{"type":"integer","description":"Document type identifier","example":2},"name":{"type":"string","description":"Document type name","example":"Consent Document"}}}}}}}},"id":"schema_210"},"schema_211":{"kind":"json-schema","data":{"type":"object","required":["records"],"properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Type"},"systemRef":{"type":"object","description":"Systemref"}}},"description":"Records"}}},"id":"schema_211"},"schema_212":{"kind":"json-schema","data":{"type":"object","required":["name","fields"],"properties":{"name":{"type":"string","description":"Name"},"displayName":{"type":"string","description":"Displayname","nullable":true},"description":{"type":"string","description":"Description","nullable":true},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name"},"displayName":{"type":"string","description":"Displayname","nullable":true},"type":{"type":"string","description":"Type"},"required":{"type":"boolean","description":"Required"},"nullable":{"type":"boolean","description":"Nullable"},"description":{"type":"string","description":"Description","nullable":true},"referencedEntityType":{"type":"string","description":"Referencedentitytype","nullable":true},"rank":{"type":"integer","format":"int32","description":"Rank","nullable":true}}},"description":"Fields"}}},"id":"schema_212"},"schema_213":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Id"},"name":{"type":"string","description":"Name"},"displayName":{"type":"string","description":"Displayname"},"description":{"type":"string","description":"Description","nullable":true},"isCustom":{"type":"boolean","description":"Iscustom"},"active":{"type":"boolean","description":"Active"},"fields":{"type":"array","items":{"type":"object"},"description":"Fields"},"recordsUrl":{"type":"string","description":"Recordsurl","nullable":true},"schemaUrl":{"type":"string","description":"Schemaurl"}}},"error":{"type":"object","nullable":true},"meta":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}}}},"id":"schema_213"},"schema_214":{"kind":"json-schema","data":{"type":"object","properties":{"displayName":{"type":"string","description":"Displayname","nullable":true},"description":{"type":"string","description":"Description","nullable":true},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name"},"displayName":{"type":"string","description":"Displayname","nullable":true},"type":{"type":"string","description":"Type"},"required":{"type":"boolean","description":"Required"},"nullable":{"type":"boolean","description":"Nullable"},"description":{"type":"string","description":"Description","nullable":true},"referencedEntityType":{"type":"string","description":"Referencedentitytype","nullable":true},"rank":{"type":"integer","format":"int32","description":"Rank","nullable":true}}},"description":"Fields","nullable":true},"active":{"type":"boolean","description":"Active","nullable":true}}},"id":"schema_214"},"schema_215":{"kind":"json-schema","data":{"type":"object","required":["entityType","operation","deliveryUrl"],"properties":{"entityType":{"type":"object","description":"Entitytype"},"operation":{"type":"object","description":"Operation"},"deliveryUrl":{"type":"string","description":"Deliveryurl"},"filterExpression":{"type":"string","description":"Filterexpression","nullable":true},"description":{"type":"string","description":"Description","nullable":true}}},"id":"schema_215"},"schema_216":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"subscription":{"type":"object","description":"Subscription"},"webhookSecret":{"type":"string","description":"Webhooksecret"},"webhookSecretInstructions":{"type":"string","description":"Webhooksecretinstructions"}}},"error":{"type":"object","nullable":true},"meta":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}}}},"id":"schema_216"},"schema_217":{"kind":"json-schema","data":{"type":"object","properties":{"entityType":{"type":"object","description":"Entitytype","nullable":true},"operation":{"type":"object","description":"Operation","nullable":true},"deliveryUrl":{"type":"string","description":"Deliveryurl","nullable":true},"filterExpression":{"type":"string","description":"Filterexpression","nullable":true},"description":{"type":"string","description":"Description","nullable":true},"active":{"type":"boolean","description":"Active","nullable":true}}},"id":"schema_217"},"schema_218":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Id"},"staffId":{"type":"integer","format":"int64","description":"Staffid","nullable":true},"entityType":{"type":"object","description":"Entitytype"},"operation":{"type":"object","description":"Operation"},"deliveryUrl":{"type":"string","description":"Deliveryurl"},"description":{"type":"string","description":"Description","nullable":true},"filterExpression":{"type":"string","description":"Filterexpression","nullable":true},"active":{"type":"boolean","description":"Active"},"status":{"type":"string","description":"Status"},"createdAt":{"type":"string","format":"date-time","description":"Createdat","nullable":true},"updatedAt":{"type":"string","format":"date-time","description":"Updatedat","nullable":true},"isInternal":{"type":"boolean","description":"Isinternal"}}},"error":{"type":"object","nullable":true},"meta":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}}}},"id":"schema_218"},"schema_219":{"kind":"json-schema","data":{"type":"object","properties":{"data":{"type":"object","properties":{"isValid":{"type":"boolean","description":"Isvalid"},"payload":{"type":"object","description":"Payload"},"signature":{"type":"string","description":"Signature"},"secret":{"type":"string","description":"Secret"}}},"error":{"type":"object","nullable":true},"meta":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}}}},"id":"schema_219"}},"exampleStore":{"paths/~1gql~1v1~1clients/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1clients/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/successful_response":{"value":{"clients":[{"id":1001,"pmsRef":"8842","clientRef":"45123","name":"Sarah Johnson","clientKey":"000000045123                              f","active":true,"createdAt":"2024-03-15T10:30:22.488054+00:00","updatedAt":"2024-07-20T14:22:10.817274+00:00","clientContactInfo":{"id":7001,"firstName":"Sarah","lastName":"Johnson","email":"sarah.johnson@techcorp.com","phone":"555-0123","address":"123 Business Plaza","city":"San Francisco","state":"CA","zip_code":"94105"},"partnerStaff":{"id":101,"firstName":"Michael","lastName":"Chen","email":"m.chen@company.com"},"managerStaff":{"id":102,"firstName":"Lisa","lastName":"Rodriguez","email":"l.rodriguez@company.com"}},{"id":1002,"pmsRef":"8843","clientRef":"45124","name":"DataFlow Solutions Inc","clientKey":"000000045124                              f","active":true,"createdAt":"2024-03-16T09:15:33.660145+00:00","updatedAt":"2024-07-20T14:22:10.817274+00:00","clientContactInfo":{"id":7002,"firstName":"Robert","lastName":"Kim","email":"r.kim@dataflow.io","phone":"555-0124","address":"456 Innovation Drive","city":"Austin","state":"TX","zip_code":"73301"},"partnerStaff":{"id":103,"firstName":"Jennifer","lastName":"Park","email":"j.park@company.com"},"managerStaff":{"id":104,"firstName":"David","lastName":"Thompson","email":"d.thompson@company.com"}},{"id":1003,"pmsRef":"8844","clientRef":"45125","name":"Green Energy Partners","clientKey":"000000045125                              f","active":true,"createdAt":"2024-03-17T11:45:11.410185+00:00","updatedAt":"2024-03-17T11:45:11.410185+00:00","clientContactInfo":null,"partnerStaff":{"id":105,"firstName":"Amanda","lastName":"Williams","email":"a.williams@company.com"},"managerStaff":{"id":105,"firstName":"Amanda","lastName":"Williams","email":"a.williams@company.com"}},{"id":1004,"pmsRef":"8845","clientRef":"45126","name":"Metro Healthcare Systems","clientKey":"000000045126                              f","active":true,"createdAt":"2024-03-18T08:20:14.232691+00:00","updatedAt":"2024-07-20T14:22:10.817274+00:00","clientContactInfo":{"id":7004,"firstName":"Dr. Elena","lastName":"Martinez","email":"e.martinez@metrohealthcare.com","phone":"555-0126","address":"789 Medical Center Blvd","city":"Denver","state":"CO","zip_code":"80202"},"partnerStaff":{"id":106,"firstName":"Ryan","lastName":"O'Connor","email":"r.oconnor@company.com"},"managerStaff":{"id":107,"firstName":"Maria","lastName":"Gonzalez","email":"m.gonzalez@company.com"}},{"id":1005,"pmsRef":"8846","clientRef":"45127","name":"Pacific Manufacturing Co","clientKey":"000000045127                              f","active":true,"createdAt":"2024-03-19T13:12:52.495590+00:00","updatedAt":"2024-07-20T14:22:10.817274+00:00","clientContactInfo":{"id":7005,"firstName":"James","lastName":"Wu","email":"j.wu@pacificmfg.com","phone":"555-0127","address":"321 Industrial Way","city":"Seattle","state":"WA","zip_code":"98101"},"partnerStaff":{"id":108,"firstName":"Nicole","lastName":"Brown","email":"n.brown@company.com"},"managerStaff":{"id":109,"firstName":"Kevin","lastName":"Davis","email":"k.davis@company.com"}}],"total":{"aggregate":{"count":13697}}},"key":"successful_response","summary":"Typical response with client data","id":"paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/empty_response":{"value":{"clients":[],"total":{"aggregate":{"count":0}}},"key":"empty_response","summary":"Empty result set","id":"paths/~1gql~1v1~1clients/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/invalid_page_size":{"value":{"error":"pageSize must be between 1 and 1000","code":"INVALID_PARAMETER"},"key":"invalid_page_size","summary":"Invalid pageSize parameter","id":"paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/invalid_page_size"},"paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/negative_page":{"value":{"error":"page must be non-negative","code":"INVALID_PARAMETER"},"key":"negative_page","summary":"Negative page","id":"paths/~1gql~1v1~1clients/post/responses/400/content/application~1json/examples/negative_page"},"paths/~1gql~1v1~1clients~1search/post/requestBody/content/application~1json/examples/default_search":{"value":{"pageSize":1,"where":{"_and":[{"_or":[{"name":{"_ilike":"%tech%"}},{"clientRef":{"_ilike":"%45%"}}]},{"active":{"_eq":true}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"partnerStaffId":{"_in":[5,6,7,8]}}]},"orderBy":[{"name":"asc"},{"createdAt":"desc"}]},"key":"default_search","summary":"Default search with filtering","id":"paths/~1gql~1v1~1clients~1search/post/requestBody/content/application~1json/examples/default_search"},"paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/successful_response":{"value":{"clients":[{"id":3001,"pmsRef":"1650","clientRef":"48250","name":"TechFlow Enterprises","clientKey":"000000048250                              f","active":true,"partnerStaffId":6,"managerStaffId":25,"createdAt":"2024-05-12T22:43:57.189235+00:00","updatedAt":"2024-05-12T22:43:57.189235+00:00","clientContactInfo":{"id":2850,"firstName":"Jennifer","lastName":"Martinez","email":"jennifer@techflow.com","phone":"555-0123","address":"123 Business Plaza","city":"San Francisco","state":"CA","zip_code":"94105"},"partnerStaff":{"id":6,"firstName":"Robert","lastName":"Chen","email":"robert.chen@company.com"},"managerStaff":{"id":25,"firstName":"Sarah","lastName":"Johnson","email":"sarah.johnson@company.com"}},{"id":3002,"pmsRef":"1651","clientRef":"48251","name":"DataSolutions Corp","clientKey":"000000048251                              f","active":true,"partnerStaffId":7,"managerStaffId":26,"createdAt":"2024-05-11T15:22:45.123456+00:00","updatedAt":"2024-05-11T15:22:45.123456+00:00","clientContactInfo":{"id":2851,"firstName":"Michael","lastName":"Davis","email":"michael@datasolutions.com","phone":"555-0124","address":"456 Tech Center","city":"Austin","state":"TX","zip_code":"73301"},"partnerStaff":{"id":7,"firstName":"Lisa","lastName":"Wong","email":"lisa.wong@company.com"},"managerStaff":{"id":26,"firstName":"David","lastName":"Thompson","email":"david.thompson@company.com"}}],"total":{"aggregate":{"count":59}}},"key":"successful_response","summary":"Filtered clients with dynamic ordering and relationships","id":"paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/real_api_response":{"value":{"clients":[{"id":2576,"pmsRef":"1403","clientRef":"45985","name":"Adan Kozey","clientKey":"000000045985                              f","active":true,"partnerStaffId":6,"managerStaffId":25,"createdAt":"2023-05-12T22:43:57.189235+00:00","updatedAt":"2023-05-12T22:43:57.189235+00:00","clientContactInfo":{"id":2622,"firstName":null,"lastName":null,"email":null,"phone":null,"address":"995 Arron Lights","city":"New Corrine","state":"MT","zip_code":"71951"},"partnerStaff":{"id":6,"firstName":"Erline","lastName":"Ruecker","email":"joel.walker@hotmail.com"},"managerStaff":{"id":25,"firstName":"Ada","lastName":"Kovacek","email":"norbert.ruecker@yahoo.com"}}],"total":{"aggregate":{"count":59}}},"key":"real_api_response","summary":"Sample from actual API response","id":"paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/real_api_response"},"paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/empty_response":{"value":{"clients":[],"total":{"aggregate":{"count":0}}},"key":"empty_response","summary":"No clients match filter criteria","id":"paths/~1gql~1v1~1clients~1search/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_where_clause":{"value":{"error":"Invalid where clause structure: missing operator in condition","code":"INVALID_WHERE_CLAUSE"},"key":"invalid_where_clause","summary":"Malformed where clause","id":"paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_where_clause"},"paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_order_by":{"value":{"error":"Invalid orderBy field or direction specified","code":"INVALID_ORDER_BY"},"key":"invalid_order_by","summary":"Invalid ordering specification","id":"paths/~1gql~1v1~1clients~1search/post/responses/400/content/application~1json/examples/invalid_order_by"},"paths/~1gql~1v1~1clients~1search/post/responses/401/content/application~1json/examples/missing_auth":{"value":{"error":"x-hasura-admin-secret header is required","code":"MISSING_AUTH_HEADER"},"key":"missing_auth","summary":"Missing authentication header","id":"paths/~1gql~1v1~1clients~1search/post/responses/401/content/application~1json/examples/missing_auth"},"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/new_contact_inline":{"value":{"name":"Acme Corporation","pmsRef":"ACME-001","clientRef":"ACME-001","officeId":1,"prefContact":{"pmsRef":"CONT-001","contactInfo":{"pmsRef":"CONT-001","firstName":"Jane","lastName":"Smith","email":"jane.smith@acme.com"}},"address":{"address":"123 Main St","address2":"Suite 400","city":"Charlotte","state":"NC","country":"US","zipCode":"28202"}},"key":"new_contact_inline","summary":"New client with inline preferred contact and client address","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/new_contact_inline"},"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/existing_contact":{"value":{"name":"Beta Industries","pmsRef":"BETA-002","clientRef":"BETA-002","officeId":1,"prefContact":{"id":501},"billingContact":{"id":502}},"key":"existing_contact","summary":"New client linking to existing contacts","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/existing_contact"},"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/minimal":{"value":{"name":"Gamma LLC","pmsRef":"GAMMA-003","clientRef":"GAMMA-003","officeId":1},"key":"minimal","summary":"Minimal required fields only","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/minimal"},"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/crm_integration_fields":{"value":{"name":"Redw Client","pmsRef":"REDW-100","clientRef":"REDW-100","officeId":1,"clientTypeId":7,"clientBusinessEntityId":4,"staffBillingManagerId":22,"fiscalYearEndMonth":12,"fiscalYearEndDay":31,"customFieldValuesJson":"{\"industry_niche\":\"Manufacturing\",\"naics_code\":\"333120\"}","taxRegionIds":[3,7]},"key":"crm_integration_fields","summary":"Client with classification, fiscal year end, custom fields, and tax regions","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/crm_integration_fields"},"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/with_addresses":{"value":{"name":"Delta Partners","pmsRef":"DELTA-004","clientRef":"DELTA-004","officeId":1,"address":{"address":"123 Main St","address2":"Suite 400","city":"Charlotte","state":"North Carolina","country":"us","zipCode":"28202"},"billingAddress":{"pmsRef":"DELTA-004-BILLING","address":"PO Box 999","city":"Raleigh","state":"NC","country":"US","zipCode":"27601"}},"key":"with_addresses","summary":"Client with its own address and a separate billing address","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/requestBody/content/application~1json/examples/with_addresses"},"paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success":{"value":{"success":true,"message":"Client onboarded successfully","data":{"client":{"id":1001,"pmsRef":"ACME-001","clientRef":"ACME-001","name":"Acme Corporation","officeId":1,"active":true,"status":"ACTIVE","version":1,"createdAt":"2024-03-15T10:00:00Z","updatedAt":"2024-03-15T10:00:00Z"},"prefContactId":601,"billingContactId":null,"secondaryContactId":null,"clientContactInfoId":44489,"billingAddressId":null,"taxRegionIds":[],"ignoredCustomFields":[]}},"key":"success","summary":"Client onboarded with a new preferred contact and client address","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success"},"paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_addresses":{"value":{"success":true,"message":"Client onboarded successfully","data":{"client":{"id":1003,"pmsRef":"DELTA-004","clientRef":"DELTA-004","name":"Delta Partners","officeId":1,"active":true,"status":"ACTIVE","version":1,"createdAt":"2024-03-15T10:00:00Z","updatedAt":"2024-03-15T10:00:00Z"},"prefContactId":null,"billingContactId":null,"secondaryContactId":null,"clientContactInfoId":44489,"billingAddressId":211,"taxRegionIds":[],"ignoredCustomFields":[]}},"key":"success_with_addresses","summary":"Onboarded with a client address and a billing address","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_addresses"},"paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_ignored_custom_fields":{"value":{"success":true,"message":"Client onboarded successfully; ignored unknown custom fields: naics_cod","data":{"client":{"id":1002,"pmsRef":"REDW-100","clientRef":"REDW-100","name":"Redw Client","officeId":1,"clientTypeId":7,"clientBusinessEntityId":4,"staffBillingManagerId":22,"fiscalYearEndMonth":12,"fiscalYearEndDay":31,"customFieldValuesJson":"{\"industry_niche\":\"Manufacturing\"}","active":true,"status":"ACTIVE","version":1,"createdAt":"2024-03-15T10:00:00Z","updatedAt":"2024-03-15T10:00:00Z"},"prefContactId":null,"billingContactId":null,"secondaryContactId":null,"clientContactInfoId":null,"billingAddressId":null,"taxRegionIds":[3,7],"ignoredCustomFields":["naics_cod"]}},"key":"success_with_ignored_custom_fields","summary":"Onboarded with tax regions; an unknown custom field key was dropped","id":"paths/~1api~1v1~1clients~1v1~1onboard/post/responses/201/content/application~1json/examples/success_with_ignored_custom_fields"},"paths/~1gql~1v1~1client_types/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1client_types/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1client_types/post/responses/200/content/application~1json/examples/sample":{"value":{"clientTypes":[{"id":2,"name":"Corporation","active":true,"is_business":true,"pms_ref":"CORP","created_at":"2025-01-02T03:04:05Z","updated_at":"2025-01-02T03:04:05Z"}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1client_types/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1tax_regions/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1tax_regions/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1tax_regions/post/responses/200/content/application~1json/examples/sample":{"value":{"taxRegions":[{"id":10,"name":"California","active":true,"description":"California state sales tax","tax_percentage":7.25,"type":"STATE","created_at":"2025-01-02T03:04:05Z","updated_at":"2025-01-02T03:04:05Z"}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1tax_regions/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1client_groups/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1client_groups/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/successful_response":{"value":{"clientGroups":[{"id":10,"name":"Acme Corp Group","pmsRef":"GRP-001","active":true,"isManagedByAiwyn":false,"partnerStaffId":101,"managerStaffId":102,"officeId":5,"createdAt":"2024-01-15T10:00:00.000000+00:00","updatedAt":"2024-06-20T14:30:00.000000+00:00","version":3,"partnerStaff":{"id":101,"firstName":"Michael","lastName":"Chen","email":"m.chen@company.com"},"managerStaff":{"id":102,"firstName":"Lisa","lastName":"Rodriguez","email":"l.rodriguez@company.com"},"office":{"id":5,"pmsRef":"OFF-5","name":"San Francisco"}},{"id":11,"name":"Beta Industries Group","pmsRef":"GRP-002","active":true,"isManagedByAiwyn":true,"partnerStaffId":103,"managerStaffId":null,"officeId":null,"createdAt":"2024-02-10T08:00:00.000000+00:00","updatedAt":"2024-02-10T08:00:00.000000+00:00","version":1,"partnerStaff":{"id":103,"firstName":"Jennifer","lastName":"Park","email":"j.park@company.com"},"managerStaff":null,"office":null}],"total":{"aggregate":{"count":142}}},"key":"successful_response","summary":"Typical response with client group data","id":"paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/empty_response":{"value":{"clientGroups":[],"total":{"aggregate":{"count":0}}},"key":"empty_response","summary":"Empty result set","id":"paths/~1gql~1v1~1client_groups/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1contacts/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1contacts/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/responses/200/content/application~1json/examples/success":{"value":{"contacts":[{"contact_id":23456,"client_id":789,"active":true,"relationship":"PRIMARY","receives_invoice":true,"receives_statement":false,"receives_payment_confirmation":true,"contact":{"id":23456,"pms_ref":"PMS-001","active":true,"type":"CLIENT_CONTACT","fwd_email_confirmation":true,"contact_info":{"id":5678,"salutation":"Mr.","firstName":"John","lastName":"Smith","email":"john.smith@acme.com","phone":"+1-555-0123","address":"123 Business Ave","address2":"Suite 400","city":"New York","state":"NY","country":"USA","zip_code":"10001","active":true}}},{"contact_id":23457,"client_id":789,"active":true,"relationship":"BILLING","receives_invoice":true,"receives_statement":true,"receives_payment_confirmation":false,"contact":{"id":23457,"pms_ref":"PMS-002","active":true,"type":"CLIENT_CONTACT","fwd_email_confirmation":false,"contact_info":{"id":5679,"salutation":"Ms.","firstName":"Jane","lastName":"Taylor","email":"jane.taylor@acme.com","phone":"+1-555-0456","address":"123 Business Ave","address2":null,"city":"New York","state":"NY","country":"USA","zip_code":"10001","active":true}}}]},"key":"success","summary":"Two active contacts for client 789","id":"paths/~1gql~1v1~1contacts~1by_client~1{clientId}/get/responses/200/content/application~1json/examples/success"},"paths/~1gql~1v1~1client_business_entities/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1client_business_entities/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1client_business_entities/post/responses/200/content/application~1json/examples/sample":{"value":{"clientBusinessEntities":[{"id":101,"name":"Tax","active":true,"clientBusinessEntityType":"TAX","ref":"TAX","sysRefs":{},"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1client_business_entities/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1contact_clients/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1contact_clients/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1contact_clients/post/responses/200/content/application~1json/examples/sample":{"value":{"contactClients":[{"id":9001,"pms_ref":"CC-10001","active":true,"client_id":1001,"contact_id":2001,"relationship":"OWNER","receives_invoice":true,"receives_statement":true,"receives_payment_confirmation":false,"sys_refs":{},"created_at":"2025-01-02T03:04:05Z","updated_at":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1contact_clients/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1contact_infos/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1contact_infos/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1contact_infos/post/responses/200/content/application~1json/examples/sample":{"value":{"contactInfos":[{"id":3001,"pms_ref":"CI-3001","active":true,"salutation":"Ms.","firstName":"Asha","lastName":"Patel","email":"asha.patel@example.com","phone":"555-0101","address":"123 Main St","address2":"Suite 400","city":"Austin","state":"TX","country":"US","zip_code":"78701","created_at":"2025-01-02T03:04:05Z","updated_at":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1contact_infos/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1departments/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1departments/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1departments/post/responses/200/content/application~1json/examples/sample":{"value":{"departments":[{"id":7,"pmsRef":"DEPT-7","name":"Tax","active":true,"isCreatedByAiwyn":true,"isManagedByAiwyn":true,"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1departments/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1industries/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1industries/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1industries/post/responses/200/content/application~1json/examples/sample":{"value":{"industries":[{"id":55,"name":"Healthcare","active":true,"industryType":"NAICS","ref":"HC","sysRefs":{},"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1industries/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1jobs/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1jobs/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1jobs/post/responses/200/content/application~1json/examples/sample":{"value":{"jobs":[{"id":5012,"pmsRef":"JOB-5012","jobRef":"J-0005012","name":"Q1 Financial Review 2025","status":"ACTIVE","isActive":true,"clientId":1001,"deptId":7,"officeId":2,"jobTemplateId":300,"managerStaffId":102,"partnerStaffId":101,"sysRefs":{},"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-03T10:11:12Z","version":3}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1jobs/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1job~1{id}/get/responses/200/content/application~1json/examples/sample":{"value":{"job":[{"id":5012,"pmsRef":"JOB-5012","jobRef":"J-0005012","name":"Q1 Financial Review 2025","status":"ACTIVE","isActive":true,"clientId":1001,"deptId":7,"officeId":2,"jobTemplateId":300,"managerStaffId":102,"partnerStaffId":101,"startDate":"2025-01-01T00:00:00Z","endDate":"2025-03-31T23:59:59Z","dueDate":"2025-03-31T23:59:59Z","targetStartDate":"2025-01-01T00:00:00Z","targetEndDate":"2025-03-31T23:59:59Z","feeStructureId":42,"feeStructureV4":{"id":42,"type":"FIXED","amount":5000,"active":true},"sysRefs":{},"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-03T10:11:12Z","version":3}]},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1job~1{id}/get/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1job_templates/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1job_templates/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1job_templates/post/responses/200/content/application~1json/examples/sample":{"value":{"jobTemplates":[{"id":300,"pmsRef":"JT-300","ref":"1040","name":"Individual Tax Return","active":true,"serviceLineId":10,"isCreatedByAiwyn":true,"isManagedByAiwyn":true,"sysRefs":{},"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1job_templates/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1offices/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1offices/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1offices/post/responses/200/content/application~1json/examples/sample":{"value":{"offices":[{"id":2,"pmsRef":"OFF-2","name":"Austin - Downtown","active":true,"city":"Austin","stateProvince":"TX","country":"US","zip":"78701","isCreatedByAiwyn":true,"isManagedByAiwyn":true,"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1offices/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1orgs/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1orgs/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1orgs/post/responses/200/content/application~1json/examples/sample":{"value":{"orgs":[{"id":1,"pmsRef":"ORG-1","name":"Acme Accounting","active":true,"defaultBillingDay":15,"isDefault":true,"isCreatedByAiwyn":true,"isManagedByAiwyn":true,"createdAt":"2025-01-02T03:04:05Z","updatedAt":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1orgs/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1service_lines/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":50,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1service_lines/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1service_lines/post/responses/200/content/application~1json/examples/sample":{"value":{"serviceLines":[{"id":10,"pms_ref":"SL-10","name":"Tax","active":true,"charge_admin_fee":false,"created_at":"2025-01-02T03:04:05Z","updated_at":"2025-01-02T03:04:05Z","version":1}],"total":{"aggregate":{"count":1}}},"key":"sample","summary":"Sample response","id":"paths/~1gql~1v1~1service_lines/post/responses/200/content/application~1json/examples/sample"},"paths/~1gql~1v1~1staff/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1staff/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/successful_response":{"value":{"deid_staff":[{"id":202,"pmsRef":"2254","firstName":"Holley","lastName":"Abbott","email":"ena.toy@hotmail.com","active":true,"deptId":8,"jobTitle":null,"type":null,"officeId":2,"staffManagerId":null},{"id":203,"pmsRef":"2255","firstName":"Michael","lastName":"Chen","email":"michael.chen@company.com","active":true,"deptId":7,"jobTitle":"Senior Developer","type":"Full-time","officeId":1,"staffManagerId":202},{"id":204,"pmsRef":"2256","firstName":"Lisa","lastName":"Martinez","email":"lisa.martinez@company.com","active":false,"deptId":9,"jobTitle":null,"type":null,"officeId":3,"staffManagerId":null}],"deid_staff_aggregate":{"aggregate":{"count":138}}},"key":"successful_response","summary":"Staff directory with department and type information","id":"paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/real_api_response":{"value":{"deid_staff":[{"id":244,"pmsRef":"2426","firstName":"Lacy","lastName":"Armstrong","email":"danial.hills@yahoo.com","active":true,"deptId":7,"jobTitle":"Analyst","type":"Part-time","officeId":2,"staffManagerId":202},{"id":267,"pmsRef":"2485","firstName":"Marion","lastName":"Auer","email":"sammy.heathcote@gmail.com","active":true,"deptId":7,"jobTitle":null,"type":null,"officeId":1,"staffManagerId":null}],"deid_staff_aggregate":{"aggregate":{"count":138}}},"key":"real_api_response","summary":"Sample from actual API response","id":"paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/real_api_response"},"paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/empty_response":{"value":{"deid_staff":[],"deid_staff_aggregate":{"aggregate":{"count":0}}},"key":"empty_response","summary":"No staff found","id":"paths/~1gql~1v1~1staff/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_department_id":{"value":{"error":"departmentId must be a positive integer","code":"INVALID_DEPARTMENT_ID"},"key":"invalid_department_id","summary":"Invalid department ID","id":"paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_department_id"},"paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_page":{"value":{"error":"page must be non-negative","code":"INVALID_PAGE"},"key":"invalid_page","summary":"Invalid page number","id":"paths/~1gql~1v1~1staff/post/responses/400/content/application~1json/examples/invalid_page"},"paths/~1gql~1v1~1staff/post/responses/401/content/application~1json/examples/insufficient_permissions":{"value":{"error":"Access denied. Missing Roles","code":"INSUFFICIENT_PERMISSIONS"},"key":"insufficient_permissions","summary":"User lacks required role","id":"paths/~1gql~1v1~1staff/post/responses/401/content/application~1json/examples/insufficient_permissions"},"paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/filtered_response":{"value":{"staff":[{"id":202,"pmsRef":"2254","firstName":"Holley","lastName":"Abbott","email":"ena.toy@hotmail.com","active":true,"deptId":8,"jobTitle":null,"type":null,"officeId":2,"staffManagerId":null}],"total":{"aggregate":{"count":1}}},"key":"filtered_response","summary":"Filtered staff with dynamic ordering","id":"paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/filtered_response"},"paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/empty_response":{"value":{"staff":[],"total":{"aggregate":{"count":0}}},"key":"empty_response","summary":"No staff found matching criteria","id":"paths/~1gql~1v1~1staff~1search/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/minimal":{"value":{"firstName":"Jane","lastName":"Doe","pmsRef":"EMP-1042","ref":"doe-j"},"key":"minimal","summary":"Minimal required fields only","id":"paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/minimal"},"paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/with_rate_card":{"value":{"firstName":"Jane","lastName":"Doe","pmsRef":"EMP-1042","ref":"doe-j","email":"jane.doe@firm.com","jobTitle":"Senior Associate","active":true,"rateCardAssignment":{"rateCardId":5,"billingRates":[{"rateTypeId":12,"hourlyBillingRate":150},{"rateTypeId":13,"hourlyBillingRate":175}],"averageCost":75}},"key":"with_rate_card","summary":"Staff with full rate card assignment","id":"paths/~1api~1v1~1staff/post/requestBody/content/application~1json/examples/with_rate_card"},"paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_only":{"value":{"data":{"id":312,"pmsRef":"EMP-1042","ref":"doe-j","firstName":"Jane","lastName":"Doe","fullName":"Jane Doe","email":"jane.doe@firm.com","active":true,"version":1,"createdAt":"2024-03-15T10:00:00Z","updatedAt":"2024-03-15T10:00:00Z","rateCardAssignment":null},"meta":{"success":true,"message":"Staff member created successfully","timestamp":"2024-03-15T10:00:00Z","version":"v1"}},"key":"staff_only","summary":"Staff created without rate card assignment","id":"paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_only"},"paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_with_rate_card":{"value":{"data":{"id":312,"pmsRef":"EMP-1042","ref":"doe-j","firstName":"Jane","lastName":"Doe","fullName":"Jane Doe","email":"jane.doe@firm.com","active":true,"version":1,"createdAt":"2024-03-15T10:00:00Z","updatedAt":"2024-03-15T10:00:00Z","rateCardAssignment":{"rateCardId":5,"billingRateIds":[101,102],"averageCostId":201}},"meta":{"success":true,"message":"Staff member created successfully","timestamp":"2024-03-15T10:00:00Z","version":"v1"}},"key":"staff_with_rate_card","summary":"Staff created with billing rates and average cost","id":"paths/~1api~1v1~1staff/post/responses/201/content/application~1json/examples/staff_with_rate_card"},"paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_only":{"value":{"jobTitle":"Manager","departmentId":4,"active":true},"key":"fields_only","summary":"Update staff fields only (no rate card change)","id":"paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_only"},"paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/replace_rate_card":{"value":{"rateCardAssignment":{"rateCardId":6,"billingRates":[{"rateTypeId":12,"hourlyBillingRate":200}],"averageCost":95}},"key":"replace_rate_card","summary":"Replace rate card assignment","id":"paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/replace_rate_card"},"paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_and_rate_card":{"value":{"jobTitle":"Senior Manager","rateCardAssignment":{"rateCardId":6,"billingRates":[{"rateTypeId":12,"hourlyBillingRate":200},{"rateTypeId":13,"hourlyBillingRate":225}],"averageCost":95}},"key":"fields_and_rate_card","summary":"Update fields and replace rate card in one request","id":"paths/~1api~1v1~1staff~1{staffId}/put/requestBody/content/application~1json/examples/fields_and_rate_card"},"paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/fields_updated":{"value":{"data":{"id":312,"pmsRef":"EMP-1042","ref":"doe-j","firstName":"Jane","lastName":"Doe","fullName":"Jane Doe","jobTitle":"Manager","active":true,"version":2,"updatedAt":"2024-06-01T09:00:00Z","rateCardAssignment":null},"meta":{"success":true,"message":"Staff member updated successfully","timestamp":"2024-06-01T09:00:00Z","version":"v1"}},"key":"fields_updated","summary":"Fields updated, no rate card change","id":"paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/fields_updated"},"paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/rate_card_replaced":{"value":{"data":{"id":312,"pmsRef":"EMP-1042","ref":"doe-j","firstName":"Jane","lastName":"Doe","fullName":"Jane Doe","jobTitle":"Manager","active":true,"version":2,"updatedAt":"2024-06-01T09:00:00Z","rateCardAssignment":{"rateCardId":6,"billingRateIds":[205],"averageCostId":301}},"meta":{"success":true,"message":"Staff member updated successfully","timestamp":"2024-06-01T09:00:00Z","version":"v1"}},"key":"rate_card_replaced","summary":"Rate card assignment replaced","id":"paths/~1api~1v1~1staff~1{staffId}/put/responses/200/content/application~1json/examples/rate_card_replaced"},"paths/~1gql~1v1~1payments/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1payments/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/successful_response":{"value":{"deid_payment":[{"id":45201,"arTranId":125890,"paymentMethod":"CREDIT_CARD","amount":2750,"paymentDate":"2024-03-15T14:30:22+00:00","confirmationDate":"2024-03-15T14:32:18+00:00","status":"CONFIRMED","processorId":"stripe","processorReferenceId":"pi_3N1K2mL4uZ5v6w7x8y9z0a1b","last4Digits":"4242","cardType":"VISA","currency":"USD","clientId":789,"createdAt":"2024-03-15T14:30:22.123456+00:00","updatedAt":"2024-03-15T14:32:18.789012+00:00","client":{"id":789,"name":"TechFlow Enterprises","clientRef":"TF-2024-789"},"ar_tran":{"id":125890,"pmsRef":"INV-2024-3456","transactionDate":"2024-03-01T00:00:00+00:00","amount":2750}},{"id":45202,"arTranId":125891,"paymentMethod":"ACH","amount":1850,"paymentDate":"2024-03-12T09:15:33+00:00","confirmationDate":"2024-03-14T10:22:45+00:00","status":"CONFIRMED","processorId":"plaid","processorReferenceId":"ach_3M9H8gJ2tX4v5w6z7y8a9b0c","last4Digits":"5678","cardType":null,"currency":"USD","clientId":789,"createdAt":"2024-03-12T09:15:33.456789+00:00","updatedAt":"2024-03-14T10:22:45.123456+00:00","client":{"id":789,"name":"TechFlow Enterprises","clientRef":"TF-2024-789"},"ar_tran":{"id":125891,"pmsRef":"INV-2024-3457","transactionDate":"2024-02-28T00:00:00+00:00","amount":1850}},{"id":45203,"arTranId":125892,"paymentMethod":"PAYPAL","amount":3250,"paymentDate":"2024-03-10T16:45:12+00:00","confirmationDate":"2024-03-10T16:47:08+00:00","status":"CONFIRMED","processorId":"paypal","processorReferenceId":"PAYID-M2K4L6Y8Z9A1B2C3D4E5F6G7","last4Digits":null,"cardType":null,"currency":"USD","clientId":789,"createdAt":"2024-03-10T16:45:12.789012+00:00","updatedAt":"2024-03-10T16:47:08.345678+00:00","client":{"id":789,"name":"TechFlow Enterprises","clientRef":"TF-2024-789"},"ar_tran":{"id":125892,"pmsRef":"INV-2024-3458","transactionDate":"2024-02-25T00:00:00+00:00","amount":3250}}],"deid_payment_aggregate":{"aggregate":{"count":15,"sum":{"amount":28750}}}},"key":"successful_response","summary":"Payment records with security compliance and transaction details","id":"paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/empty_response":{"value":{"deid_payment":[],"deid_payment_aggregate":{"aggregate":{"count":0,"sum":{"amount":0}}}},"key":"empty_response","summary":"No payments found","id":"paths/~1gql~1v1~1payments/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_date_range":{"value":{"error":"startDate must be before or equal to endDate","code":"INVALID_DATE_RANGE"},"key":"invalid_date_range","summary":"Invalid date range","id":"paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_date_range"},"paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_payment_method":{"value":{"error":"Invalid payment method specified","code":"INVALID_PAYMENT_METHOD"},"key":"invalid_payment_method","summary":"Invalid payment method","id":"paths/~1gql~1v1~1payments/post/responses/400/content/application~1json/examples/invalid_payment_method"},"paths/~1gql~1v1~1payments/post/responses/401/content/application~1json/examples/missing_auth":{"value":{"error":"x-hasura-admin-secret header is required","code":"MISSING_AUTH_HEADER"},"key":"missing_auth","summary":"Missing authentication header","id":"paths/~1gql~1v1~1payments/post/responses/401/content/application~1json/examples/missing_auth"},"paths/~1gql~1v1~1payments/post/responses/403/content/application~1json/examples/insufficient_permissions":{"value":{"error":"Access to payment data requires elevated permissions","code":"INSUFFICIENT_PAYMENT_PERMISSIONS"},"key":"insufficient_permissions","summary":"Insufficient permissions for payment data","id":"paths/~1gql~1v1~1payments/post/responses/403/content/application~1json/examples/insufficient_permissions"},"paths/~1gql~1v1~1draft_invoice_histories/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1draft_invoice_histories/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1draft_invoice_histories/post/responses/200/content/application~1json/examples/successful_response":{"value":{"draftInvoices":[{"clientId":7720,"invoiceId":125890,"jobId":2514,"client":{"active":true,"clientRef":"TF-2024-789","name":"TechFlow Enterprises","pmsRef":"240815"},"draftInvoice":{"approvedAt":"2024-03-15T14:32:18+00:00","arTranId":125890,"approverStaffId":301,"approvedByStaffId":301,"invoiceId":125890,"isActive":true,"pms_invoice_number":"INV-2024-4850","status":"APPROVED"}}],"total":{"aggregate":{"count":94}}},"key":"successful_response","summary":"Draft invoice histories with client and draft invoice details","id":"paths/~1gql~1v1~1draft_invoice_histories/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1draft_invoice_histories~1search/post/responses/200/content/application~1json/examples/successful_response":{"value":{"draftInvoices":[{"clientId":7720,"invoiceId":125890,"jobId":2514,"client":{"active":true,"clientRef":"TF-2024-789","name":"TechFlow Enterprises","pmsRef":"240815"},"draftInvoice":{"approvedAt":"2024-03-15T14:32:18+00:00","arTranId":125890,"approverStaffId":301,"approvedByStaffId":301,"invoiceId":125890,"isActive":true,"pms_invoice_number":"INV-2024-4850","status":"APPROVED"}}],"total":{"aggregate":{"count":12}}},"key":"successful_response","summary":"Filtered draft invoice histories","id":"paths/~1gql~1v1~1draft_invoice_histories~1search/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1invoices/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1invoices/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/successful_response":{"value":{"invoices":[{"arTranId":125890,"invoiceNumber":"INV-2024-4850","dueDate":"2024-04-24T05:00:00","status":"POSTED","tax":0,"interest":0,"description":null,"createdAt":"2024-05-12T22:50:20.595961+00:00","updatedAt":"2024-05-12T22:50:20.595961+00:00","ar_tran":{"id":125890,"pmsRef":"240815","transactionDate":"2024-03-22T05:00:00","amount":4250,"allocated":4250,"clientId":7720}},{"arTranId":125234,"invoiceNumber":"INV-2024-4721","dueDate":"2024-03-03T05:00:00","status":"POSTED","tax":0,"interest":0,"description":null,"createdAt":"2024-05-12T22:50:10.982058+00:00","updatedAt":"2024-05-12T22:50:10.982058+00:00","ar_tran":{"id":125234,"pmsRef":"239842","transactionDate":"2024-02-04T05:00:00","amount":3750,"allocated":3750,"clientId":7720}},{"arTranId":124856,"invoiceNumber":"INV-2024-4592","dueDate":"2024-02-07T05:00:00","status":"POSTED","tax":0,"interest":0,"description":null,"createdAt":"2024-05-12T22:50:09.194501+00:00","updatedAt":"2024-05-12T22:50:09.194501+00:00","ar_tran":{"id":124856,"pmsRef":"238967","transactionDate":"2024-01-08T05:00:00","amount":2850,"allocated":2850,"clientId":7720}}],"total":{"aggregate":{"count":94}}},"key":"successful_response","summary":"Invoice records with AR transaction details","id":"paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/real_api_response":{"value":{"invoices":[{"arTranId":119859,"invoiceNumber":"4618","dueDate":"2023-03-24T05:00:00","status":"POSTED","tax":0,"interest":0,"description":null,"createdAt":"2023-05-12T22:50:20.595961+00:00","updatedAt":"2023-05-12T22:50:20.595961+00:00","ar_tran":{"id":119859,"pmsRef":"224081","transactionDate":"2023-02-22T05:00:00","amount":0,"allocated":0,"clientId":7720}},{"arTranId":96162,"invoiceNumber":"74080","dueDate":"2018-10-11T04:00:00","status":"POSTED","tax":0,"interest":0,"description":null,"createdAt":"2023-05-12T22:50:08.928921+00:00","updatedAt":"2023-05-12T22:50:08.928921+00:00","ar_tran":{"id":96162,"pmsRef":"108840","transactionDate":"2018-09-11T04:00:00","amount":3516,"allocated":3516,"clientId":7720}}],"total":{"aggregate":{"count":94}}},"key":"real_api_response","summary":"Sample from actual API response","id":"paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/real_api_response"},"paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/empty_response":{"value":{"invoices":[],"total":{"aggregate":{"count":0}}},"key":"empty_response","summary":"No invoices found","id":"paths/~1gql~1v1~1invoices/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_date_range":{"value":{"error":"startDate must be before or equal to endDate","code":"INVALID_DATE_RANGE"},"key":"invalid_date_range","summary":"Invalid date range","id":"paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_date_range"},"paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_client_id":{"value":{"error":"clientId must be a positive integer","code":"INVALID_CLIENT_ID"},"key":"invalid_client_id","summary":"Invalid client ID","id":"paths/~1gql~1v1~1invoices/post/responses/400/content/application~1json/examples/invalid_client_id"},"paths/~1gql~1v1~1invoices/post/responses/401/content/application~1json/examples/missing_auth":{"value":{"error":"x-hasura-admin-secret header is required","code":"MISSING_AUTH_HEADER"},"key":"missing_auth","summary":"Missing authentication header","id":"paths/~1gql~1v1~1invoices/post/responses/401/content/application~1json/examples/missing_auth"},"paths/~1gql~1v1~1projects/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1projects/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/minimal":{"value":{"clientId":420,"jobTemplates":[{"jobTemplateId":7}]},"key":"minimal","summary":"Single job from template, no overrides","id":"paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/minimal"},"paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/full":{"value":{"clientId":420,"jobTemplates":[{"jobTemplateId":7,"startDate":"2025-01-01","name":"Tax Return 2024","serviceDescription":"Annual federal and state tax preparation","estimationHours":8.5,"feeAmount":1500,"requiredPrepayment":500,"includeWipType":"INCLUDE_WIP_IF_FINAL"},{"jobTemplateId":12,"startDate":"2025-02-01","name":"Bookkeeping Q1 2025"}]},"key":"full","summary":"Multiple jobs with field overrides","id":"paths/~1api~1v1~1projects~1create_from_template/post/requestBody/content/application~1json/examples/full"},"paths/~1api~1v1~1projects~1create_from_template/post/responses/201/content/application~1json/examples/success":{"value":[1001,1002],"key":"success","summary":"Two jobs created","id":"paths/~1api~1v1~1projects~1create_from_template/post/responses/201/content/application~1json/examples/success"},"paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/success":{"value":{"taskTypes":[{"id":1,"pmsRef":"TAX-PREP","code":"TXPRP","display":"Tax Preparation","description":"Federal and state income tax preparation","billable":true,"taxable":false,"active":true,"customHourlyRate":275,"rateTypeId":3,"taskTypeCategoryId":2,"serviceLineId":5,"projectsUsedInCount":42,"invoicesUsedInCount":118,"isCreatedByAiwyn":false,"isManagedByAiwyn":false,"createdAt":"2023-01-15T08:00:00Z","updatedAt":"2024-06-01T12:30:00Z","version":3},{"id":2,"pmsRef":"AUDIT","code":"AUDIT","display":"Audit","description":null,"billable":true,"taxable":false,"active":true,"customHourlyRate":null,"rateTypeId":null,"taskTypeCategoryId":1,"serviceLineId":2,"projectsUsedInCount":17,"invoicesUsedInCount":53,"isCreatedByAiwyn":false,"isManagedByAiwyn":false,"createdAt":"2023-01-15T08:00:00Z","updatedAt":"2023-01-15T08:00:00Z","version":1}],"total":{"aggregate":{"count":25}}},"key":"success","summary":"Task types retrieved","id":"paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/success"},"paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/empty":{"value":{"taskTypes":[],"total":{"aggregate":{"count":0}}},"key":"empty","summary":"No task types found","id":"paths/~1v1~1task-types/get/responses/200/content/application~1json/examples/empty"},"paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/billable_active":{"value":{"pageSize":25,"page":0,"where":{"_and":[{"billable":{"_eq":true}},{"active":{"_eq":true}}]},"orderBy":[{"display":"asc"}]},"key":"billable_active","summary":"All active billable task types","id":"paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/billable_active"},"paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_service_line":{"value":{"pageSize":50,"page":0,"where":{"serviceLineId":{"_eq":2}}},"key":"by_service_line","summary":"Task types for a specific service line","id":"paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_service_line"},"paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_code":{"value":{"pageSize":1,"page":0,"where":{"code":{"_eq":"TXPRP"}}},"key":"by_code","summary":"Exact code lookup","id":"paths/~1v1~1task-types~1search/post/requestBody/content/application~1json/examples/by_code"},"paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/success":{"value":{"taskTypes":[{"id":1,"pmsRef":"TAX-PREP","code":"TXPRP","display":"Tax Preparation","description":"Federal and state income tax preparation","billable":true,"taxable":false,"active":true,"customHourlyRate":275,"rateTypeId":3,"taskTypeCategoryId":2,"serviceLineId":5,"projectsUsedInCount":42,"invoicesUsedInCount":118,"isCreatedByAiwyn":false,"isManagedByAiwyn":false,"createdAt":"2023-01-15T08:00:00Z","updatedAt":"2024-06-01T12:30:00Z","version":3}],"total":{"aggregate":{"count":12}}},"key":"success","summary":"Active billable task types returned","id":"paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/success"},"paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/empty":{"value":{"taskTypes":[],"total":{"aggregate":{"count":0}}},"key":"empty","summary":"No task types matched the filter","id":"paths/~1v1~1task-types~1search/post/responses/200/content/application~1json/examples/empty"},"paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/success":{"value":{"tasks":[{"id":456,"name":"Q4 Financial Statement Review","overrideName":null,"status":"IN_PROGRESS","pmsRef":"TASK-001","jobId":67890,"taskTypeId":1,"assigneeStaffId":123,"startDate":"2024-10-01","dueDate":"2024-12-31","targetStartDate":"2024-09-15","targetDueDate":"2024-12-15","estimatedHours":40,"completedAt":null,"description":"Review and analyse Q4 financial statements including variance analysis","ordinal":1,"parentTaskId":null,"jobTemplateTaskId":10,"isCreatedByAiwyn":false,"isManagedByAiwyn":false,"createdAt":"2024-09-01T08:00:00Z","updatedAt":"2024-10-01T09:30:00Z","taskType":{"id":1,"code":"TXPRP","display":"Tax Preparation","billable":true,"taxable":false,"active":true},"assigneeStaff":{"id":123,"firstName":"John","lastName":"Smith","email":"john.smith@firm.com"},"job":{"id":67890}}]},"key":"success","summary":"Task found","id":"paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/success"},"paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/not_found":{"value":{"tasks":[]},"key":"not_found","summary":"Task not found","id":"paths/~1v1~1task~1{id}/get/responses/200/content/application~1json/examples/not_found"},"paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_task_type_and_assignee":{"value":{"pageSize":25,"page":0,"where":{"_and":[{"taskType":{"code":{"_eq":"PREP"}}},{"assigneeStaffId":{"_eq":789}}]},"orderBy":[{"dueDate":"asc"}]},"key":"by_task_type_and_assignee","summary":"Tasks of a specific type assigned to a staff member","id":"paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_task_type_and_assignee"},"paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_client":{"value":{"pageSize":50,"page":0,"where":{"job":{"clientId":{"_eq":456}}}},"key":"by_client","summary":"All tasks for a specific client","id":"paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/by_client"},"paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/due_date_range":{"value":{"pageSize":50,"page":0,"where":{"dueDate":{"_gte":"2024-01-01","_lte":"2024-12-31"}},"orderBy":[{"dueDate":"asc"}]},"key":"due_date_range","summary":"Tasks due within a date range","id":"paths/~1v1~1tasks~1search/post/requestBody/content/application~1json/examples/due_date_range"},"paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/success":{"value":{"tasks":[{"id":456,"name":"Q4 Financial Statement Review","overrideName":null,"status":"IN_PROGRESS","pmsRef":"TASK-001","jobId":67890,"taskTypeId":1,"assigneeStaffId":789,"startDate":"2024-10-01","dueDate":"2024-12-31","targetStartDate":"2024-09-15","targetDueDate":"2024-12-15","estimatedHours":40,"completedAt":null,"description":"Review and analyse Q4 financial statements","ordinal":1,"parentTaskId":null,"isCreatedByAiwyn":false,"isManagedByAiwyn":false,"createdAt":"2024-09-01T08:00:00Z","updatedAt":"2024-10-01T09:30:00Z","taskType":{"id":1,"code":"PREP","display":"Tax Preparation","billable":true,"taxable":false,"active":true},"assigneeStaff":{"id":789,"firstName":"Jane","lastName":"Doe","email":"jane.doe@firm.com"},"job":{"id":67890}}],"total":{"aggregate":{"count":84}}},"key":"success","summary":"Tasks returned","id":"paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/success"},"paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/empty":{"value":{"tasks":[],"total":{"aggregate":{"count":0}}},"key":"empty","summary":"No tasks matched the filter","id":"paths/~1v1~1tasks~1search/post/responses/200/content/application~1json/examples/empty"},"paths/~1gql~1v1~1wip/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1wip/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/successful_response":{"value":{"deid_wip":[{"id":850321,"pmsRef":"1789456","wipType":"Time","loggedDate":"2024-01-17T05:00:00","wipValue":1250,"wipValueOutstanding":0,"billedAmount":1225,"writeOffAmount":25,"notes":"Consultation and analysis for Q1 financial review","clientId":1561,"jobId":2514,"isActive":true,"createdAt":"2024-05-12T23:02:33.24516+00:00","updatedAt":"2024-05-12T23:02:33.24516+00:00","client":{"id":1561,"name":"TechFlow Enterprises"},"job":{"id":2514,"name":"Q1 Financial Review 2024"}},{"id":850142,"pmsRef":"1789123","wipType":"Expense","loggedDate":"2024-01-15T05:00:00","wipValue":350,"wipValueOutstanding":0,"billedAmount":343.5,"writeOffAmount":6.5,"notes":null,"clientId":1561,"jobId":2514,"createdAt":"2024-05-12T23:00:05.824148+00:00","updatedAt":"2024-05-12T23:00:05.824148+00:00","client":{"id":1561,"name":"TechFlow Enterprises"},"job":{"id":2514,"name":"Q1 Financial Review 2024"}},{"id":849987,"pmsRef":"1788890","wipType":"Time","loggedDate":"2024-01-12T05:00:00","wipValue":875,"wipValueOutstanding":125,"billedAmount":750,"writeOffAmount":0,"notes":"Document review and preparation","clientId":1561,"jobId":2514,"createdAt":"2024-05-12T23:00:07.784813+00:00","updatedAt":"2024-05-12T23:00:07.784813+00:00","client":{"id":1561,"name":"TechFlow Enterprises"},"job":{"id":2514,"name":"Q1 Financial Review 2024"}}],"deid_wip_aggregate":{"aggregate":{"count":84,"sum":{"wipValue":24186.15,"billedAmount":19612.07,"wipValueOutstanding":125}}}},"key":"successful_response","summary":"WIP records with financial tracking and aggregations","id":"paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/real_api_response":{"value":{"deid_wip":[{"id":743292,"pmsRef":"1694524","wipType":"Time","loggedDate":"2018-01-17T05:00:00","wipValue":127.5,"wipValueOutstanding":0,"billedAmount":0,"writeOffAmount":127.5,"notes":"Velit aut provident sint dolorum eaque necessitatibus dicta reprehenderit eveniet dolore eius neque est.","clientId":1561,"jobId":2514,"createdAt":"2023-05-12T23:02:33.24516+00:00","updatedAt":"2023-05-12T23:02:33.24516+00:00","client":{"id":1561,"name":"Cammie Cremin"},"job":{"id":2514,"name":"Justin Case"}},{"id":510044,"pmsRef":"1159387","wipType":"Time","loggedDate":"2016-03-23T04:00:00","wipValue":87.5,"wipValueOutstanding":0,"billedAmount":86.05,"writeOffAmount":1.45,"notes":null,"clientId":1561,"jobId":2514,"createdAt":"2023-05-12T23:00:05.824148+00:00","updatedAt":"2023-05-12T23:00:05.824148+00:00","client":{"id":1561,"name":"Cammie Cremin"},"job":{"id":2514,"name":"Justin Case"}}],"deid_wip_aggregate":{"aggregate":{"count":84,"sum":{"wipValue":24186.15,"billedAmount":19612.07,"wipValueOutstanding":0}}}},"key":"real_api_response","summary":"Sample from actual API response","id":"paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/real_api_response"},"paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/empty_response":{"value":{"deid_wip":[],"deid_wip_aggregate":{"aggregate":{"count":0,"sum":{"wipValue":0,"billedAmount":0,"wipValueOutstanding":0}}}},"key":"empty_response","summary":"No WIP records found","id":"paths/~1gql~1v1~1wip/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_date_range":{"value":{"error":"startDate must be before or equal to endDate","code":"INVALID_DATE_RANGE"},"key":"invalid_date_range","summary":"Invalid date range","id":"paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_date_range"},"paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_client_id":{"value":{"error":"clientId must be a positive integer","code":"INVALID_CLIENT_ID"},"key":"invalid_client_id","summary":"Invalid client ID","id":"paths/~1gql~1v1~1wip/post/responses/400/content/application~1json/examples/invalid_client_id"},"paths/~1gql~1v1~1wip/post/responses/401/content/application~1json/examples/missing_auth":{"value":{"error":"x-hasura-admin-secret header is required","code":"MISSING_AUTH_HEADER"},"key":"missing_auth","summary":"Missing authentication header","id":"paths/~1gql~1v1~1wip/post/responses/401/content/application~1json/examples/missing_auth"},"paths/~1gql~1v1~1engagements/post/requestBody/content/application~1json/examples/default_pagination":{"value":{"pageSize":25,"page":0},"key":"default_pagination","summary":"Default pagination","id":"paths/~1gql~1v1~1engagements/post/requestBody/content/application~1json/examples/default_pagination"},"paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/successful_response":{"value":{"deid_engagement":[{"id":8,"name":"2024 Annual Review and Tax 52150","start_dt":"2024-03-15","end_dt":"2024-04-30","status":"EXECUTED","client_id":420,"partner_staff_id":53,"manager_staff_id":15,"created_at":"2024-03-14T10:58:38.605333+00:00","updated_at":"2024-07-27T00:08:05.822177+00:00","engagement_name_template":"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}","client":{"id":420,"name":"TechFlow Enterprises","number":"52150"},"partnerStaff":{"id":53,"firstName":"Robert","lastName":"Johnson","email":"r.johnson@company.com"},"managerStaff":{"id":15,"firstName":"Sarah","lastName":"Martinez","email":"s.martinez@company.com"}},{"id":9,"name":"2024 Quarterly Review 52150","start_dt":"2024-07-01","end_dt":"2024-07-15","status":"ACTIVE","client_id":420,"partner_staff_id":53,"manager_staff_id":22,"created_at":"2024-06-28T09:30:15.123456+00:00","updated_at":"2024-07-01T14:22:30.789012+00:00","engagement_name_template":"{{fiscal_year.year}} {{service_type.name}} {{client.number}}","client":{"id":420,"name":"TechFlow Enterprises","number":"52150"},"partnerStaff":{"id":53,"firstName":"Robert","lastName":"Johnson","email":"r.johnson@company.com"},"managerStaff":{"id":22,"firstName":"David","lastName":"Chen","email":"d.chen@company.com"}}],"deid_engagement_aggregate":{"aggregate":{"count":2}}},"key":"successful_response","summary":"Engagement records with staff and client details","id":"paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/successful_response"},"paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/single_engagement":{"value":{"deid_engagement":[{"id":7,"name":"2025 NFP Review and Tax 51840","start_dt":"2023-06-29","end_dt":"2023-06-29","status":"EXECUTED","client_id":420,"partner_staff_id":53,"manager_staff_id":15,"created_at":"2025-03-14T10:58:38.605333+00:00","updated_at":"2025-07-27T00:08:05.822177+00:00","engagement_name_template":"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}"}],"deid_engagement_aggregate":{"aggregate":{"count":1}}},"key":"single_engagement","summary":"Single engagement from real API response","id":"paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/single_engagement"},"paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/empty_response":{"value":{"deid_engagement":[],"deid_engagement_aggregate":{"aggregate":{"count":0}}},"key":"empty_response","summary":"No engagements found","id":"paths/~1gql~1v1~1engagements/post/responses/200/content/application~1json/examples/empty_response"},"paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_date_range":{"value":{"error":"startDate must be before or equal to endDate","code":"INVALID_DATE_RANGE"},"key":"invalid_date_range","summary":"Invalid date range","id":"paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_date_range"},"paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_client_id":{"value":{"error":"clientId must be a positive integer","code":"INVALID_CLIENT_ID"},"key":"invalid_client_id","summary":"Invalid client ID","id":"paths/~1gql~1v1~1engagements/post/responses/400/content/application~1json/examples/invalid_client_id"},"paths/~1gql~1v1~1engagements/post/responses/401/content/application~1json/examples/missing_auth":{"value":{"error":"x-hasura-admin-secret header is required","code":"MISSING_AUTH_HEADER"},"key":"missing_auth","summary":"Missing authentication header","id":"paths/~1gql~1v1~1engagements/post/responses/401/content/application~1json/examples/missing_auth"},"paths/~1gql~1v1~1engagements~1search/post/requestBody/content/application~1json/examples/default_search":{"value":{"pageSize":1,"where":{"_and":[{"_or":[{"name":{"_ilike":"%review%"}},{"engagementNameTemplate":{"_ilike":"%tax%"}}]},{"status":{"_in":["ACTIVE","EXECUTED"]}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"partnerStaffId":{"_in":[5,6,7,8]}}]},"orderBy":[{"name":"asc"},{"createdAt":"desc"}]},"key":"default_search","summary":"Default search with filtering","id":"paths/~1gql~1v1~1engagements~1search/post/requestBody/content/application~1json/examples/default_search"},"paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/minimal":{"value":{"clientId":420,"fiscalYear":2024,"partnerStaffId":53,"managerStaffId":15,"primaryContactId":101},"key":"minimal","summary":"Minimal required fields","id":"paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/minimal"},"paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/full":{"value":{"clientId":420,"fiscalYear":2024,"partnerStaffId":53,"managerStaffId":15,"primaryContactId":101,"secondaryContactId":102,"billingContactId":103,"engagementLetterTemplateId":5,"documentTemplateId":7,"engagementNameTemplate":"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}","startDate":"2024-01-01","endDate":"2024-12-31","ccStaffIds":[20,21],"additionalClientIds":[790,791],"jobIds":[101,102],"additionalDocuments":[{"documentTemplateId":12,"documentType":"ADDITIONAL_DOCUMENT"}]},"key":"full","summary":"All fields provided","id":"paths/~1api~1v1~1engagements~1create/post/requestBody/content/application~1json/examples/full"},"paths/~1api~1v1~1engagements~1create/post/responses/200/content/application~1json/examples/success":{"value":{"id":34567},"key":"success","summary":"Engagement created","id":"paths/~1api~1v1~1engagements~1create/post/responses/200/content/application~1json/examples/success"},"paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/minimal":{"value":{"batchEngagements":[{"clientId":420,"fiscalYear":2024,"partnerStaffId":53,"managerStaffId":15,"primaryContactId":101},{"clientId":421,"fiscalYear":2024,"partnerStaffId":53,"managerStaffId":15,"primaryContactId":201}]},"key":"minimal","summary":"Two engagements, minimal fields","id":"paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/minimal"},"paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/with_project_template":{"value":{"name":"2024 Annual Batch","projectTemplateId":10,"batchEngagements":[{"clientId":420,"fiscalYear":2024,"partnerStaffId":53,"managerStaffId":15,"primaryContactId":101}]},"key":"with_project_template","summary":"Batch with a shared project template","id":"paths/~1api~1v1~1engagements~1batch~1create/post/requestBody/content/application~1json/examples/with_project_template"},"paths/~1api~1v1~1engagements~1batch~1create/post/responses/200/content/application~1json/examples/success":{"value":{"id":9001},"key":"success","summary":"Batch accepted","id":"paths/~1api~1v1~1engagements~1batch~1create/post/responses/200/content/application~1json/examples/success"},"paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/in_progress":{"value":{"batchId":9001,"status":"CREATING","engagementIds":[34567]},"key":"in_progress","summary":"Batch still creating","id":"paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/in_progress"},"paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/completed":{"value":{"batchId":9001,"status":"CREATED","engagementIds":[34567,34568]},"key":"completed","summary":"Batch fully created","id":"paths/~1api~1v1~1engagements~1batch~1{batchId}~1status/get/responses/200/content/application~1json/examples/completed"},"paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/responses/200/content/application~1json/examples/success":{"value":{"engagementDocuments":[{"id":101,"fileId":5001,"engagementId":34567,"engagementDocumentTypeId":2,"is_active":true,"clientFacing":true,"blocksExecution":true,"signatureRequirementType":"ALL_SIGNATURES_REQUIRED","createdAt":"2024-01-15T10:00:00Z","updatedAt":"2024-03-20T14:30:00Z","documentType":{"id":2,"name":"Consent Document"}},{"id":102,"fileId":5002,"engagementId":34567,"engagementDocumentTypeId":6,"is_active":true,"clientFacing":true,"blocksExecution":false,"signatureRequirementType":"ONE_SIGNATURE_REQUIRED","createdAt":"2024-02-01T09:00:00Z","updatedAt":"2024-02-01T09:00:00Z","documentType":{"id":6,"name":"Add-On Document"}}]},"key":"success","summary":"Two engagement documents for engagement 34567","id":"paths/~1gql~1v1~1engagement_documents~1by_engagement~1{engagementId}/get/responses/200/content/application~1json/examples/success"}},"securitySchemeStore":{"BearerAuth":{"id":"BearerAuth","type":"http","scheme":"bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bearer JWT authentication for Product API access (JWTs are issued via Aiwyn’s "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" JWT API key exchange)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Usage:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: Bearer <jwt-token>\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Requirements:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JWT tokens are issued by Aiwyn (backed by Firebase), obtained by exchanging a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jwtApiKey"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v1/auth/token"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens contain Hasura role-based permissions and tenant context"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Standard expiration time: 1 hour (3600 seconds)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains both application roles and Hasura-specific claims"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Token Structure:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"https://hasura.io/jwt/claims\": {\n    \"x-hasura-allowed-roles\": [\n      \"aiwynsb_SUPER_ADMIN\",\n      \"aiwynsb_API_USR\", \n      \"aiwynsb_API_ADMIN\",\n      \"aiwynsb_RECD_R\",\n      \"aiwynsb_RECD_C\",\n      \"aiwynsb_CUSTYP_R\",\n      \"aiwynsb_CUSTYP_C\"\n    ],\n    \"x-hasura-default-role\": \"aiwynsb_API_ADMIN\"\n  },\n  \"staffId\": 420,\n  \"tenant\": \"aiwynsb\",\n  \"roles\": [\"SUPER_ADMIN\", \"aiwynsb_API_ADMIN\", \"aiwynsb_RECD_C\", \"aiwynsb_CUSTYP_C\"],\n  \"email\": \"user@aiwyn.ai\",\n  \"authKeyId\": 11,\n  \"iss\": \"https://securetoken.google.com/an-staging-302521\",\n  \"aud\": \"an-staging-302521\",\n  \"auth_time\": 1758777932,\n  \"user_id\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"sub\": \"ocGkQDCe0MgLudgrjR18h5oKuVE2\",\n  \"iat\": 1758777932,\n  \"exp\": 1758781532,\n  \"email_verified\": true,\n  \"firebase\": {\n    \"identities\": {\n      \"saml.google\": [\"user@aiwyn.ai\"],\n      \"email\": [\"user@aiwyn.ai\"]\n    },\n    \"sign_in_provider\": \"custom\",\n    \"tenant\": \"aiwynsandbox-firm-o64vu\"\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n","language":"bash"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" \\\n     https://api.yourdomain.com/v1/clients\n"},"children":[]}]}]},"SecurityHeaders":{"id":"SecurityHeaders","type":"object","description":"Additional security headers that may be required or optional\ndepending on the authentication method and tenant configuration.\n"}},"servers":[{"url":"/_mock/bundle","isMockServer":true,"description":"Mock server"},{"url":"https://demo.api.aiwyn.ai","description":"Sandbox"},{"url":"https://staging.api.aiwyn.app","description":"Staging"}]},"options":{"hideSidebar":true,"mockServer":{"url":"/_mock/bundle","position":"first","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/bundle.json?download"},{"url":"/_bundle/bundle.yaml?download"}],"excludeFromSearch":false,"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Aiwyn API","description":"# Welcome to Aiwyn API\n\nThe Aiwyn API provides programmatic access to our comprehensive suite of financial automation tools.\nBuild powerful integrations and automate your accounting workflows with our RESTful APIs.\n\n## Key Features\n\n- 🔐 **Secure Authentication** - JWT API key exchange for short-lived bearer JWTs\n- 📊 **Real-time Data** - Access up-to-date financial information\n- 🚀 **High Performance** - Low latency, high throughput API infrastructure\n- 📚 **Comprehensive Coverage** - Full access to clients, engagements, expenses, and more\n- 🛠️ **Developer-Friendly** - Extensive documentation, SDKs, and code examples\n\n## API Versioning\n\nWe use URL versioning for our APIs. The current version is `v1`. All endpoints are prefixed with the version number.\n\n## Testing Enviornments\n- **Sandbox** runs the latest development branch.\n- **Staging** mirrors production behavior and stability.\n"}},"baseSlug":"/bundle","routesMapping":{}}