> 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/company/{companyId}

> Get a form by company ID

```json
{"openapi":"3.0.3","info":{"title":"TSANet Connect Core API","version":"1.0.0"},"tags":[{"name":"Form Request","description":"Form templates for collaboration requests"}],"servers":[{"url":"http://localhost:8080","description":"Local"},{"url":"https://connect2.tahoelab.us","description":"Dev"},{"url":"https://connect2.tsanet.net","description":"Beta"},{"url":"https://connect2.tsanet.org","description":"Prod"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste a Bearer JWT here. Two token types are accepted:\n\n**Connect1 User Tokens** — issued by the Connect1 identity service. Copy the token from your Connect1 session.\n\n**Azure AD M2M** — use the `azureClientCredentials` scheme below to get a token, then paste it here.\n"}},"schemas":{"CollaborationRequestDTO":{"type":"object","required":["customFields","internalCaseNumber","problemSummary","problemDescription","documentId","priority","internalNotes","testSubmission"],"properties":{"documentId":{"type":"integer","format":"int64"},"internalCaseNumber":{"type":"string","maxLength":191},"receiverInternalCaseNumber":{"type":"string","maxLength":191},"problemSummary":{"type":"string","maxLength":500},"problemDescription":{"type":"string","maxLength":10000},"priority":{"$ref":"#/components/schemas/CasePriority"},"adminNote":{"type":"string","maxLength":2000},"escalationInstructions":{"type":"string","maxLength":2000},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO","description":"Contact details of the engineer submitting the collaboration request"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/FieldMetadataDTO"}},"internalNotes":{"type":"array","items":{"$ref":"#/components/schemas/InternalNoteDTO"}},"testSubmission":{"type":"boolean"}}},"CasePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"ContactDetailsDTO":{"type":"object","required":["name","email","phone"],"properties":{"name":{"type":"string","maxLength":191,"description":"Full name of the contact"},"email":{"type":"string","format":"email","maxLength":191,"description":"Email address of the contact"},"phone":{"type":"string","maxLength":50,"description":"Phone number of the contact"}}},"FieldMetadataDTO":{"type":"object","required":["fieldId","section","label","type","displayOrder","required"],"properties":{"fieldId":{"type":"integer","format":"int64"},"section":{"$ref":"#/components/schemas/FieldMetadataSection"},"label":{"type":"string","maxLength":191},"options":{"type":"string","maxLength":5000},"additionalSettings":{"type":"string","maxLength":5000},"type":{"$ref":"#/components/schemas/FieldMetadataType"},"displayOrder":{"type":"integer","format":"int32"},"validationRules":{"type":"string","maxLength":191},"value":{"type":"string","maxLength":5000},"selections":{"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}},"required":{"type":"boolean"}}},"FieldMetadataSection":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"FieldMetadataType":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]},"SelectionDTO":{"type":"object","properties":{"value":{"type":"string","maxLength":191},"children":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}}}},"InternalNoteDTO":{"type":"object","properties":{"note":{"type":"string","maxLength":5000}}},"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"}}},"ProblemDetail":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"}},"additionalProperties":true}}},"paths":{"/v1/forms/company/{companyId}":{"get":{"tags":["Form Request"],"summary":"Get a form by company ID","operationId":"getFormByCompanyId","parameters":[{"name":"companyId","in":"path","required":true,"description":"The identifier of the company who you would like to collaborate with","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Form template for the company","content":{"application/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/ProblemDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}}}}}}}
```

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

> Get a form by department ID

```json
{"openapi":"3.0.3","info":{"title":"TSANet Connect Core API","version":"1.0.0"},"tags":[{"name":"Form Request","description":"Form templates for collaboration requests"}],"servers":[{"url":"http://localhost:8080","description":"Local"},{"url":"https://connect2.tahoelab.us","description":"Dev"},{"url":"https://connect2.tsanet.net","description":"Beta"},{"url":"https://connect2.tsanet.org","description":"Prod"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste a Bearer JWT here. Two token types are accepted:\n\n**Connect1 User Tokens** — issued by the Connect1 identity service. Copy the token from your Connect1 session.\n\n**Azure AD M2M** — use the `azureClientCredentials` scheme below to get a token, then paste it here.\n"}},"schemas":{"CollaborationRequestDTO":{"type":"object","required":["customFields","internalCaseNumber","problemSummary","problemDescription","documentId","priority","internalNotes","testSubmission"],"properties":{"documentId":{"type":"integer","format":"int64"},"internalCaseNumber":{"type":"string","maxLength":191},"receiverInternalCaseNumber":{"type":"string","maxLength":191},"problemSummary":{"type":"string","maxLength":500},"problemDescription":{"type":"string","maxLength":10000},"priority":{"$ref":"#/components/schemas/CasePriority"},"adminNote":{"type":"string","maxLength":2000},"escalationInstructions":{"type":"string","maxLength":2000},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO","description":"Contact details of the engineer submitting the collaboration request"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/FieldMetadataDTO"}},"internalNotes":{"type":"array","items":{"$ref":"#/components/schemas/InternalNoteDTO"}},"testSubmission":{"type":"boolean"}}},"CasePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"ContactDetailsDTO":{"type":"object","required":["name","email","phone"],"properties":{"name":{"type":"string","maxLength":191,"description":"Full name of the contact"},"email":{"type":"string","format":"email","maxLength":191,"description":"Email address of the contact"},"phone":{"type":"string","maxLength":50,"description":"Phone number of the contact"}}},"FieldMetadataDTO":{"type":"object","required":["fieldId","section","label","type","displayOrder","required"],"properties":{"fieldId":{"type":"integer","format":"int64"},"section":{"$ref":"#/components/schemas/FieldMetadataSection"},"label":{"type":"string","maxLength":191},"options":{"type":"string","maxLength":5000},"additionalSettings":{"type":"string","maxLength":5000},"type":{"$ref":"#/components/schemas/FieldMetadataType"},"displayOrder":{"type":"integer","format":"int32"},"validationRules":{"type":"string","maxLength":191},"value":{"type":"string","maxLength":5000},"selections":{"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}},"required":{"type":"boolean"}}},"FieldMetadataSection":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"FieldMetadataType":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]},"SelectionDTO":{"type":"object","properties":{"value":{"type":"string","maxLength":191},"children":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}}}},"InternalNoteDTO":{"type":"object","properties":{"note":{"type":"string","maxLength":5000}}},"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"}}},"ProblemDetail":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"}},"additionalProperties":true}}},"paths":{"/v1/forms/department/{departmentId}":{"get":{"tags":["Form Request"],"summary":"Get a form by department ID","operationId":"getFormByDepartmentId","parameters":[{"name":"departmentId","in":"path","required":true,"description":"The identifier of the department who you would like to collaborate with","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Form template for the department","content":{"application/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/ProblemDetail"}}}}}}}}}
```

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

> Get a form by document ID

```json
{"openapi":"3.0.3","info":{"title":"TSANet Connect Core API","version":"1.0.0"},"tags":[{"name":"Form Request","description":"Form templates for collaboration requests"}],"servers":[{"url":"http://localhost:8080","description":"Local"},{"url":"https://connect2.tahoelab.us","description":"Dev"},{"url":"https://connect2.tsanet.net","description":"Beta"},{"url":"https://connect2.tsanet.org","description":"Prod"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste a Bearer JWT here. Two token types are accepted:\n\n**Connect1 User Tokens** — issued by the Connect1 identity service. Copy the token from your Connect1 session.\n\n**Azure AD M2M** — use the `azureClientCredentials` scheme below to get a token, then paste it here.\n"}},"schemas":{"CollaborationRequestDTO":{"type":"object","required":["customFields","internalCaseNumber","problemSummary","problemDescription","documentId","priority","internalNotes","testSubmission"],"properties":{"documentId":{"type":"integer","format":"int64"},"internalCaseNumber":{"type":"string","maxLength":191},"receiverInternalCaseNumber":{"type":"string","maxLength":191},"problemSummary":{"type":"string","maxLength":500},"problemDescription":{"type":"string","maxLength":10000},"priority":{"$ref":"#/components/schemas/CasePriority"},"adminNote":{"type":"string","maxLength":2000},"escalationInstructions":{"type":"string","maxLength":2000},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO","description":"Contact details of the engineer submitting the collaboration request"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/FieldMetadataDTO"}},"internalNotes":{"type":"array","items":{"$ref":"#/components/schemas/InternalNoteDTO"}},"testSubmission":{"type":"boolean"}}},"CasePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"ContactDetailsDTO":{"type":"object","required":["name","email","phone"],"properties":{"name":{"type":"string","maxLength":191,"description":"Full name of the contact"},"email":{"type":"string","format":"email","maxLength":191,"description":"Email address of the contact"},"phone":{"type":"string","maxLength":50,"description":"Phone number of the contact"}}},"FieldMetadataDTO":{"type":"object","required":["fieldId","section","label","type","displayOrder","required"],"properties":{"fieldId":{"type":"integer","format":"int64"},"section":{"$ref":"#/components/schemas/FieldMetadataSection"},"label":{"type":"string","maxLength":191},"options":{"type":"string","maxLength":5000},"additionalSettings":{"type":"string","maxLength":5000},"type":{"$ref":"#/components/schemas/FieldMetadataType"},"displayOrder":{"type":"integer","format":"int32"},"validationRules":{"type":"string","maxLength":191},"value":{"type":"string","maxLength":5000},"selections":{"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}},"required":{"type":"boolean"}}},"FieldMetadataSection":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"FieldMetadataType":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]},"SelectionDTO":{"type":"object","properties":{"value":{"type":"string","maxLength":191},"children":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/SelectionDTO"}}}},"InternalNoteDTO":{"type":"object","properties":{"note":{"type":"string","maxLength":5000}}},"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"}}},"ProblemDetail":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"}},"additionalProperties":true}}},"paths":{"/v1/forms/document/{documentId}":{"get":{"tags":["Form Request"],"summary":"Get a form by document ID","operationId":"getFormByDocumentId","parameters":[{"name":"documentId","in":"path","required":true,"description":"The identifier of the document form to retrieve","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Form template for the document","content":{"application/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/ProblemDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}}}}}}}
```
