openapi: 3.0.1 info: title: Clerk API description: API that the Django backend will provide. version: 0.1.0 paths: /clerk/api/submission/{id}/: get: operationId: getSubmission parameters: - name: id description: Submission ID in: path required: true schema: type: string format: uuid responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Submission" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" "404": $ref: "#/components/responses/NotFound" /clerk/api/case/: get: operationId: getCases parameters: - name: page in: query schema: type: integer required: false - name: page_size in: query schema: type: integer required: false - name: search in: query schema: type: string required: false - name: topic in: query schema: type: string required: false - name: stage in: query schema: type: string required: false - name: outcome in: query schema: type: string required: false - name: is_open in: query schema: type: string required: false - name: paralegal in: query schema: type: string required: false - name: lawyer in: query schema: type: string required: false - name: client in: query schema: type: string required: false responses: "200": description: Successful response. content: application/json: schema: type: object properties: current: type: number next: type: number nullable: true prev: type: number nullable: true page_count: type: number item_count: type: number results: type: array items: $ref: "#/components/schemas/Issue" required: - current - next - prev - page_count - item_count - results post: operationId: createCase requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/IssueCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Issue" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/case/{id}/: get: operationId: getCase parameters: - description: Entity ID in: path name: id required: true schema: type: string format: uuid responses: "200": description: Successful response. content: application/json: schema: type: object properties: issue: $ref: "#/components/schemas/Issue" tenancy: $ref: "#/components/schemas/Tenancy" notes: type: array items: $ref: "#/components/schemas/IssueNote" required: - issue - tenancy - notes "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateCase parameters: - description: Entity ID in: path name: id required: true schema: type: string format: uuid requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueUpdate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Issue" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/case/{id}/note/: post: operationId: createCaseNote parameters: - description: Entity ID in: path name: id required: true schema: type: string format: uuid requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueNoteCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueNote" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/case/{id}/docs/: get: operationId: getCaseDocuments parameters: - description: Entity ID in: path name: id required: true schema: type: string format: uuid responses: "200": description: Successful response. content: application/json: schema: type: object properties: sharepoint_url: type: string documents: type: array items: $ref: "#/components/schemas/SharepointDocument" required: - sharepoint_url - documents /clerk/api/case/{id}/services/: get: operationId: getCaseServices parameters: - name: id description: Entity ID in: path required: true schema: type: string format: uuid - name: category in: query schema: $ref: "#/components/schemas/ServiceCategory" required: false - name: type in: query schema: oneOf: - $ref: "#/components/schemas/ServiceTypeDiscrete" - $ref: "#/components/schemas/ServiceTypeOngoing" required: false responses: "200": description: Successful response. content: application/json: schema: type: array items: $ref: "#/components/schemas/Service" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" post: operationId: createCaseService parameters: - name: id description: Entity ID in: path required: true schema: type: string format: uuid requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/ServiceCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Service" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/case/{id}/services/{service_id}/: get: operationId: getCaseService parameters: - name: id description: Case ID in: path required: true schema: type: string format: uuid - name: service_id description: Service ID in: path required: true schema: type: number responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Service" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateCaseService parameters: - name: id description: Case ID in: path required: true schema: type: string format: uuid - name: service_id description: Service ID in: path required: true schema: type: number requestBody: required: true description: Request body for updating a case service. content: application/json: schema: $ref: "#/components/schemas/ServiceUpdate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Service" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" delete: operationId: deleteCaseService parameters: - name: id description: Case ID in: path required: true schema: type: string format: uuid - name: service_id description: Service ID in: path required: true schema: type: number responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/email/{id}/: get: operationId: getEmailThreads parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - name: slug in: query required: false schema: type: string responses: "200": description: Successful response. content: application/json: schema: type: array items: $ref: "#/components/schemas/EmailThread" /clerk/api/email/{id}/create/: post: operationId: createEmail parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EmailCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Email" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/email/{id}/{email_id}/: get: operationId: getEmail parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - description: Email ID in: path name: email_id required: true schema: type: number responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Email" patch: operationId: updateEmail parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - description: Email ID in: path name: email_id required: true schema: type: number requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/EmailUpdate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Email" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" delete: operationId: deleteEmail parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - description: Email ID in: path name: email_id required: true schema: type: number responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/email/{id}/{email_id}/attachment/: post: operationId: createEmailAttachment parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - description: Email ID in: path name: email_id required: true schema: type: number requestBody: required: true content: multipart/form-data: schema: $ref: "#/components/schemas/EmailAttachmentCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/EmailAttachment" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/email/{id}/{email_id}/attachment/{attachment_id}/: delete: operationId: deleteEmailAttachment parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - description: Email ID in: path name: email_id required: true schema: type: number - description: Email Attachment ID in: path name: attachment_id required: true schema: type: number responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/email/{id}/{email_id}/attachment/{attachment_id}/sharepoint/: post: operationId: uploadEmailAttachmentToSharepoint parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - description: Email ID in: path name: email_id required: true schema: type: number - description: Email Attachment ID in: path name: attachment_id required: true schema: type: number responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/email/{id}/{email_id}/attachment/sharepoint/{sharepoint_id}/: post: operationId: downloadEmailAttachmentFromSharepoint parameters: - description: Case ID in: path name: id required: true schema: type: string format: uuid - description: Email ID in: path name: email_id required: true schema: type: number - description: Sharepoint ID in: path name: sharepoint_id required: true schema: type: string responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/note/: get: operationId: getNotes parameters: - name: page in: query schema: type: integer required: false - name: page_size in: query schema: type: integer required: false - name: issue description: Entity ID in: query schema: type: string format: uuid required: false - name: creator description: Creator account ID in: query schema: type: integer required: false - name: note_type in: query schema: $ref: "#/components/schemas/IssueNoteType" required: false - name: reviewee description: Reviewee account ID in: query schema: type: integer required: false responses: "200": description: Successful response. content: application/json: schema: type: object properties: current: type: number next: type: number nullable: true prev: type: number nullable: true page_count: type: number item_count: type: number results: type: array items: $ref: "#/components/schemas/IssueNote" required: - current - next - prev - page_count - item_count - results "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/person/: get: operationId: getPeople parameters: - name: query in: query schema: type: string required: false - name: page in: query description: Page number (pagination) schema: type: integer required: false - name: page_size in: query description: Number of items per page (pagination) schema: type: integer required: false responses: "200": description: Successful response. content: application/json: schema: type: object properties: current: type: number next: type: number nullable: true prev: type: number nullable: true page_count: type: number item_count: type: number results: type: array items: $ref: "#/components/schemas/Person" required: - current - next - prev - page_count - item_count - results "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" post: operationId: createPerson requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PersonCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Person" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/person/{id}/: get: operationId: getPerson parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Person" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updatePerson parameters: - description: Entity ID in: path name: id required: true schema: type: integer requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PersonCreate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Person" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" delete: operationId: deletePerson parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/date/: get: operationId: getCaseDates parameters: - name: page in: query schema: type: integer required: false - name: page_size in: query schema: type: integer required: false - name: q in: query schema: type: string required: false - name: issue_id description: Entity ID in: query schema: type: string format: uuid required: false - name: type in: query schema: $ref: "#/components/schemas/IssueDateType" required: false - name: is_reviewed in: query schema: type: boolean required: false responses: "200": description: Successful response. content: application/json: schema: type: object properties: current: type: number next: type: number nullable: true prev: type: number nullable: true page_count: type: number item_count: type: number results: type: array items: $ref: "#/components/schemas/IssueDate" required: - current - next - prev - page_count - item_count - results "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" post: operationId: createCaseDate requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueDateCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueDate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/date/{id}/: get: operationId: getCaseDate parameters: - name: id description: Date ID in: path required: true schema: type: number responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueDate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateCaseDate parameters: - name: id description: Date ID in: path required: true schema: type: number requestBody: required: true description: Request body for updating a case date. content: application/json: schema: $ref: "#/components/schemas/IssueDateUpdate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueDate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" delete: operationId: deleteCaseDate parameters: - name: id description: Date ID in: path required: true schema: type: number responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/tenancy/{id}/: get: operationId: getTenancy parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Tenancy" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateTenancy parameters: - description: Entity ID in: path name: id required: true schema: type: integer requestBody: required: true description: Request body for updating a tenancy. content: application/json: schema: $ref: "#/components/schemas/TenancyUpdate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Tenancy" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/client/: get: operationId: getClients parameters: - name: page in: query schema: type: integer required: false - name: page_size in: query schema: type: integer required: false - name: q in: query schema: type: string required: false responses: "200": description: Successful response. content: application/json: schema: type: object properties: current: type: number next: type: number nullable: true prev: type: number nullable: true page_count: type: number item_count: type: number results: type: array items: $ref: "#/components/schemas/Client" required: - current - next - prev - page_count - item_count - results "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/client/{id}/: get: operationId: getClient parameters: - description: Entity ID in: path name: id required: true schema: type: string format: uuid responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Client" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateClient parameters: - description: Entity ID in: path name: id required: true schema: type: string format: uuid requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/ClientUpdate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/Client" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/account/: get: operationId: getUsers parameters: - name: page in: query schema: type: integer required: false - name: page_size in: query schema: type: integer required: false - name: name in: query schema: type: string required: false - name: group in: query schema: type: string required: false - name: is_active in: query schema: type: boolean required: false - name: sort in: query schema: type: string enum: - case_capacity - "-case_capacity" - date_joined - "-date_joined" - email - "-email" - first_name - "-first_name" - last_name - "-last_name" required: false responses: "200": description: Successful response. content: application/json: schema: type: object properties: current: type: number next: type: number nullable: true prev: type: number nullable: true page_count: type: number item_count: type: number results: type: array items: $ref: "#/components/schemas/User" required: - current - next - prev - page_count - item_count - results "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" post: operationId: createUser requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/UserCreate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/account/{id}/: get: operationId: getUser parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/User" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateUser parameters: - description: Entity ID in: path name: id required: true schema: type: integer requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/UserUpdate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/User" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/account/{id}/perms/: get: operationId: getUserAccountPermissions parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/MicrosoftUserPermissions" /clerk/api/account/{id}/perms-resync/: post: operationId: resyncUserAccountPermissions parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "200": description: Successful response. content: application/json: schema: type: object properties: account: $ref: "#/components/schemas/User" permissions: $ref: "#/components/schemas/MicrosoftUserPermissions" required: - account - permissions "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/account/potential/: get: operationId: getPotentialUsers responses: "200": description: Successful response. content: application/json: schema: type: array items: type: object properties: email: type: string format: email first_name: type: string last_name: type: string required: - email - first_name - last_name "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/template-email/: get: operationId: getEmailTemplates parameters: - name: name in: query schema: type: string required: false - name: topic in: query schema: type: string required: false responses: "200": description: Successful response. content: application/json: schema: type: array items: $ref: "#/components/schemas/EmailTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" post: operationId: createEmailTemplate requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EmailTemplateCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/EmailTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/template-email/{id}/: get: operationId: getEmailTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/EmailTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateEmailTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/EmailTemplateCreate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/EmailTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" delete: operationId: deleteEmailTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/template-notify/: get: operationId: getNotificationTemplates parameters: - name: name in: query schema: type: string required: false - name: topic in: query schema: type: string required: false responses: "200": description: Successful response. content: application/json: schema: type: array items: $ref: "#/components/schemas/NotificationTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" post: operationId: createNotificationTemplate requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/NotificationTemplateCreate" responses: "201": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/NotificationTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/template-notify/{id}/: get: operationId: getNotificationTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/NotificationTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" patch: operationId: updateNotificationTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/NotificationTemplateCreate" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/NotificationTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" delete: operationId: deleteNotificationTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/template-doc/: get: operationId: getDocumentTemplates parameters: - name: name in: query schema: type: string required: false - name: topic in: query schema: type: string required: false responses: "200": description: Successful response. content: application/json: schema: type: array items: $ref: "#/components/schemas/DocumentTemplate" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" post: operationId: createDocumentTemplate requestBody: required: true content: multipart/form-data: schema: $ref: "#/components/schemas/DocumentTemplateCreate" responses: "201": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/template-doc/{id}/: delete: operationId: deleteDocumentTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/template-doc/{id}/rename-file/: patch: operationId: renameDocumentTemplate parameters: - description: Entity ID in: path name: id required: true schema: type: integer requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/DocumentTemplateRename" responses: "204": $ref: "#/components/responses/NoContent" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" components: schemas: BooleanYesNo: type: object properties: label: type: string enum: - "Yes" - "No" value: type: boolean required: - label - value ChoiceDisplay: type: object properties: label: type: string value: type: string required: - label - value SubmissionPerson: type: object properties: name: type: string nullable: true address: type: string nullable: true email: type: string nullable: true phone_number: type: string nullable: true support_contact_preferences: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true SubmissionFiles: type: array items: type: object properties: url: type: string name: type: string SubmissionAnswers: type: object properties: client: type: object properties: first_name: type: string nullable: true last_name: type: string nullable: true preferred_name: type: string nullable: true email: type: string nullable: true date_of_birth: type: string nullable: true phone_number: type: string nullable: true gender: type: string nullable: true centrelink_support: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true eligibility_notes: type: string nullable: true requires_interpreter: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true primary_language_non_english: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true primary_language: type: string nullable: true is_aboriginal_or_torres_strait_islander: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true number_of_dependents: type: integer nullable: true eligibility_circumstances: type: array items: $ref: "#/components/schemas/ChoiceDisplay" nullable: true call_times: type: array items: $ref: "#/components/schemas/ChoiceDisplay" nullable: true special_circumstances: type: array items: $ref: "#/components/schemas/ChoiceDisplay" nullable: true tenancy: properties: address: type: string nullable: true suburb: type: string nullable: true postcode: type: string nullable: true is_on_lease: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true rental_circumstances: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true start_date: type: string nullable: true landlord: allOf: - $ref: "#/components/schemas/SubmissionPerson" nullable: true agent: allOf: - $ref: "#/components/schemas/SubmissionPerson" nullable: true issue: properties: issues: type: array items: $ref: "#/components/schemas/ChoiceDisplay" nullable: true weekly_income: type: integer nullable: true annual_income_range: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true employment_status: type: array items: $ref: "#/components/schemas/ChoiceDisplay" nullable: true referrer: type: string nullable: true referrer_type: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true weekly_rent: type: integer nullable: true support_worker: allOf: - $ref: "#/components/schemas/SubmissionPerson" nullable: true topic_specific: nullable: true properties: REPAIRS: type: object nullable: true properties: issue_start: type: string nullable: true issue_photos: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true applied_vcat: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true vcat: type: array items: $ref: "#/components/schemas/ChoiceDisplay" nullable: true issue_description: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true required: type: array items: type: string nullable: true BONDS: type: object nullable: true properties: claim_reasons: type: array items: type: string nullable: true cleaning_claim_amount: type: integer nullable: true cleaning_claim_description: type: string nullable: true cleaning_documents: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true damage_caused_by_tenant: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true damage_claim_amount: type: integer nullable: true damage_claim_description: type: string nullable: true damage_quote: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true has_landlord_made_rtba_application: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true landlord_intents_to_make_claim: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true locks_changed_by_tenant: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true locks_claim_amount: type: integer nullable: true locks_change_quote: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true money_is_owed_by_tenant: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true money_owed_claim_amount: type: integer nullable: true money_owed_claim_description: type: string nullable: true move_out_date: type: string nullable: true other_reasons_amount: type: integer nullable: true other_reasons_description: type: string nullable: true tenant_has_rtba_application_copy: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true rtba_application: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true EVICTION_ARREARS: type: object nullable: true properties: doc_delivery_time_notice_to_vacate: type: string nullable: true has_notice: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true is_already_removed: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true is_unpaid_rent: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true is_vcat_date: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true notice_send_date: type: string nullable: true notice_vacate_date: type: string nullable: true payment_fail_description: type: string nullable: true payment_fail_reason: type: array items: type: string nullable: true vcat_date: type: string nullable: true documents: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true can_afford_payment_plan: allOf: - $ref: "#/components/schemas/ChoiceDisplay" nullable: true documents_provided: type: array items: type: string nullable: true delivery_method_notice_to_vacate: type: string nullable: true delivery_method_other_docs: type: string nullable: true delivery_method_possession_order: type: string nullable: true doc_delivery_time_other_docs: type: string nullable: true doc_delivery_time_possession_order: type: string nullable: true is_on_payment_plan: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true miscellaneous: type: string nullable: true payment_amount: type: integer nullable: true payment_fail_change: type: string nullable: true rent_cycle: type: string nullable: true rent_unpaid: type: integer nullable: true EVICTION_RETALIATORY: type: object nullable: true properties: date_received_ntv: type: string nullable: true has_notice: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true is_already_removed: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true ntv_type: type: string nullable: true retaliatory_reason: type: array items: type: string nullable: true retaliatory_reason_other: type: string nullable: true termination_date: type: string nullable: true vcat_hearing: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true vcat_hearing_date: type: string nullable: true documents: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true RENT_REDUCTION: type: object nullable: true properties: issues: type: array items: type: string nullable: true issue_description: type: string nullable: true issue_photos: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true issue_start: type: string nullable: true is_notice_to_vacate: allOf: - $ref: "#/components/schemas/BooleanYesNo" nullable: true notice_to_vacate: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true HEALTH_CHECK: type: object nullable: true properties: support_worker_authority: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true tenancy_documents: allOf: - $ref: "#/components/schemas/SubmissionFiles" nullable: true OTHER: type: object nullable: true properties: issue_description: type: string nullable: true Submission: type: object properties: id: type: string format: uuid answers_raw: type: object additionalProperties: true answers: allOf: - $ref: "#/components/schemas/SubmissionAnswers" nullable: true created_at: type: string required: - id - answers_raw - answers - created_at Error: type: object description: | Standardized error envelope produced by drf-standardized-errors. Every 4xx/5xx response shares this shape: a `type` describing the error category and a list of one or more individual `errors`. properties: type: type: string description: The category of error that occurred. enum: - validation_error - client_error - server_error example: validation_error errors: type: array description: The individual errors that make up this response. items: type: object properties: code: type: string description: A machine-readable code identifying the error. example: required detail: type: string description: A human-readable description of the error. example: This field is required. attr: type: string nullable: true description: | The name of the field that raised the error, or null for errors not tied to a specific field. Non-field validation errors use "non_field_errors". example: email required: - code - detail - attr required: - type - errors IssueBase: type: object properties: topic: type: string required: - topic TextChoiceListField: type: object properties: display: type: string value: type: array items: type: string choices: type: array items: type: array items: type: string required: - display - value - choices User: type: object properties: id: type: integer first_name: type: string last_name: type: string email: type: string format: email url: type: string readOnly: true case_capacity: type: integer is_intern: type: boolean is_active: type: boolean groups: $ref: "#/components/schemas/TextChoiceListField" is_superuser: type: boolean full_name: type: string created_at: type: string is_admin_or_better: type: boolean is_coordinator_or_better: type: boolean is_lawyer_or_better: type: boolean is_paralegal_or_better: type: boolean is_admin: type: boolean is_coordinator: type: boolean is_lawyer: type: boolean is_paralegal: type: boolean is_ms_account_set_up: type: boolean ms_account_created_at: type: string nullable: true required: - first_name - last_name - email - url - id - case_capacity - is_intern - is_active - groups - is_superuser - full_name - created_at - is_admin_or_better - is_coordinator_or_better - is_lawyer_or_better - is_paralegal_or_better - is_admin - is_coordinator - is_lawyer - is_paralegal - is_ms_account_set_up - ms_account_created_at TextChoiceField: type: object properties: display: type: string value: type: string choices: type: array items: type: array items: type: string required: - display - value - choices Client: type: object properties: id: type: string format: uuid first_name: type: string last_name: type: string email: type: string date_of_birth: type: string nullable: true preferred_name: type: string nullable: true phone_number: type: string gender: type: string nullable: true pronouns: type: string nullable: true centrelink_support: type: boolean eligibility_notes: type: string primary_language_non_english: type: boolean primary_language: type: string number_of_dependents: type: number nullable: true notes: type: string url: type: string age: type: integer nullable: true full_name: type: string contact_notes: type: string contact_restriction: $ref: "#/components/schemas/TextChoiceField" requires_interpreter: $ref: "#/components/schemas/TextChoiceField" is_aboriginal_or_torres_strait_islander: $ref: "#/components/schemas/TextChoiceField" call_times: $ref: "#/components/schemas/TextChoiceListField" eligibility_circumstances: $ref: "#/components/schemas/TextChoiceListField" required: - id - first_name - last_name - email - date_of_birth - preferred_name - phone_number - gender - pronouns - centrelink_support - eligibility_notes - primary_language_non_english - primary_language - number_of_dependents - notes - url - age - full_name - contact_restriction - requires_interpreter - is_aboriginal_or_torres_strait_islander - call_times - eligibility_circumstances PersonBase: type: object properties: full_name: type: string required: - full_name Person: allOf: - $ref: "#/components/schemas/PersonBase" - type: object properties: id: type: integer email: type: string address: type: string phone_number: type: string url: type: string support_contact_preferences: $ref: "#/components/schemas/TextChoiceField" required: - id - email - address - phone_number - url - support_contact_preferences Tenancy: type: object properties: id: type: integer address: type: string suburb: type: string nullable: true postcode: type: string nullable: true started: type: string nullable: true url: type: string is_on_lease: $ref: "#/components/schemas/TextChoiceField" rental_circumstances: $ref: "#/components/schemas/TextChoiceField" landlord: allOf: - $ref: "#/components/schemas/Person" nullable: true agent: allOf: - $ref: "#/components/schemas/Person" nullable: true required: - id - address - suburb - postcode - started - url - is_on_lease - rental_circumstances - landlord - agent Issue: allOf: - $ref: "#/components/schemas/IssueBase" - type: object properties: id: type: string format: uuid topic_display: type: string stage: type: string stage_display: type: string outcome: type: string nullable: true outcome_display: type: string nullable: true outcome_notes: type: string fileref: type: string provided_legal_services: type: boolean is_open: type: boolean is_sharepoint_set_up: type: boolean paralegal: nullable: true allOf: - $ref: "#/components/schemas/User" lawyer: nullable: true allOf: - $ref: "#/components/schemas/User" client: $ref: "#/components/schemas/Client" employment_status: $ref: "#/components/schemas/TextChoiceListField" referrer: type: string referrer_type: $ref: "#/components/schemas/TextChoiceField" tenancy: $ref: "#/components/schemas/Tenancy" weekly_rent: type: integer nullable: true annual_income_range: $ref: "#/components/schemas/TextChoiceField" nullable: true support_worker: nullable: true allOf: - $ref: "#/components/schemas/Person" actionstep_id: type: integer nullable: true created_at: type: string url: type: string answers: type: object additionalProperties: type: string nullable: true is_conflict_check: type: boolean nullable: true is_eligibility_check: type: boolean nullable: true next_review: type: string nullable: true submission_id: type: string format: uuid nullable: true required: - id - topic_display - stage - stage_display - outcome - outcome_display - outcome_notes - fileref - paralegal - provided_legal_services - is_open - lawyer - client - employment_status - referrer - referrer_type - tenancy - weekly_rent - support_worker - is_sharepoint_set_up - actionstep_id - created_at - url - answers - is_conflict_check - is_eligibility_check - next_review - submission_id ClientCreate: type: object properties: first_name: type: string last_name: type: string email: type: string date_of_birth: type: string nullable: true preferred_name: type: string nullable: true phone_number: type: string gender: type: string nullable: true pronouns: type: string nullable: true centrelink_support: type: boolean eligibility_notes: type: string primary_language_non_english: type: boolean primary_language: type: string number_of_dependents: type: number nullable: true notes: type: string url: type: string age: type: integer nullable: true full_name: type: string contact_notes: type: string contact_restriction: type: string requires_interpreter: type: string is_aboriginal_or_torres_strait_islander: type: string call_times: type: array items: type: string eligibility_circumstances: type: array items: type: string required: - first_name - last_name - email TenancyCreate: type: object properties: address: type: string suburb: type: string nullable: true postcode: type: string nullable: true started: type: string nullable: true is_on_lease: type: string rental_circumstances: type: string landlord_id: type: number nullable: true agent_id: type: number nullable: true required: - address - suburb - postcode IssueCreate: allOf: - $ref: "#/components/schemas/IssueBase" - type: object properties: client_id: type: string format: uuid description: One of client_id or client is required. client: $ref: "#/components/schemas/ClientCreate" tenancy_id: type: number description: One of tenancy_id or tenancy is required. tenancy: $ref: "#/components/schemas/TenancyCreate" stage: type: string outcome: type: string nullable: true outcome_notes: type: string provided_legal_services: type: boolean paralegal_id: type: number nullable: true lawyer_id: type: number nullable: true support_worker_id: type: number nullable: true employment_status: type: string annual_income_range: type: string nullable: true referrer: type: string referrer_type: type: string weekly_rent: type: integer nullable: true IssueNoteCreator: type: object properties: id: type: integer first_name: type: string last_name: type: string email: type: string full_name: type: string url: type: string required: - id - first_name - last_name - email - full_name - url IssueNote: type: object properties: id: type: number note_type: type: string text: type: string event: type: string nullable: true creator: $ref: "#/components/schemas/IssueNoteCreator" text_display: type: string created_at: type: string reviewee: nullable: true allOf: - $ref: "#/components/schemas/User" required: - id - note_type - text - event - creator - text_display - created_at - reviewee IssueUpdate: type: object properties: topic: type: string stage: type: string is_open: type: boolean outcome: type: string nullable: true outcome_notes: type: string provided_legal_services: type: boolean paralegal_id: type: number nullable: true lawyer_id: type: number nullable: true support_worker_id: type: number nullable: true weekly_rent: type: integer nullable: true employment_status: type: string annual_income_range: type: string nullable: true referrer: type: string referrer_type: type: string IssueNoteCreate: type: object properties: note_type: type: string text: type: string event: type: string nullable: true required: - note_type - text SharepointDocument: type: object properties: name: type: string url: type: string id: type: string size: type: number is_file: type: boolean required: - name - url - id - size - is_file ServiceCategory: type: string enum: - DISCRETE - ONGOING ServiceTypeDiscrete: type: string enum: - LEGAL_ADVICE - LEGAL_TASK - GENERAL_INFORMATION - GENERAL_REFERRAL_SIMPLE - GENERAL_REFERRAL_FACILITATED ServiceTypeOngoing: type: string enum: - LEGAL_SUPPORT - REPRESENTATION_COURT_TRIBUNAL - REPRESENTATION_OTHER Service: type: object properties: id: type: integer issue_id: type: string format: uuid category: $ref: "#/components/schemas/ServiceCategory" type: oneOf: - $ref: "#/components/schemas/ServiceTypeDiscrete" - $ref: "#/components/schemas/ServiceTypeOngoing" started_at: type: string finished_at: type: string nullable: true count: type: number nullable: true notes: type: string nullable: true required: - id - issue_id - category - type - started_at - finished_at - count - notes ServiceCreate: type: object properties: category: $ref: "#/components/schemas/ServiceCategory" type: oneOf: - $ref: "#/components/schemas/ServiceTypeDiscrete" - $ref: "#/components/schemas/ServiceTypeOngoing" started_at: type: string finished_at: type: string nullable: true count: type: number nullable: true notes: type: string nullable: true required: - category - type - started_at - finished_at - count - notes ServiceUpdate: type: object properties: category: $ref: "#/components/schemas/ServiceCategory" type: oneOf: - $ref: "#/components/schemas/ServiceTypeDiscrete" - $ref: "#/components/schemas/ServiceTypeOngoing" started_at: type: string finished_at: type: string nullable: true count: type: number nullable: true notes: type: string nullable: true EmailCreate: type: object properties: to_address: type: string cc_addresses: type: array items: type: string subject: type: string text: type: string html: type: string state: type: string required: - to_address - cc_addresses - subject - text - html EmailAttachment: type: object properties: id: type: number url: type: string name: type: string sharepoint_state: type: string content_type: type: string email: type: number required: - id - url - name - sharepoint_state - content_type - email Email: allOf: - $ref: "#/components/schemas/EmailCreate" - type: object properties: id: type: number issue: type: string format: uuid from_address: type: string created_at: type: string processed_at: type: string nullable: true sender: $ref: "#/components/schemas/User" nullable: true state: type: string reply_url: type: string edit_url: type: string attachments: type: array items: $ref: "#/components/schemas/EmailAttachment" required: - id - issue - from_address - created_at - processed_at - sender - state - reply_url - edit_url - attachments EmailThread: type: object properties: emails: type: array items: $ref: "#/components/schemas/Email" subject: type: string slug: type: string most_recent: type: string url: type: string required: - emails - subject - slug - most_recent - url EmailUpdate: type: object properties: to_address: type: string cc_addresses: type: array items: type: string subject: type: string text: type: string html: type: string state: type: string EmailAttachmentCreate: type: object properties: file: type: string format: binary required: - file IssueNoteType: type: string enum: - CONFLICT_CHECK_FAILURE - CONFLICT_CHECK_SUCCESS - ELIGIBILITY_CHECK_FAILURE - ELIGIBILITY_CHECK_SUCCESS - EMAIL - EVENT - PARALEGAL - PERFORMANCE - REVIEW PersonCreate: allOf: - $ref: "#/components/schemas/PersonBase" - type: object properties: email: type: string address: type: string phone_number: type: string support_contact_preferences: type: string IssueDateType: type: string enum: - FILING_DEADLINE - HEARING_LISTED - LIMITATION - NTV_TERMINATION - OTHER IssueDateHearingType: type: string enum: - IN_PERSON - VIRTUAL IssueDate: type: object properties: id: type: number type: $ref: "#/components/schemas/IssueDateType" date: type: string hearing_type: $ref: "#/components/schemas/IssueDateHearingType" hearing_location: type: string issue: $ref: "#/components/schemas/Issue" notes: type: string is_reviewed: type: boolean required: - id - type - date - issue - notes - is_reviewed IssueDateCreate: type: object properties: type: $ref: "#/components/schemas/IssueDateType" date: type: string issue_id: type: string format: uuid hearing_type: $ref: "#/components/schemas/IssueDateHearingType" hearing_location: type: string notes: type: string is_reviewed: type: boolean required: - type - date - issue_id IssueDateUpdate: type: object properties: type: $ref: "#/components/schemas/IssueDateType" date: type: string issue_id: type: string format: uuid hearing_type: $ref: "#/components/schemas/IssueDateHearingType" hearing_location: type: string notes: type: string is_reviewed: type: boolean TenancyUpdate: type: object properties: address: type: string suburb: type: string nullable: true postcode: type: string nullable: true started: type: string nullable: true is_on_lease: type: string rental_circumstances: type: string landlord_id: type: number nullable: true agent_id: type: number nullable: true ClientUpdate: type: object properties: first_name: type: string last_name: type: string email: type: string date_of_birth: type: string nullable: true preferred_name: type: string nullable: true phone_number: type: string gender: type: string nullable: true pronouns: type: string nullable: true centrelink_support: type: boolean eligibility_notes: type: string primary_language_non_english: type: boolean primary_language: type: string number_of_dependents: type: number nullable: true notes: type: string url: type: string age: type: integer nullable: true full_name: type: string contact_notes: type: string contact_restriction: type: string requires_interpreter: type: string is_aboriginal_or_torres_strait_islander: type: string call_times: type: array items: type: string eligibility_circumstances: type: array items: type: string UserCreate: type: object properties: first_name: type: string last_name: type: string email: type: string format: email url: type: string readOnly: true groups: type: array items: type: string required: - first_name - last_name - email - url - groups UserUpdate: type: object properties: first_name: type: string last_name: type: string email: type: string format: email url: type: string readOnly: true groups: type: array items: type: string MicrosoftUserPermissions: type: object properties: access_level: type: string enum: - FULL_ACCESS - PARTIAL_ACCESS - NO_ACCESS issues_with_access: type: array items: $ref: "#/components/schemas/Issue" issues_without_access: type: array items: $ref: "#/components/schemas/Issue" required: - access_level - issues_with_access - issues_without_access EmailTemplateCreate: type: object properties: name: type: string topic: type: string subject: type: string text: type: string required: - name - topic - subject - text EmailTemplate: allOf: - $ref: "#/components/schemas/EmailTemplateCreate" - type: object properties: id: type: integer url: type: string created_at: type: string required: - id - url - created_at NotificationTemplateBase: type: object properties: name: type: string topic: type: string event_stage: type: string raw_text: type: string message_text: type: string required: - name - topic - event_stage - raw_text - message_text NotificationTemplate: allOf: - $ref: "#/components/schemas/NotificationTemplateBase" - type: object properties: id: type: integer url: type: string created_at: type: string event: $ref: "#/components/schemas/TextChoiceField" channel: $ref: "#/components/schemas/TextChoiceField" target: $ref: "#/components/schemas/TextChoiceField" required: - id - url - created_at - event - channel - target NotificationTemplateCreate: allOf: - $ref: "#/components/schemas/NotificationTemplateBase" - type: object properties: event: type: string channel: type: string target: type: string required: - event - channel - target DocumentTemplate: type: object properties: id: type: number name: type: string topic: type: string url: type: string created_at: type: string modified_at: type: string required: - id - name - topic - url - created_at - modified_at DocumentTemplateCreate: type: object properties: topic: type: string files: type: array items: type: string format: binary required: - topic - files DocumentTemplateRename: type: object properties: name: type: string required: - name responses: BadRequest: description: Bad request content: application/json: schema: $ref: "#/components/schemas/Error" PermissionDenied: description: Permission Denied content: application/json: schema: $ref: "#/components/schemas/Error" NotFound: description: The requested resource was not found content: application/json: schema: $ref: "#/components/schemas/Error" NoContent: description: The specific resource was deleted successfully