---
title: "Handle Form Completion"
method: POST
path: "/api/v2/aws/forms-app/form-completion"
tags: ["v2", "Forms App", "AWS"]
---

# Handle Form Completion

`POST /api/v2/aws/forms-app/form-completion`

Recieves form completion notice from the forms app

Operations:
    Before client response:
        - Check submissions are valid for completion status
            - Raise HTTP Exception if invalid 
                OR
            - Returns valid response to client and queues background task

    Background Task (refer to: form_completion_background_task)

Todo (future):
    - Could use to UPDATE existing participant details if for the same PM etc. 
        (? different form_type, would approval be required by pm for updated values)

## Request body

- FormCompletionRequest
  - `request_id` string, uuid
  - `plan_manager_id` string, uuid, nullable
  - `form_type` string, nullable
  - `form_template_metadata` object, nullable

## Response `200`

Successful Response

- ApiResponseJSON — Standardised JSON Api Response To conforms to Aus Gov recommended format [api.gov.au](https://api.gov.au/sections/api-response.html#response-payload) Which is a modification of [JSON:API]( https://jsonapi.org/format/#introduction) data meta: meta object that contains non-standard meta-information messages: container for informational and warning messages related to the transaction. Not Implemented (not currently required): Links: [HATEOS Links](https://api.gov.au/sections/api-response.html#response-payload)
  - `data` unknown[] — List of items returned in the response following given criteria
    - unknown
  - `meta` ApiResponseMeta — Standardised Api Response Meta Not always required (except for example; with paginated results) Future: Could provide base that includes org information, copy-write etc
    - `processing_time_ms` integer, nullable
    - `total_records` integer, nullable
    - `page` integer, nullable
    - `limit` integer, nullable
    - `count` integer, nullable
    - `cursor` unknown
    - `cursor_last` unknown
    - `more_data_available` boolean, nullable
  - `messages` ApiResponseMessage[], nullable — Response Messages
    - `message_type` 'debug' | 'info' | 'warning' | 'error', required
    - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/caresquare/apis/fastapi.md) · [All operations](https://skmtc.dev/caresquare/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/caresquare/fastapi/revisions/c9df874d8d59/schema)
