> For the complete documentation index, see [llms.txt](https://tsanet.gitbook.io/connect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tsanet.gitbook.io/connect/api-reference/form-request.md).

# Form Request

Form templates for collaboration requests

## GET /v1/forms/document/{documentId}

> Get a form by document ID

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Form Request","description":"Form templates for collaboration requests"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/forms/document/{documentId}":{"get":{"tags":["Form Request"],"summary":"Get a form by document ID","operationId":"getFormByDocumentId","parameters":[{"name":"documentId","in":"path","description":"The identifier of the document form to retrieve","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Form template for the document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CollaborationRequestDTO":{"required":["customFields","documentId","internalCaseNumber","internalNotes","priority","problemDescription","problemSummary","testSubmission"],"type":"object","properties":{"documentId":{"type":"integer","format":"int64"},"internalCaseNumber":{"type":"string"},"receiverInternalCaseNumber":{"type":"string"},"problemSummary":{"type":"string"},"problemDescription":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"adminNote":{"type":"string"},"escalationInstructions":{"type":"string"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/FieldMetadataDTO"}},"internalNotes":{"type":"array","items":{"$ref":"#/components/schemas/InternalNoteDTO"}},"testSubmission":{"type":"boolean"}}},"ContactDetailsDTO":{"required":["email","name","phone"],"type":"object","properties":{"name":{"type":"string","description":"Full name of the contact"},"email":{"type":"string","description":"Email address of the contact"},"phone":{"type":"string","description":"Phone number of the contact"}}},"FieldMetadataDTO":{"required":["displayOrder","fieldId","label","required","section","type"],"type":"object","properties":{"fieldId":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"label":{"type":"string"},"options":{"type":"string"},"additionalSettings":{"type":"string"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]},"displayOrder":{"type":"integer","format":"int32"},"validationRules":{"type":"string"},"value":{"type":"string"},"selections":{"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}},"required":{"type":"boolean"}}},"SelectionDTO":{"type":"object","properties":{"value":{"type":"string"},"children":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}}}},"InternalNoteDTO":{"type":"object","properties":{"note":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}
```

## GET /v1/forms/department/{departmentId}

> Get a form by department ID

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Form Request","description":"Form templates for collaboration requests"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/forms/department/{departmentId}":{"get":{"tags":["Form Request"],"summary":"Get a form by department ID","operationId":"getFormByDepartmentId","parameters":[{"name":"departmentId","in":"path","description":"The identifier of the department who you would like to collaborate with","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Form template for the department","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CollaborationRequestDTO":{"required":["customFields","documentId","internalCaseNumber","internalNotes","priority","problemDescription","problemSummary","testSubmission"],"type":"object","properties":{"documentId":{"type":"integer","format":"int64"},"internalCaseNumber":{"type":"string"},"receiverInternalCaseNumber":{"type":"string"},"problemSummary":{"type":"string"},"problemDescription":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"adminNote":{"type":"string"},"escalationInstructions":{"type":"string"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/FieldMetadataDTO"}},"internalNotes":{"type":"array","items":{"$ref":"#/components/schemas/InternalNoteDTO"}},"testSubmission":{"type":"boolean"}}},"ContactDetailsDTO":{"required":["email","name","phone"],"type":"object","properties":{"name":{"type":"string","description":"Full name of the contact"},"email":{"type":"string","description":"Email address of the contact"},"phone":{"type":"string","description":"Phone number of the contact"}}},"FieldMetadataDTO":{"required":["displayOrder","fieldId","label","required","section","type"],"type":"object","properties":{"fieldId":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"label":{"type":"string"},"options":{"type":"string"},"additionalSettings":{"type":"string"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]},"displayOrder":{"type":"integer","format":"int32"},"validationRules":{"type":"string"},"value":{"type":"string"},"selections":{"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}},"required":{"type":"boolean"}}},"SelectionDTO":{"type":"object","properties":{"value":{"type":"string"},"children":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}}}},"InternalNoteDTO":{"type":"object","properties":{"note":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}
```

## GET /v1/forms/company/{companyId}

> Get a form by company ID

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Form Request","description":"Form templates for collaboration requests"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/forms/company/{companyId}":{"get":{"tags":["Form Request"],"summary":"Get a form by company ID","operationId":"getFormByCompanyId","parameters":[{"name":"companyId","in":"path","description":"The identifier of the company who you would like to collaborate with","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Form template for the company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CollaborationRequestDTO":{"required":["customFields","documentId","internalCaseNumber","internalNotes","priority","problemDescription","problemSummary","testSubmission"],"type":"object","properties":{"documentId":{"type":"integer","format":"int64"},"internalCaseNumber":{"type":"string"},"receiverInternalCaseNumber":{"type":"string"},"problemSummary":{"type":"string"},"problemDescription":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"adminNote":{"type":"string"},"escalationInstructions":{"type":"string"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/FieldMetadataDTO"}},"internalNotes":{"type":"array","items":{"$ref":"#/components/schemas/InternalNoteDTO"}},"testSubmission":{"type":"boolean"}}},"ContactDetailsDTO":{"required":["email","name","phone"],"type":"object","properties":{"name":{"type":"string","description":"Full name of the contact"},"email":{"type":"string","description":"Email address of the contact"},"phone":{"type":"string","description":"Phone number of the contact"}}},"FieldMetadataDTO":{"required":["displayOrder","fieldId","label","required","section","type"],"type":"object","properties":{"fieldId":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"label":{"type":"string"},"options":{"type":"string"},"additionalSettings":{"type":"string"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]},"displayOrder":{"type":"integer","format":"int32"},"validationRules":{"type":"string"},"value":{"type":"string"},"selections":{"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}},"required":{"type":"boolean"}}},"SelectionDTO":{"type":"object","properties":{"value":{"type":"string"},"children":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}}}},"InternalNoteDTO":{"type":"object","properties":{"note":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}
```
