@abgov/adsp-sdk-mcp-server 1.27.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"openapi":"3.0.0","info":{"title":"Form service","version":"1.0.0","description":""},"paths":{"/form/v1/definitions":{"get":{"tags":["Form"],"description":"Retrieves the form definitions of the tenant, with optional name search. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`) in the tenant; core users are not accepted, and anonymous requests respond 403.\n","parameters":[{"name":"top","description":"Number of definitions to return in a page. Passed to the configuration service, which accepts 1 to 1000.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","description":"Search for form definitions by name (partial match, case-insensitive).","in":"query","required":false,"schema":{"type":"string"}},{"name":"createDateAfter","description":"Only include definitions created on or after this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createDateBefore","description":"Only include definitions created on or before this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successfully retrieved form definitions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a new form definition in the tenant. Requires the form-service admin role\n(`urn:ads:platform:form-service:form-admin`). Core users with the role must set `tenantId`.\n\nOnly `name` and `description` are accepted in the request body. All other fields are set automatically:\n- `id`: auto-generated from `name` in kebab-case\n- `anonymousApply`: `false`\n- `applicantRoles`, `assessorRoles`, and `clerkRoles`: `[]`\n- `securityClassification`: `protected b`\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionCreate"}}}},"responses":{"201":{"description":"Successfully created the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Validation failed, the ID could not be generated from the provided name, or the configuration service rejected the definition.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition ID could not be generated from the provided name."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"409":{"description":"Form definition with the generated ID already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition with ID 'business-licence-application' already exists."}}}}}}},"/form/v1/definitions/{definitionId}":{"get":{"tags":["Form"],"description":"Retrieves a form definition, with its current scheduled intake if it uses scheduled intakes. Requires the form-service admin or intake-application role, or one of the definition's applicant or clerk roles, in the tenant of the definition.\n\nIf the definition allows anonymous applications, any user can read it and the request does not need a bearer token. Anonymous requests have no token to determine the tenant from, so they must include the tenantId query parameter.\n","security":[{},{"accessToken":[]}],"parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"version","description":"Revision of the form definition to retrieve. Defaults to the active revision.","in":"query","required":false,"schema":{"type":"number"}},{"name":"tenantId","description":"ID of the tenant of the definition. Required for anonymous requests and core users; ignored for tenant users.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}],"responses":{"200":{"description":"Successfully retrieved a form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the tenant cannot be determined for an anonymous request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot determine tenant context of request."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"patch":{"tags":["Form"],"description":"Partially updates an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only the provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPatch"}}}},"responses":{"200":{"description":"Successfully patched the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"put":{"tags":["Form"],"description":"Replaces a form definition with the request body, creating it if it does not exist. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The `id` of the definition is taken from the path.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"},"example":{"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}}},"submissionRecords":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"delete":{"tags":["Form"],"description":"Deletes a form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Deleting a definition that does not exist also responds 204.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the form definition."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/lifecycle":{"patch":{"tags":["Form"],"description":"Partially updates the lifecycle settings of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowAnonymousApplication":{"type":"boolean","description":"Whether anonymous (unauthenticated) applicants can submit the form."},"allowMultipleFormsPerApplicant":{"type":"boolean","description":"Whether an applicant can submit more than one form. When false, only one form per applicant is allowed."},"createSupportTopic":{"type":"boolean","description":"Whether a support topic is created for each new form."},"securityClassification":{"type":"string","enum":["protected a","protected b","protected c","public"],"description":"Security classification of the form definition."}}},"example":{"allowAnonymousApplication":false,"allowMultipleFormsPerApplicant":true,"createSupportTopic":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated lifecycle settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/roles":{"put":{"tags":["Form"],"description":"Replaces the applicant, assessor, and clerk roles of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The provided roles replace the existing roles entirely; any role array omitted from the request is reset to empty.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"applicantRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to apply. Replaces the existing applicant roles entirely."},"assessorRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to assess submissions. Replaces the existing assessor roles entirely."},"clerkRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to act as clerks. Replaces the existing clerk roles entirely."}}},"example":{"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":["business-licence-clerk"]}}}},"responses":{"200":{"description":"Successfully replaced form definition roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/schedule":{"put":{"tags":["Form schedules"],"description":"Updates the scheduled intake period of a form definition, by updating its event in the calendar service. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Responds with the form definition and its updated intake. A definition that does not exist responds 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutIntakeParameters"}}}},"responses":{"200":{"description":"Successfully updated the intake schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the form definition does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition not found"}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/schemas":{"put":{"tags":["Form"],"description":"Updates the data and UI schemas for an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data-schema":{"type":"object","description":"JSON Schema describing the shape of the form data. If omitted, the existing data schema is preserved."},"ui-schema":{"type":"object","description":"UI schema describing the layout and controls of the form. If omitted, the existing UI schema is preserved."}}},"example":{"data-schema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"ui-schema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]}}}}},"responses":{"204":{"description":"Schemas updated successfully. No content is returned."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/submission-actions":{"patch":{"tags":["Form"],"description":"Partially updates the actions invoked when a form is submitted. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged. Properties other than those listed respond 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"createPDF":{"type":"boolean","description":"Whether to generate a submission PDF using the default submitted-form template."},"createSubmissionRecords":{"type":"boolean","description":"Whether to create submission records when the form is submitted."},"event":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Custom submission event in namespace:name format. Set to null to clear."},"includeDataInEvent":{"type":"boolean","description":"Whether submitted form data is included in the submission event payload."},"taskQueue":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Queue task target in queueNameSpace:queueName format. Set to null to clear."},"dispositionStates":{"type":"array","items":{"type":"object","required":["name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}}},"example":{"createPDF":true,"createSubmissionRecords":true,"event":"business-licence:application-received","includeDataInEvent":false,"taskQueue":"business-licence:intake","dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."},{"id":"rejected","name":"Rejected","description":"Licence is rejected."}]}}}},"responses":{"200":{"description":"Successfully updated submission actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms":{"get":{"tags":["Form"],"description":"Find forms. Users with the form-service admin role, or the export-service export-job role, can find all forms of the tenant. When the criteria include definitionIdEquals, users with one of that definition's assessor roles can find its submitted forms. Other users only find the forms they created, and cannot use includeData. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of forms to return in a page. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"includeData","description":"Flag indicating if form data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created' or 'status' for form fields, and 'data.' followed by\nthe path into the form data for a data value (e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for the forms to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"anonymousApplicantEquals":{"type":"boolean"},"definitionIdEquals":{"type":"string"},"statusEquals":{"type":"string","enum":["draft","locked","submitted","archived"]},"lastAccessedBefore":{"type":"string","format":"date-time"},"lockedBefore":{"type":"string","format":"date-time"},"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"},"hashEquals":{"type":"string"},"dataCriteria":{"type":"object","description":"Values to match in the form data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","statusEquals":"submitted"}}}}],"responses":{"200":{"description":"Successfully retrieved forms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a draft form of a definition in the tenant, optionally with data, and optionally submits it straight away. Requires one of the definition's applicant or clerk roles; if the definition allows anonymous applications, the form-service intake-application role is also accepted. When the definition uses scheduled intakes, forms can only be created during an active intake, unless the user has the form-service form-tester role or the request is a dry run.\n\nAn applicant who creates their own form is set as the form's applicant (and notified by email) when applicant information is included or the definition allows one form per applicant. Clerks and intake applications can provide the details of the applicant they act for.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definitionId":{"type":"string","minLength":1,"maxLength":50},"applicant":{"type":"object","properties":{"id":{"type":"string","description":"ID of an existing notification service subscriber to use as the applicant."},"userId":{"type":"string"},"addressAs":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"}},"required":["channel","address"]}}}},"data":{"type":"object","description":"Initial form data. File references can be embedded as file-service URNs."},"files":{"type":"object","deprecated":true,"description":"Not used; file references are resolved from the data.","additionalProperties":{"type":"string"}},"submit":{"type":"boolean","description":"Submit the form immediately after it is created."},"dryRun":{"type":"boolean","description":"Validate and simulate the request without saving the form."}},"required":["definitionId"]},"examples":{"applicant":{"summary":"Applicant creates their own draft","value":{"definitionId":"business-licence-application"}},"anonymousApplicant":{"summary":"Intake application creates a draft for an anonymous applicant","value":{"definitionId":"business-licence-application","applicant":{"addressAs":"Test User","channels":[{"channel":"email","address":"test.user@gov.ab.ca"}]}}},"createAndSubmit":{"summary":"Create with data and submit","value":{"definitionId":"business-licence-application","data":{"businessName":"Example Bakery Ltd."},"submit":true}}}}}},"responses":{"200":{"description":"Successfully created a form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the definition has no active intake, or the data is not valid for the definition when the form is submitted.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot create form as there is no active intake."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms/{formId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves a form, and its submission if it is submitted. Requires the form-service admin or intake-application role, one of the definition's clerk or assessor roles, or one of its applicant roles for the form's creator (unless the form is archived). Including the data needs the form data access described for `GET /form/v1/forms/{formId}/data`, and fails for locked forms. Core users must set `tenantId`.\n","parameters":[{"name":"includeData","description":"Flag indicating if data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form"],"description":"Executes a form operation. The user must be able to read the form (see `GET /form/v1/forms/{formId}`), and\neach operation needs a further role:\n- `send-code`: the form-service intake-application role. Sends a verification code to the applicant.\n- `unlock`: the form-service admin role. Only locked forms can be unlocked.\n- `submit`: one of the definition's clerk roles, or an applicant role for the form's creator. Only draft forms\n can be submitted, and the data must be valid for the definition's data schema.\n- `to-draft`: the form-service admin role or one of the definition's assessor roles. Only submitted forms can be\n set back to draft.\n- `archive`: the form-service admin role.\n\nCore users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnlockFormOperation"},{"$ref":"#/components/schemas/SubmitFormOperation"},{"$ref":"#/components/schemas/ArchiveFormOperation"},{"$ref":"#/components/schemas/SendCodeOperation"},{"$ref":"#/components/schemas/SetToDraftOperation"}],"discriminator":{"propertyName":"operation","mapping":{"unlock":"#/components/schemas/UnlockFormOperation","submit":"#/components/schemas/SubmitFormOperation","archive":"#/components/schemas/ArchiveFormOperation","send-code":"#/components/schemas/SendCodeOperation","to-draft":"#/components/schemas/SetToDraftOperation"}}},"examples":{"submit":{"summary":"Submit the form","value":{"operation":"submit"}},"sendCode":{"summary":"Send a verification code to the applicant","value":{"operation":"send-code"}},"unlock":{"summary":"Unlock a locked form","value":{"operation":"unlock"}},"toDraft":{"summary":"Set a submitted form back to draft","value":{"operation":"to-draft"}},"archive":{"summary":"Archive the form","value":{"operation":"archive"}}}}}},"responses":{"200":{"description":"Successfully executed operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the form is not in a status that allows the operation, or the data is not valid for the definition on submit.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot submit form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form"],"description":"Deletes a form and its files. Requires the form-service admin role. Draft forms can also be deleted by users with one of the definition's clerk roles, and by their creator with one of the definition's applicant roles. The user must also be able to read the form (see `GET /form/v1/forms/{formId}`). Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully deleted the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/data":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves form data. Requires the form-service admin role, one of the definition's applicant roles for the form's creator, one of its clerk roles while the form is a draft, or one of its assessor roles once it is submitted. Alternatively, a user with the form-service intake-application role can provide the verification code sent to the applicant. Locked forms cannot be read. Core users must set `tenantId`.\n","parameters":[{"name":"code","description":"Verification code sent to the applicant with the send-code operation.","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":10}}],"responses":{"200":{"description":"Successfully retrieved the form data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is locked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Locked form cannot be read."}}}},"401":{"description":"Request does not include a valid bearer token, or the provided code could not be verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Provided code could not be verified."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"put":{"tags":["Form"],"description":"Sets the form data of a draft form. Requires one of the definition's clerk roles, or one of its applicant roles for the form's creator. Files that are no longer referenced in the data are deleted. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Form data. File references can be embedded directly as file-service URNs anywhere in this object."}},"required":["data"]},"example":{"data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}}}},"responses":{"200":{"description":"Successfully updated the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is not a draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot update form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves submissions of a specified form matching search criteria. Requires the form-service admin role,\none of the form definition's assessor roles, or the export-service export-job role. Core users must set\n`tenantId`.\n","parameters":[{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form Submission"],"description":"Update the form disposition for the form submission. Requires the form-service admin role or one of the definition's assessor roles. The status must match the ID or name of one of the definition's disposition states. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully updated the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dispositionStatus":{"type":"string","minLength":1},"dispositionReason":{"type":"string","minLength":1}},"required":["dispositionStatus","dispositionReason"]},"example":{"dispositionStatus":"approved","dispositionReason":"Application meets all eligibility criteria."}}}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"post":{"tags":["Form Submission"],"description":"Adds a reviewer note to the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000}},"required":["content"]},"example":{"content":"Called applicant to confirm their mailing address."}}}},"responses":{"200":{"description":"Successfully added the note to the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes/{noteId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"name":"noteId","description":"ID of the note.","required":true,"in":"path","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/FormTenantId"}],"delete":{"tags":["Form Submission"],"description":"Removes a reviewer note from the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully removed the note from the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/registers":{"get":{"tags":["Form"],"description":"Retrieves the data registers that have both a definition and a data document, i.e. the registers manageable through this API. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the list of data registers.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataRegister"}},"example":[{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}]}}},"400":{"description":"Request has no tenant context. A core user must specify the tenantId query parameter."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"502":{"description":"configuration-service returned an unexpected error."}}},"post":{"tags":["Form"],"description":"Creates a new data register: its definition in the shared platform/configuration-service document, followed by its entries in a data-register/<name> configuration document. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterCreate"},"example":{"name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"201":{"description":"Successfully created the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"409":{"description":"A data register with this name already exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/registers/{name}":{"get":{"tags":["Form"],"description":"Retrieves a data register by name. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; it must have both a definition and a data document to be considered to exist.\n"},"502":{"description":"configuration-service returned an unexpected error."}}},"patch":{"tags":["Form"],"description":"Updates the description and/or entries of an existing data register. Only provided fields are changed: sending description alone leaves the entries unchanged, and vice versa. Entries are written to the latest revision; if an older revision is pinned as active, the pin moves to that revision so the new entries are live. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterUpdate"},"example":{"description":"Updated list of weekdays","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"200":{"description":"Successfully updated the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found."},"502":{"description":"configuration-service returned an unexpected error."}}},"delete":{"tags":["Form"],"description":"Deletes a data register: its entries and its definition. Removes whichever of the two parts still exists, so a retry after a partial failure succeeds. Forms that reference the register in a dropdown or list will lose its options. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register to delete.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the data register."},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; neither a definition nor a data document exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/submissions":{"get":{"tags":["Form Submission"],"description":"Retrieves submissions of the tenant matching search criteria. Requires the form-service admin role or the\nexport-service export-job role. Users with one of a definition's assessor roles can retrieve its submissions by\nincluding definitionIdEquals in the criteria. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form Submission"],"description":"Deletes a form submission. Requires the form-service admin role. Core users must set `tenantId`. A submission that does not exist responds 200 with `deleted: false`.\n","responses":{"200":{"description":"Successfully deleted the form submission, or no submission was found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"FormDefinitionIdPath":{"name":"definitionId","description":"ID of the form definition.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z0-9-]+$"},"example":"business-licence-application"},"FormIdPath":{"name":"formId","description":"ID of the form.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f"},"FormSubmissionIdPath":{"name":"submissionId","description":"ID of the form submission.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"FormTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Required for core (platform) users. Tenant users always act on the tenant of their token, and this parameter is ignored for them.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"FormBadRequest":{"description":"Request is invalid, for example a path, query, or body parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Validation failed with error(s): formId (params) - Invalid value"}}}},"FormDefinitionNotFound":{"description":"Form definition not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"form definition with ID 'business-licence-application' could not be found."}}}},"FormForbidden":{"description":"User does not have the role required for the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to find submissions."}}}},"FormNotFound":{"description":"Form definition, form, or submission not found. Forms and submissions of another tenant also respond 404.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form submission with ID '5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f' could not be found."}}}},"FormUnauthorized":{"description":"Request does not include a valid bearer token."}},"schemas":{"ArchiveFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["archive"]}}},"DataRegister":{"type":"object","required":["name"],"properties":{"namespace":{"type":"string","description":"Namespace of the data register. Always data-register."},"name":{"type":"string","description":"Name of the data register."},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"List of values stored in the register, from its active revision, or its latest revision if none is active.\n","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}},"DataRegisterCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the data register. Unique within the tenant. 1 to 50 letters, numbers, spaces, hyphens and underscores, not starting or ending with a space.\n","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"Initial list of values stored in the register. Defaults to an empty array.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"DataRegisterUpdate":{"type":"object","description":"Partial update payload for a data register. Only provided fields are changed; omitting entries leaves the existing entries unchanged.\n","properties":{"description":{"type":"string","description":"Updated description for the register."},"entries":{"type":"array","description":"Replacement list of values for the register.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"Form":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"jobId":{"type":"string","nullable":true,"description":"ID of the PDF generation job, when submitting the form generates a PDF."},"definition":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}},"applicant":{"type":"object","nullable":true,"properties":{"addressAs":{"type":"string"}}},"status":{"type":"string","enum":["draft","locked","submitted","archived"]},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"formDraftUrl":{"type":"string","description":"URL of the draft form in the application, based on the definition's formDraftUrlTemplate."},"data":{"type":"object","description":"Form data; only included when requested with includeData."},"files":{"type":"object","description":"Form files as file-service URNs; only included when requested with includeData.","additionalProperties":{"type":"string"}},"dryRun":{"type":"boolean","description":"Indicates the form was created as a dry run and was not saved."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"lastAccessed":{"type":"string","format":"date-time"},"locked":{"type":"string","format":"date-time","nullable":true},"submitted":{"type":"string","format":"date-time","nullable":true},"submission":{"type":"object","description":"submission for the form if form is submitted.","properties":{"id":{"type":"string"},"urn":{"type":"string"}}}},"example":{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","jobId":null,"securityClassification":"protected b","definition":{"id":"business-licence-application","name":"Business licence application","description":"Application for a municipal business licence."},"formDraftUrl":"https://form.alberta.ca/business-licence-application/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","status":"draft","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"locked":null,"submitted":null,"lastAccessed":"2026-10-02T15:04:05.000Z","applicant":{"addressAs":"Test User"}}},"FormData":{"type":"object","properties":{"id":{"type":"string","description":"ID of the form."},"data":{"type":"object"},"files":{"type":"object","description":"File-service URNs of the files referenced in the data, keyed by their path in the data.","additionalProperties":{"type":"string"}}},"example":{"id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"},"files":{"proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}},"FormDefinition":{"type":"object","required":["name","anonymousApply","applicantRoles","assessorRoles"],"properties":{"id":{"type":"string","readOnly":true,"description":"Unique identifier for the form definition. Generated from the name in kebab-case when the definition is created, and taken from the path on update.\n"},"revision":{"type":"number","readOnly":true,"description":"Revision of the definition in the configuration service."},"created":{"type":"string","format":"date-time","readOnly":true,"description":"Date the form definition (latest revision) was created. Only returned when listing definitions."},"name":{"type":"string"},"description":{"type":"string"},"anonymousApply":{"type":"boolean","default":false,"description":"Whether anonymous (unauthenticated) applicants can submit the form. Defaults to false."},"oneFormPerApplicant":{"type":"boolean"},"applicantRoles":{"type":"array","description":"Roles allowed to submit the form.","items":{"type":"string"}},"assessorRoles":{"type":"array","description":"Roles allowed to assess submitted forms.","items":{"type":"string"}},"clerkRoles":{"type":"array","description":"Roles allowed to fill in and submit forms on behalf of applicants.","items":{"type":"string"}},"formDraftUrlTemplate":{"type":"string","minLength":6,"maxLength":500,"pattern":"^https?://.+$","description":"Optional URL template for linking applicants back to their draft. Use '{{ id }}' as a placeholder for the form ID (e.g. https://example.com/form/{{ id }}). Must be between 6 and 500 characters.\n"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"},"dispositionStates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}},"generatesPdf":{"type":"boolean","readOnly":true,"description":"Whether a PDF is generated for submissions. Anonymous application definitions never generate one."},"submissionRecords":{"type":"boolean"},"submissionPdfTemplate":{"type":"string","writeOnly":true,"description":"PDF service template used for the submission PDF. Not returned by the form APIs."},"scheduledIntakes":{"type":"boolean","description":"Allow this form definition to accept schedule intakes"},"supportTopic":{"type":"boolean"},"registeredId":{"type":"string","readOnly":true},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"],"writeOnly":true,"description":"The security classification for the form definition. Not returned by the form definition APIs."},"queueTaskToProcess":{"type":"object","writeOnly":true,"description":"Task queue that a task is created in for each submission. Not returned by the form APIs.","properties":{"queueNameSpace":{"type":"string"},"queueName":{"type":"string"}}},"customSubmissionEvent":{"type":"object","writeOnly":true,"description":"Additional event sent when a form is submitted. Not returned by the form APIs.","properties":{"namespace":{"type":"string"},"name":{"type":"string"}}},"includeDataInSubmission":{"type":"boolean","writeOnly":true,"description":"Whether submitted data is included in the form-submitted event. Not returned by the form APIs."},"reviewConfiguration":{"type":"object","description":"Ordered form data fields shown as columns in the Form Admin submission and form lists.","additionalProperties":false,"properties":{"columns":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","description":"Dot-separated path of a leaf field in the form data schema.","minLength":1}}}},"questionsEmail":{"type":"string","description":"Address that applicant questions are forwarded to while no reviewer is part of the conversation. Not returned by the form APIs."}}},"dryRun":{"type":"boolean"},"intake":{"type":"object","readOnly":true,"nullable":true,"properties":{"urn":{"type":"string","description":"The urn of the form schedule intake"},"name":{"type":"string","description":"The description of the form schedule intake"},"description":{"type":"string","description":"The description of the form schedule intake"},"start":{"type":"string","format":"date-time","description":"The start date time of the form schedule intake"},"end":{"type":"string","format":"date-time","description":"The end date time of the form schedule intake"},"isAllDay":{"type":"boolean","description":"Is form schedule intake all day"},"isUpcoming":{"type":"boolean","description":"Is the form schedule intake upcoming"}}}},"example":{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"uiSchema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]},"dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."}],"generatesPdf":true,"submissionRecords":true,"scheduledIntakes":false,"supportTopic":false,"reviewConfiguration":{"columns":[{"path":"businessName"}]},"intake":null}},"FormDefinitionCreate":{"type":"object","description":"Payload for creating a new form definition. Only name and description are accepted; all other fields are set to defaults.","required":["name"],"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"additionalProperties":false,"example":{"name":"Business licence application","description":"Application for a municipal business licence."}},"FormDefinitionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormDefinition"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"created":"2026-09-14T16:20:00.000Z"}],"page":{"next":"MTA=","size":1,"total":24}}},"FormDefinitionPatch":{"type":"object","description":"Partial update payload for a form definition. Only provided fields will be updated; omitted fields will not be changed.","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"}},"additionalProperties":false,"example":{"description":"Application for a municipal business licence, including home-based businesses."}},"FormDeleteResult":{"type":"object","properties":{"deleted":{"type":"boolean"}},"example":{"deleted":true}},"FormDisposition":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"reason":{"type":"string"},"date":{"type":"string","format":"date-time"}}},"FormError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"FormPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Form"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","definition":{"id":"business-licence-application","name":"Business licence application"},"status":"submitted","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"submitted":"2026-10-03T09:30:00.000Z"}],"page":{"next":"MTA=","size":1,"total":312}}},"FormResultsPageInfo":{"type":"object","properties":{"after":{"type":"string","description":"Cursor of this page."},"next":{"type":"string","description":"Cursor of the next page. Not set on the last page."},"size":{"type":"number","description":"Number of results in this page."},"total":{"type":"number","description":"Total number of available results before filters are applied."}},"example":{"next":"MTA=","size":1,"total":24}},"FormSubmission":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"formId":{"type":"string"},"formDefinitionId":{"type":"string"},"formDefinitionRevision":{"type":"number","description":"Revision of the form definition the form was submitted with."},"formData":{"type":"object"},"formFiles":{"type":"object","additionalProperties":{"type":"string"}},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"hash":{"type":"string","description":"Hash of the submitted data."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updatedBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updated":{"type":"string","format":"date-time"},"disposition":{"$ref":"#/components/schemas/FormDisposition"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmissionNote"}}},"example":{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"formFiles":{},"securityClassification":"protected b","hash":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12","created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"updated":"2026-10-06T14:00:00.000Z","updatedBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"},"disposition":{"id":"9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a","status":"Approved","reason":"Application meets all eligibility criteria.","date":"2026-10-06T14:00:00.000Z"},"notes":[{"id":"7b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","content":"Called applicant to confirm their mailing address.","created":"2026-10-05T10:15:00.000Z","createdBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"}}]}},"FormSubmissionCriteria":{"type":"object","properties":{"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"dispositioned":{"type":"boolean"},"dispositionStatusEquals":{"type":"string"},"dispositionDateBefore":{"type":"string","format":"date-time"},"dispositionDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"}}},"FormSubmissionNote":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"FormSubmissionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"disposition":null,"notes":[]}],"page":{"next":"MTAw","size":1,"total":87}}},"PutIntakeParameters":{"type":"object","description":"Payload for updating schedule intake","required":["name","calendarEventId","start","end"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"calendarEventId":{"type":"integer","description":"ID of the calendar service event for the intake period."}},"example":{"name":"Spring intake","calendarEventId":42,"start":"2026-10-01T15:00:00.000Z","end":"2026-10-31T23:00:00.000Z"}},"SendCodeOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["send-code"]}}},"SetToDraftOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["to-draft"]}}},"SubmitFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["submit"]},"dryRun":{"type":"boolean","description":"Validate and simulate the submission without saving it."}}},"UnlockFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["unlock"]}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Form","description":"API to managed forms."},{"name":"Form Submission","description":"API to review and disposition form submissions."},{"name":"Form schedules","description":"API to manage the scheduled intake periods of form definitions."}]}
1
+ {"openapi":"3.0.0","info":{"title":"Form service","version":"1.0.0","description":""},"paths":{"/form/v1/definitions":{"get":{"tags":["Form"],"description":"Retrieves the form definitions of the tenant, with optional name search. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`) in the tenant; core users are not accepted, and anonymous requests respond 403.\n","parameters":[{"name":"top","description":"Number of definitions to return in a page. Passed to the configuration service, which accepts 1 to 1000.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","description":"Search for form definitions by name (partial match, case-insensitive).","in":"query","required":false,"schema":{"type":"string"}},{"name":"createDateAfter","description":"Only include definitions created on or after this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createDateBefore","description":"Only include definitions created on or before this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successfully retrieved form definitions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a new form definition in the tenant. Requires the form-service admin role\n(`urn:ads:platform:form-service:form-admin`). Core users with the role must set `tenantId`.\n\nOnly `name` and `description` are accepted in the request body. All other fields are set automatically:\n- `id`: auto-generated from `name` in kebab-case\n- `anonymousApply`: `false`\n- `applicantRoles`, `assessorRoles`, and `clerkRoles`: `[]`\n- `securityClassification`: `protected b`\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionCreate"}}}},"responses":{"201":{"description":"Successfully created the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Validation failed, the ID could not be generated from the provided name, or the configuration service rejected the definition.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition ID could not be generated from the provided name."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"409":{"description":"Form definition with the generated ID already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition with ID 'business-licence-application' already exists."}}}}}}},"/form/v1/definitions/{definitionId}":{"get":{"tags":["Form"],"description":"Retrieves a form definition, with its current scheduled intake if it uses scheduled intakes. Requires the form-service admin or intake-application role, or one of the definition's applicant or clerk roles, in the tenant of the definition.\n\nIf the definition allows anonymous applications, any user can read it and the request does not need a bearer token. Anonymous requests have no token to determine the tenant from, so they must include the tenantId query parameter.\n","security":[{},{"accessToken":[]}],"parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"version","description":"Revision of the form definition to retrieve. Defaults to the active revision.","in":"query","required":false,"schema":{"type":"number"}},{"name":"tenantId","description":"ID of the tenant of the definition. Required for anonymous requests and core users; ignored for tenant users.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}],"responses":{"200":{"description":"Successfully retrieved a form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the tenant cannot be determined for an anonymous request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot determine tenant context of request."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"patch":{"tags":["Form"],"description":"Partially updates an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only the provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPatch"}}}},"responses":{"200":{"description":"Successfully patched the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"put":{"tags":["Form"],"description":"Replaces a form definition with the request body, creating it if it does not exist. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The `id` of the definition is taken from the path.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"},"example":{"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}}},"submissionRecords":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"delete":{"tags":["Form"],"description":"Deletes a form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Deleting a definition that does not exist also responds 204.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the form definition."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/access-requests":{"post":{"tags":["Form registration"],"description":"Submits a request for access to a restricted form. Requires the `form-access-requester` role (`urn:ads:platform:form-service:form-access-requester`) or the `form-admin` role; core users with either role must set `tenantId`. The form definition must have registration enabled, otherwise the request responds 400. The registration is created with status `pending`. Only one pending registration is allowed per email address and form.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationCreate"}}}},"responses":{"201":{"description":"Successfully submitted the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationSubmitted"}}}},"400":{"description":"Request is invalid, the answers don't match the registration questions, the form definition doesn't accept access requests, or the request has no tenant context.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition 'medical-intake' does not accept registrations."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"},"409":{"description":"A pending access request already exists for this email address and form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"A pending registration already exists for this email address and form."}}}}}},"get":{"tags":["Form registration"],"description":"Retrieves the access requests of a form definition, newest first. Requires the `form-access-reader`, `form-access-writer` or `form-admin` role; core users with any of these roles must set `tenantId`. Only requests of the caller's tenant are returned.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"},{"name":"status","description":"Only return requests with this status.","in":"query","required":false,"schema":{"type":"string","enum":["pending","approved","denied"]}},{"name":"top","description":"Maximum number of results to return. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor of the page to return, from the next value of the previous page.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the access requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/access-requests/{id}":{"get":{"tags":["Form registration"],"description":"Retrieves the latest access request for an email address. Users can retrieve their own request (matching the email of their token); retrieving the request of another email address requires the `form-access-reader`, `form-access-writer` or `form-admin` role. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"id","description":"Email address of the applicant. Matched without regard to case.","in":"path","required":true,"schema":{"type":"string","format":"email"},"example":"test.user@gov.ab.ca"},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistration"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"description":"Form definition not found, or there is no access request for the email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"registration with ID 'test.user@gov.ab.ca' could not be found."}}}}}},"patch":{"tags":["Form registration"],"description":"Approves or denies a pending access request, and records the reviewing administrator and the review time. Requires the `form-access-writer` or `form-admin` role; core users with either role must set `tenantId`. Requests that are no longer pending respond 409. Requests of another tenant or form definition respond 404.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"id","description":"ID of the access request.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationReview"}}}},"responses":{"200":{"description":"Successfully updated the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistration"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"description":"Form definition or access request not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"registration with ID '6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01' could not be found."}}}},"409":{"description":"The access request has already been approved or denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Registration has already been approved."}}}}}}},"/form/v1/definitions/{definitionId}/lifecycle":{"patch":{"tags":["Form"],"description":"Partially updates the lifecycle settings of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowAnonymousApplication":{"type":"boolean","description":"Whether anonymous (unauthenticated) applicants can submit the form."},"allowMultipleFormsPerApplicant":{"type":"boolean","description":"Whether an applicant can submit more than one form. When false, only one form per applicant is allowed."},"createSupportTopic":{"type":"boolean","description":"Whether a support topic is created for each new form."},"securityClassification":{"type":"string","enum":["protected a","protected b","protected c","public"],"description":"Security classification of the form definition."}}},"example":{"allowAnonymousApplication":false,"allowMultipleFormsPerApplicant":true,"createSupportTopic":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated lifecycle settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/roles":{"put":{"tags":["Form"],"description":"Replaces the applicant, assessor, and clerk roles of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The provided roles replace the existing roles entirely; any role array omitted from the request is reset to empty.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"applicantRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to apply. Replaces the existing applicant roles entirely."},"assessorRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to assess submissions. Replaces the existing assessor roles entirely."},"clerkRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to act as clerks. Replaces the existing clerk roles entirely."}}},"example":{"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":["business-licence-clerk"]}}}},"responses":{"200":{"description":"Successfully replaced form definition roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/schedule":{"put":{"tags":["Form schedules"],"description":"Updates the scheduled intake period of a form definition, by updating its event in the calendar service. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Responds with the form definition and its updated intake. A definition that does not exist responds 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutIntakeParameters"}}}},"responses":{"200":{"description":"Successfully updated the intake schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the form definition does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition not found"}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/schemas":{"put":{"tags":["Form"],"description":"Updates the data and UI schemas for an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data-schema":{"type":"object","description":"JSON Schema describing the shape of the form data. If omitted, the existing data schema is preserved."},"ui-schema":{"type":"object","description":"UI schema describing the layout and controls of the form. If omitted, the existing UI schema is preserved."}}},"example":{"data-schema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"ui-schema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]}}}}},"responses":{"204":{"description":"Schemas updated successfully. No content is returned."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/submission-actions":{"patch":{"tags":["Form"],"description":"Partially updates the actions invoked when a form is submitted. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged. Properties other than those listed respond 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"createPDF":{"type":"boolean","description":"Whether to generate a submission PDF using the default submitted-form template."},"createSubmissionRecords":{"type":"boolean","description":"Whether to create submission records when the form is submitted."},"event":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Custom submission event in namespace:name format. Set to null to clear."},"includeDataInEvent":{"type":"boolean","description":"Whether submitted form data is included in the submission event payload."},"taskQueue":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Queue task target in queueNameSpace:queueName format. Set to null to clear."},"dispositionStates":{"type":"array","items":{"type":"object","required":["name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}}},"example":{"createPDF":true,"createSubmissionRecords":true,"event":"business-licence:application-received","includeDataInEvent":false,"taskQueue":"business-licence:intake","dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."},{"id":"rejected","name":"Rejected","description":"Licence is rejected."}]}}}},"responses":{"200":{"description":"Successfully updated submission actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms":{"get":{"tags":["Form"],"description":"Find forms. Users with the form-service admin role, or the export-service export-job role, can find all forms of the tenant. When the criteria include definitionIdEquals, users with one of that definition's assessor roles can find its submitted forms. Other users only find the forms they created, and cannot use includeData. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of forms to return in a page. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"includeData","description":"Flag indicating if form data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created' or 'status' for form fields, and 'data.' followed by\nthe path into the form data for a data value (e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for the forms to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"anonymousApplicantEquals":{"type":"boolean"},"definitionIdEquals":{"type":"string"},"statusEquals":{"type":"string","enum":["draft","locked","submitted","archived"]},"lastAccessedBefore":{"type":"string","format":"date-time"},"lockedBefore":{"type":"string","format":"date-time"},"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"},"hashEquals":{"type":"string"},"dataCriteria":{"type":"object","description":"Values to match in the form data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","statusEquals":"submitted"}}}}],"responses":{"200":{"description":"Successfully retrieved forms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a draft form of a definition in the tenant, optionally with data, and optionally submits it straight away. Requires one of the definition's applicant or clerk roles; if the definition allows anonymous applications, the form-service intake-application role is also accepted. When the definition uses scheduled intakes, forms can only be created during an active intake, unless the user has the form-service form-tester role or the request is a dry run.\n\nAn applicant who creates their own form is set as the form's applicant (and notified by email) when applicant information is included or the definition allows one form per applicant. Clerks and intake applications can provide the details of the applicant they act for.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definitionId":{"type":"string","minLength":1,"maxLength":50},"applicant":{"type":"object","properties":{"id":{"type":"string","description":"ID of an existing notification service subscriber to use as the applicant."},"userId":{"type":"string"},"addressAs":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"}},"required":["channel","address"]}}}},"data":{"type":"object","description":"Initial form data. File references can be embedded as file-service URNs."},"files":{"type":"object","deprecated":true,"description":"Not used; file references are resolved from the data.","additionalProperties":{"type":"string"}},"submit":{"type":"boolean","description":"Submit the form immediately after it is created."},"dryRun":{"type":"boolean","description":"Validate and simulate the request without saving the form."}},"required":["definitionId"]},"examples":{"applicant":{"summary":"Applicant creates their own draft","value":{"definitionId":"business-licence-application"}},"anonymousApplicant":{"summary":"Intake application creates a draft for an anonymous applicant","value":{"definitionId":"business-licence-application","applicant":{"addressAs":"Test User","channels":[{"channel":"email","address":"test.user@gov.ab.ca"}]}}},"createAndSubmit":{"summary":"Create with data and submit","value":{"definitionId":"business-licence-application","data":{"businessName":"Example Bakery Ltd."},"submit":true}}}}}},"responses":{"200":{"description":"Successfully created a form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the definition has no active intake, or the data is not valid for the definition when the form is submitted.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot create form as there is no active intake."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms/{formId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves a form, and its submission if it is submitted. Requires the form-service admin or intake-application role, one of the definition's clerk or assessor roles, or one of its applicant roles for the form's creator (unless the form is archived). Including the data needs the form data access described for `GET /form/v1/forms/{formId}/data`, and fails for locked forms. Core users must set `tenantId`.\n","parameters":[{"name":"includeData","description":"Flag indicating if data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form"],"description":"Executes a form operation. The user must be able to read the form (see `GET /form/v1/forms/{formId}`), and\neach operation needs a further role:\n- `send-code`: the form-service intake-application role. Sends a verification code to the applicant.\n- `unlock`: the form-service admin role. Only locked forms can be unlocked.\n- `submit`: one of the definition's clerk roles, or an applicant role for the form's creator. Only draft forms\n can be submitted, and the data must be valid for the definition's data schema.\n- `to-draft`: the form-service admin role or one of the definition's assessor roles. Only submitted forms can be\n set back to draft.\n- `archive`: the form-service admin role.\n\nCore users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnlockFormOperation"},{"$ref":"#/components/schemas/SubmitFormOperation"},{"$ref":"#/components/schemas/ArchiveFormOperation"},{"$ref":"#/components/schemas/SendCodeOperation"},{"$ref":"#/components/schemas/SetToDraftOperation"}],"discriminator":{"propertyName":"operation","mapping":{"unlock":"#/components/schemas/UnlockFormOperation","submit":"#/components/schemas/SubmitFormOperation","archive":"#/components/schemas/ArchiveFormOperation","send-code":"#/components/schemas/SendCodeOperation","to-draft":"#/components/schemas/SetToDraftOperation"}}},"examples":{"submit":{"summary":"Submit the form","value":{"operation":"submit"}},"sendCode":{"summary":"Send a verification code to the applicant","value":{"operation":"send-code"}},"unlock":{"summary":"Unlock a locked form","value":{"operation":"unlock"}},"toDraft":{"summary":"Set a submitted form back to draft","value":{"operation":"to-draft"}},"archive":{"summary":"Archive the form","value":{"operation":"archive"}}}}}},"responses":{"200":{"description":"Successfully executed operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the form is not in a status that allows the operation, or the data is not valid for the definition on submit.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot submit form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form"],"description":"Deletes a form and its files. Requires the form-service admin role. Draft forms can also be deleted by users with one of the definition's clerk roles, and by their creator with one of the definition's applicant roles. The user must also be able to read the form (see `GET /form/v1/forms/{formId}`). Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully deleted the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/data":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves form data. Requires the form-service admin role, one of the definition's applicant roles for the form's creator, one of its clerk roles while the form is a draft, or one of its assessor roles once it is submitted. Alternatively, a user with the form-service intake-application role can provide the verification code sent to the applicant. Locked forms cannot be read. Core users must set `tenantId`.\n","parameters":[{"name":"code","description":"Verification code sent to the applicant with the send-code operation.","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":10}}],"responses":{"200":{"description":"Successfully retrieved the form data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is locked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Locked form cannot be read."}}}},"401":{"description":"Request does not include a valid bearer token, or the provided code could not be verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Provided code could not be verified."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"put":{"tags":["Form"],"description":"Sets the form data of a draft form. Requires one of the definition's clerk roles, or one of its applicant roles for the form's creator. Files that are no longer referenced in the data are deleted. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Form data. File references can be embedded directly as file-service URNs anywhere in this object."}},"required":["data"]},"example":{"data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}}}},"responses":{"200":{"description":"Successfully updated the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is not a draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot update form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves submissions of a specified form matching search criteria. Requires the form-service admin role,\none of the form definition's assessor roles, or the export-service export-job role. Core users must set\n`tenantId`.\n","parameters":[{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form Submission"],"description":"Update the form disposition for the form submission. Requires the form-service admin role or one of the definition's assessor roles. The status must match the ID or name of one of the definition's disposition states. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully updated the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dispositionStatus":{"type":"string","minLength":1},"dispositionReason":{"type":"string","minLength":1}},"required":["dispositionStatus","dispositionReason"]},"example":{"dispositionStatus":"approved","dispositionReason":"Application meets all eligibility criteria."}}}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"post":{"tags":["Form Submission"],"description":"Adds a reviewer note to the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000}},"required":["content"]},"example":{"content":"Called applicant to confirm their mailing address."}}}},"responses":{"200":{"description":"Successfully added the note to the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes/{noteId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"name":"noteId","description":"ID of the note.","required":true,"in":"path","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/FormTenantId"}],"delete":{"tags":["Form Submission"],"description":"Removes a reviewer note from the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully removed the note from the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/registers":{"get":{"tags":["Form"],"description":"Retrieves the data registers that have both a definition and a data document, i.e. the registers manageable through this API. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the list of data registers.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataRegister"}},"example":[{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}]}}},"400":{"description":"Request has no tenant context. A core user must specify the tenantId query parameter."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"502":{"description":"configuration-service returned an unexpected error."}}},"post":{"tags":["Form"],"description":"Creates a new data register: its definition in the shared platform/configuration-service document, followed by its entries in a data-register/<name> configuration document. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterCreate"},"example":{"name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"201":{"description":"Successfully created the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"409":{"description":"A data register with this name already exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/registers/{name}":{"get":{"tags":["Form"],"description":"Retrieves a data register by name. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; it must have both a definition and a data document to be considered to exist.\n"},"502":{"description":"configuration-service returned an unexpected error."}}},"patch":{"tags":["Form"],"description":"Updates the description and/or entries of an existing data register. Only provided fields are changed: sending description alone leaves the entries unchanged, and vice versa. Entries are written to the latest revision; if an older revision is pinned as active, the pin moves to that revision so the new entries are live. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterUpdate"},"example":{"description":"Updated list of weekdays","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"200":{"description":"Successfully updated the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found."},"502":{"description":"configuration-service returned an unexpected error."}}},"delete":{"tags":["Form"],"description":"Deletes a data register: its entries and its definition. Removes whichever of the two parts still exists, so a retry after a partial failure succeeds. Forms that reference the register in a dropdown or list will lose its options. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register to delete.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the data register."},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; neither a definition nor a data document exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/submissions":{"get":{"tags":["Form Submission"],"description":"Retrieves submissions of the tenant matching search criteria. Requires the form-service admin role or the\nexport-service export-job role. Users with one of a definition's assessor roles can retrieve its submissions by\nincluding definitionIdEquals in the criteria. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form Submission"],"description":"Deletes a form submission. Requires the form-service admin role. Core users must set `tenantId`. A submission that does not exist responds 200 with `deleted: false`.\n","responses":{"200":{"description":"Successfully deleted the form submission, or no submission was found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"FormDefinitionIdPath":{"name":"definitionId","description":"ID of the form definition.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z0-9-]+$"},"example":"business-licence-application"},"FormIdPath":{"name":"formId","description":"ID of the form.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f"},"FormSubmissionIdPath":{"name":"submissionId","description":"ID of the form submission.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"FormTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Required for core (platform) users. Tenant users always act on the tenant of their token, and this parameter is ignored for them.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"FormBadRequest":{"description":"Request is invalid, for example a path, query, or body parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Validation failed with error(s): formId (params) - Invalid value"}}}},"FormDefinitionNotFound":{"description":"Form definition not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"form definition with ID 'business-licence-application' could not be found."}}}},"FormForbidden":{"description":"User does not have the role required for the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to find submissions."}}}},"FormNotFound":{"description":"Form definition, form, or submission not found. Forms and submissions of another tenant also respond 404.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form submission with ID '5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f' could not be found."}}}},"FormUnauthorized":{"description":"Request does not include a valid bearer token."}},"schemas":{"ArchiveFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["archive"]}}},"DataRegister":{"type":"object","required":["name"],"properties":{"namespace":{"type":"string","description":"Namespace of the data register. Always data-register."},"name":{"type":"string","description":"Name of the data register."},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"List of values stored in the register, from its active revision, or its latest revision if none is active.\n","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}},"DataRegisterCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the data register. Unique within the tenant. 1 to 50 letters, numbers, spaces, hyphens and underscores, not starting or ending with a space.\n","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"Initial list of values stored in the register. Defaults to an empty array.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"DataRegisterUpdate":{"type":"object","description":"Partial update payload for a data register. Only provided fields are changed; omitting entries leaves the existing entries unchanged.\n","properties":{"description":{"type":"string","description":"Updated description for the register."},"entries":{"type":"array","description":"Replacement list of values for the register.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"Form":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"jobId":{"type":"string","nullable":true,"description":"ID of the PDF generation job, when submitting the form generates a PDF."},"definition":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}},"applicant":{"type":"object","nullable":true,"properties":{"addressAs":{"type":"string"}}},"status":{"type":"string","enum":["draft","locked","submitted","archived"]},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"formDraftUrl":{"type":"string","description":"URL of the draft form in the application, based on the definition's formDraftUrlTemplate."},"data":{"type":"object","description":"Form data; only included when requested with includeData."},"files":{"type":"object","description":"Form files as file-service URNs; only included when requested with includeData.","additionalProperties":{"type":"string"}},"dryRun":{"type":"boolean","description":"Indicates the form was created as a dry run and was not saved."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"lastAccessed":{"type":"string","format":"date-time"},"locked":{"type":"string","format":"date-time","nullable":true},"submitted":{"type":"string","format":"date-time","nullable":true},"submission":{"type":"object","description":"submission for the form if form is submitted.","properties":{"id":{"type":"string"},"urn":{"type":"string"}}}},"example":{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","jobId":null,"securityClassification":"protected b","definition":{"id":"business-licence-application","name":"Business licence application","description":"Application for a municipal business licence."},"formDraftUrl":"https://form.alberta.ca/business-licence-application/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","status":"draft","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"locked":null,"submitted":null,"lastAccessed":"2026-10-02T15:04:05.000Z","applicant":{"addressAs":"Test User"}}},"FormData":{"type":"object","properties":{"id":{"type":"string","description":"ID of the form."},"data":{"type":"object"},"files":{"type":"object","description":"File-service URNs of the files referenced in the data, keyed by their path in the data.","additionalProperties":{"type":"string"}}},"example":{"id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"},"files":{"proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}},"FormDefinition":{"type":"object","required":["name","anonymousApply","applicantRoles","assessorRoles"],"properties":{"id":{"type":"string","readOnly":true,"description":"Unique identifier for the form definition. Generated from the name in kebab-case when the definition is created, and taken from the path on update.\n"},"revision":{"type":"number","readOnly":true,"description":"Revision of the definition in the configuration service."},"created":{"type":"string","format":"date-time","readOnly":true,"description":"Date the form definition (latest revision) was created. Only returned when listing definitions."},"name":{"type":"string"},"description":{"type":"string"},"anonymousApply":{"type":"boolean","default":false,"description":"Whether anonymous (unauthenticated) applicants can submit the form. Defaults to false."},"oneFormPerApplicant":{"type":"boolean"},"applicantRoles":{"type":"array","description":"Roles allowed to submit the form.","items":{"type":"string"}},"assessorRoles":{"type":"array","description":"Roles allowed to assess submitted forms.","items":{"type":"string"}},"clerkRoles":{"type":"array","description":"Roles allowed to fill in and submit forms on behalf of applicants.","items":{"type":"string"}},"formDraftUrlTemplate":{"type":"string","minLength":6,"maxLength":500,"pattern":"^https?://.+$","description":"Optional URL template for linking applicants back to their draft. Use '{{ id }}' as a placeholder for the form ID (e.g. https://example.com/form/{{ id }}). Must be between 6 and 500 characters.\n"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"},"dispositionStates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}},"generatesPdf":{"type":"boolean","readOnly":true,"description":"Whether a PDF is generated for submissions. Anonymous application definitions never generate one."},"submissionRecords":{"type":"boolean"},"submissionPdfTemplate":{"type":"string","writeOnly":true,"description":"PDF service template used for the submission PDF. Not returned by the form APIs."},"scheduledIntakes":{"type":"boolean","description":"Allow this form definition to accept schedule intakes"},"supportTopic":{"type":"boolean"},"registeredId":{"type":"string","readOnly":true},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"],"writeOnly":true,"description":"The security classification for the form definition. Not returned by the form definition APIs."},"queueTaskToProcess":{"type":"object","writeOnly":true,"description":"Task queue that a task is created in for each submission. Not returned by the form APIs.","properties":{"queueNameSpace":{"type":"string"},"queueName":{"type":"string"}}},"customSubmissionEvent":{"type":"object","writeOnly":true,"description":"Additional event sent when a form is submitted. Not returned by the form APIs.","properties":{"namespace":{"type":"string"},"name":{"type":"string"}}},"includeDataInSubmission":{"type":"boolean","writeOnly":true,"description":"Whether submitted data is included in the form-submitted event. Not returned by the form APIs."},"reviewConfiguration":{"type":"object","description":"Ordered form data fields shown as columns in the Form Admin submission and form lists.","additionalProperties":false,"properties":{"columns":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","description":"Dot-separated path of a leaf field in the form data schema.","minLength":1}}}},"questionsEmail":{"type":"string","description":"Address that applicant questions are forwarded to while no reviewer is part of the conversation. Not returned by the form APIs."}}},"registration":{"type":"object","description":"Restricts the form to approved users. When enabled, users submit an access request answering the registration questions, and an administrator approves or denies it.\n","additionalProperties":false,"required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Whether the form is restricted and accepts access requests. Defaults to false."},"accessGroup":{"type":"string","writeOnly":true,"minLength":1,"maxLength":255,"description":"Keycloak group containing the roles needed to access the form. Not returned by the form APIs.\n"},"dataSchema":{"type":"object","description":"JSON schema (draft-07) of the registration questions. Must not define firstName, lastName or email, which are standard fields of every access request.\n"},"uiSchema":{"type":"object","description":"Layout of the registration questions."}}},"dryRun":{"type":"boolean"},"intake":{"type":"object","readOnly":true,"nullable":true,"properties":{"urn":{"type":"string","description":"The urn of the form schedule intake"},"name":{"type":"string","description":"The description of the form schedule intake"},"description":{"type":"string","description":"The description of the form schedule intake"},"start":{"type":"string","format":"date-time","description":"The start date time of the form schedule intake"},"end":{"type":"string","format":"date-time","description":"The end date time of the form schedule intake"},"isAllDay":{"type":"boolean","description":"Is form schedule intake all day"},"isUpcoming":{"type":"boolean","description":"Is the form schedule intake upcoming"}}}},"example":{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"uiSchema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]},"dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."}],"generatesPdf":true,"submissionRecords":true,"scheduledIntakes":false,"supportTopic":false,"reviewConfiguration":{"columns":[{"path":"businessName"}]},"registration":{"enabled":false},"intake":null}},"FormDefinitionCreate":{"type":"object","description":"Payload for creating a new form definition. Only name and description are accepted; all other fields are set to defaults.","required":["name"],"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"additionalProperties":false,"example":{"name":"Business licence application","description":"Application for a municipal business licence."}},"FormDefinitionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormDefinition"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"created":"2026-09-14T16:20:00.000Z"}],"page":{"next":"MTA=","size":1,"total":24}}},"FormDefinitionPatch":{"type":"object","description":"Partial update payload for a form definition. Only provided fields will be updated; omitted fields will not be changed.","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"}},"additionalProperties":false,"example":{"description":"Application for a municipal business licence, including home-based businesses."}},"FormDeleteResult":{"type":"object","properties":{"deleted":{"type":"boolean"}},"example":{"deleted":true}},"FormDisposition":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"reason":{"type":"string"},"date":{"type":"string","format":"date-time"}}},"FormError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"FormPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Form"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","definition":{"id":"business-licence-application","name":"Business licence application"},"status":"submitted","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"submitted":"2026-10-03T09:30:00.000Z"}],"page":{"next":"MTA=","size":1,"total":312}}},"FormRegistration":{"type":"object","description":"A request for access to a restricted form.","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"formDefinitionId":{"type":"string","readOnly":true},"status":{"type":"string","enum":["pending","approved","denied"],"readOnly":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","description":"Email address of the applicant, stored in lower case."},"data":{"type":"object","description":"Answers to the registration questions of the form definition."},"submittedAt":{"type":"string","format":"date-time","readOnly":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true,"readOnly":true,"description":"Date the request was approved or denied."},"reviewedBy":{"type":"object","nullable":true,"readOnly":true,"description":"Administrator who approved or denied the request.","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"example":{"id":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01","formDefinitionId":"medical-intake","status":"approved","firstName":"Test","lastName":"User","email":"test.user@gov.ab.ca","data":{"profession":"physician","registrationNumber":"12345"},"submittedAt":"2026-11-12T16:00:00.000Z","reviewedAt":"2026-11-13T09:30:00.000Z","reviewedBy":{"id":"1c0fa56b-f818-4cc7-9254-7513aecb5d9f","name":"Admin User"}}},"FormRegistrationCreate":{"type":"object","additionalProperties":false,"required":["firstName","lastName","email"],"properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","maxLength":254},"data":{"type":"object","description":"Answers to the registration questions. Validated against the registration data schema of the form definition; properties the schema does not define respond 400.\n"}},"example":{"firstName":"Test","lastName":"User","email":"test.user@gov.ab.ca","data":{"profession":"physician","registrationNumber":"12345"}}},"FormRegistrationPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormRegistration"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}}},"FormRegistrationReview":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["pending","approved","denied"]}},"example":{"status":"approved"}},"FormRegistrationSubmitted":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"formDefinitionId":{"type":"string"},"status":{"type":"string","enum":["pending"]},"submittedAt":{"type":"string","format":"date-time"}},"example":{"id":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01","formDefinitionId":"medical-intake","status":"pending","submittedAt":"2026-11-12T16:00:00.000Z"}},"FormResultsPageInfo":{"type":"object","properties":{"after":{"type":"string","description":"Cursor of this page."},"next":{"type":"string","description":"Cursor of the next page. Not set on the last page."},"size":{"type":"number","description":"Number of results in this page."},"total":{"type":"number","description":"Total number of available results before filters are applied."}},"example":{"next":"MTA=","size":1,"total":24}},"FormSubmission":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"formId":{"type":"string"},"formDefinitionId":{"type":"string"},"formDefinitionRevision":{"type":"number","description":"Revision of the form definition the form was submitted with."},"formData":{"type":"object"},"formFiles":{"type":"object","additionalProperties":{"type":"string"}},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"hash":{"type":"string","description":"Hash of the submitted data."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updatedBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updated":{"type":"string","format":"date-time"},"disposition":{"$ref":"#/components/schemas/FormDisposition"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmissionNote"}}},"example":{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"formFiles":{},"securityClassification":"protected b","hash":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12","created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"updated":"2026-10-06T14:00:00.000Z","updatedBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"},"disposition":{"id":"9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a","status":"Approved","reason":"Application meets all eligibility criteria.","date":"2026-10-06T14:00:00.000Z"},"notes":[{"id":"7b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","content":"Called applicant to confirm their mailing address.","created":"2026-10-05T10:15:00.000Z","createdBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"}}]}},"FormSubmissionCriteria":{"type":"object","properties":{"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"dispositioned":{"type":"boolean"},"dispositionStatusEquals":{"type":"string"},"dispositionDateBefore":{"type":"string","format":"date-time"},"dispositionDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"}}},"FormSubmissionNote":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"FormSubmissionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"disposition":null,"notes":[]}],"page":{"next":"MTAw","size":1,"total":87}}},"PutIntakeParameters":{"type":"object","description":"Payload for updating schedule intake","required":["name","calendarEventId","start","end"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"calendarEventId":{"type":"integer","description":"ID of the calendar service event for the intake period."}},"example":{"name":"Spring intake","calendarEventId":42,"start":"2026-10-01T15:00:00.000Z","end":"2026-10-31T23:00:00.000Z"}},"SendCodeOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["send-code"]}}},"SetToDraftOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["to-draft"]}}},"SubmitFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["submit"]},"dryRun":{"type":"boolean","description":"Validate and simulate the submission without saving it."}}},"UnlockFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["unlock"]}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Form","description":"API to managed forms."},{"name":"Form Submission","description":"API to review and disposition form submissions."},{"name":"Form schedules","description":"API to manage the scheduled intake periods of form definitions."},{"name":"Form registration","description":"API to request access to restricted forms and to approve or deny those requests."}]}
@@ -92,7 +92,7 @@
92
92
  "urn": "urn:ads:platform:form-service",
93
93
  "name": "Form service",
94
94
  "title": "Form service",
95
- "operations": 31,
95
+ "operations": 35,
96
96
  "file": "form-service.json"
97
97
  },
98
98
  {