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" /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 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" 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" 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: Successful response. content: application/json: schema: $ref: "#/components/schemas/ServiceCreate" 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/EmailCreate" 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/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 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" put: 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 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" patch: operationId: updateCaseDate parameters: - name: id description: Date ID in: path required: true schema: type: number requestBody: required: true description: Successful response. content: application/json: schema: $ref: "#/components/schemas/IssueDateCreate" 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" patch: operationId: updateTenancy 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/TenancyCreate" 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 /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" 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/ClientCreate" 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: 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: array items: $ref: "#/components/schemas/User" 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/User" "400": $ref: "#/components/responses/BadRequest" "403": $ref: "#/components/responses/PermissionDenied" /clerk/api/account/{id}/: 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/UserCreate" 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: "201": 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/{id}/perms-promote/: post: operationId: promoteUserAccountPermissions parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "201": 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/{id}/perms-demote/: post: operationId: demoteUserAccountPermissions parameters: - description: Entity ID in: path name: id required: true schema: type: integer responses: "201": 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/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" 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" 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" 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" 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" 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 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 IssueBase: type: object properties: topic: type: string required: - topic UserCreate: type: object properties: first_name: type: string last_name: type: string email: type: string format: email username: type: string format: email required: - first_name - last_name - email - username User: allOf: - $ref: "#/components/schemas/UserCreate" - type: object properties: id: type: integer case_capacity: type: integer is_intern: type: boolean is_active: type: boolean is_superuser: type: boolean full_name: type: string created_at: type: string groups: type: array items: type: string url: type: string is_admin_or_better: type: boolean is_coordinator_or_better: type: boolean is_paralegal_or_better: type: boolean is_admin: type: boolean is_coordinator: type: boolean is_paralegal: type: boolean is_ms_account_set_up: type: boolean ms_account_created_at: type: string nullable: true required: - id - case_capacity - is_intern - is_active - is_superuser - full_name - created_at - groups - url - is_admin_or_better - is_coordinator_or_better - is_paralegal_or_better - is_admin - is_coordinator - is_paralegal - is_ms_account_set_up - ms_account_created_at ClientBase: type: object properties: first_name: type: string last_name: type: string email: type: string required: - first_name - last_name - email TextChoiceField: type: object properties: display: type: string value: type: string choices: type: array items: type: array items: type: string required: - display - value - choices 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 Client: allOf: - $ref: "#/components/schemas/ClientBase" - type: object properties: id: type: string format: uuid 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 - 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 TenancyBase: type: object properties: address: type: string suburb: type: string nullable: true postcode: type: string nullable: true required: - address - suburb - postcode PersonBase: type: object properties: full_name: type: string email: type: string address: type: string phone_number: type: string required: - full_name - email - address - phone_number Person: allOf: - $ref: "#/components/schemas/PersonBase" - type: object properties: id: type: integer url: type: string support_contact_preferences: $ref: "#/components/schemas/TextChoiceField" required: - id - url - support_contact_preferences Tenancy: allOf: - $ref: "#/components/schemas/TenancyBase" - type: object properties: id: type: integer 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 - 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" weekly_income: type: number nullable: true referrer: type: string referrer_type: $ref: "#/components/schemas/TextChoiceField" tenancy: $ref: "#/components/schemas/Tenancy" weekly_rent: type: integer 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 - weekly_income - 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: allOf: - $ref: "#/components/schemas/ClientBase" - type: object properties: 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 TenancyCreate: allOf: - $ref: "#/components/schemas/TenancyBase" - type: object properties: 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 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 weekly_income: type: number nullable: true referrer: type: string referrer_type: type: string weekly_rent: type: integer nullable: true Error: description: The schema for an error response type: object properties: detail: oneOf: - type: string - type: object - type: array items: oneOf: - type: string - type: object - type: array non_field_errors: type: array items: type: string IssueNoteBase: type: object properties: note_type: type: string text: type: string event: type: string nullable: true required: - note_type - text - event IssueNote: allOf: - $ref: "#/components/schemas/IssueNoteBase" - type: object properties: id: type: number creator: $ref: "#/components/schemas/User" text_display: type: string created_at: type: string reviewee: nullable: true allOf: - $ref: "#/components/schemas/User" required: - id - creator - text_display - created_at - reviewee IssueUpdate: type: object properties: topic: type: string 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 weekly_rent: type: integer nullable: true employment_status: type: string weekly_income: type: number nullable: true referrer: type: string referrer_type: type: string IssueNoteCreate: allOf: - $ref: "#/components/schemas/IssueNoteBase" - type: object properties: creator_id: type: number issue_id: type: string format: uuid required: - creator_id - issue_id 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 ServiceBase: 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 Service: allOf: - $ref: "#/components/schemas/ServiceBase" - type: object properties: id: type: integer issue_id: type: string format: uuid required: - id - issue_id ServiceCreate: allOf: - $ref: "#/components/schemas/ServiceBase" - type: object EmailCreate: type: object properties: issue: type: string format: uuid to_address: type: string from_address: type: string cc_addresses: type: array items: type: string subject: type: string text: type: string html: type: string required: - issue - to_address - from_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 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 - 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 EmailAttachmentCreate: type: object properties: file: type: string format: binary required: - file PersonCreate: allOf: - $ref: "#/components/schemas/PersonBase" - type: object properties: support_contact_preferences: type: string required: - support_contact_preferences IssueDateType: type: string enum: - FILING_DEADLINE - HEARING_LISTED - LIMITATION - NTV_TERMINATION - OTHER IssueDateHearingType: type: string enum: - IN_PERSON - VIRTUAL IssueDateBase: type: object properties: type: $ref: "#/components/schemas/IssueDateType" date: type: string hearing_type: $ref: "#/components/schemas/IssueDateHearingType" hearing_location: type: string required: - type - date IssueDate: allOf: - $ref: "#/components/schemas/IssueDateBase" - type: object properties: id: type: number issue: $ref: "#/components/schemas/Issue" notes: type: string is_reviewed: type: boolean required: - id - issue - notes - is_reviewed IssueDateCreate: allOf: - $ref: "#/components/schemas/IssueDateBase" - type: object properties: issue_id: type: string format: uuid notes: type: string is_reviewed: type: boolean required: - issue_id MicrosoftUserPermissions: type: object properties: has_coordinator_perms: type: boolean paralegal_perm_issues: type: array items: $ref: "#/components/schemas/Issue" paralegal_perm_missing_issues: type: array items: $ref: "#/components/schemas/Issue" required: - has_coordinator_perms - paralegal_perm_issues - paralegal_perm_missing_issues 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" NoContent: description: The specific resource was deleted successfully