# Case Responses

Approve, reject, and respond to cases

## POST /v1/collaboration-requests/{token}/rejection

> Reject a collaboration request

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Responses","description":"Approve, reject, and respond to cases"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/rejection":{"post":{"tags":["Case Responses"],"summary":"Reject a collaboration request","operationId":"rejectCollaborationRequest","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseRejectionDTO"}}},"required":true},"responses":{"200":{"description":"Collaboration request rejected successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CaseRejectionDTO":{"required":["engineerEmail","engineerName","reason"],"type":"object","properties":{"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"reason":{"type":"string"}}},"CollaborationRequestStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"submitCompanyName":{"type":"string"},"submitCompanyId":{"type":"integer","format":"int64"},"submitterCaseNumber":{"type":"string"},"receiveCompanyName":{"type":"string"},"receiveCompanyId":{"type":"integer","format":"int64"},"receiverCaseNumber":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"direction":{"type":"string","enum":["OUTBOUND","INBOUND"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["OPEN","INFORMATION","REJECTED","ACCEPTED","CLOSED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"responded":{"type":"boolean"},"respondBy":{"type":"string","format":"date-time"},"feedbackRequested":{"type":"boolean"},"reminderSent":{"type":"boolean"},"priorityNote":{"type":"string"},"escalationInstructions":{"type":"string"},"testCase":{"type":"boolean"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CaseCustomFieldStatusDTO"}},"submittedBy":{"$ref":"#/components/schemas/UserDTO"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"receiverContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"caseNotes":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}},"caseResponses":{"type":"array","items":{"$ref":"#/components/schemas/CaseResponseDTO"}}}},"CaseCustomFieldStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"fieldName":{"type":"string"},"value":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]}}},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountryCode":{"type":"string"},"city":{"type":"string"},"emailCheckFailData":{"type":"string"}}},"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"}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CaseResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["APPROVAL","INFORMATION_REQUEST","INFORMATION_RESPONSE","REJECTION"]},"caseNumber":{"type":"string"},"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"nextSteps":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```

## POST /v1/collaboration-requests/{token}/information-response

> Submit an information response

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Responses","description":"Approve, reject, and respond to cases"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/information-response":{"post":{"tags":["Case Responses"],"summary":"Submit an information response","operationId":"submitInformationResponse","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseInformationResponseDTO"}}},"required":true},"responses":{"200":{"description":"Information response submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CaseInformationResponseDTO":{"required":["requestedInformation"],"type":"object","properties":{"requestedInformation":{"type":"string"}}},"CollaborationRequestStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"submitCompanyName":{"type":"string"},"submitCompanyId":{"type":"integer","format":"int64"},"submitterCaseNumber":{"type":"string"},"receiveCompanyName":{"type":"string"},"receiveCompanyId":{"type":"integer","format":"int64"},"receiverCaseNumber":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"direction":{"type":"string","enum":["OUTBOUND","INBOUND"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["OPEN","INFORMATION","REJECTED","ACCEPTED","CLOSED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"responded":{"type":"boolean"},"respondBy":{"type":"string","format":"date-time"},"feedbackRequested":{"type":"boolean"},"reminderSent":{"type":"boolean"},"priorityNote":{"type":"string"},"escalationInstructions":{"type":"string"},"testCase":{"type":"boolean"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CaseCustomFieldStatusDTO"}},"submittedBy":{"$ref":"#/components/schemas/UserDTO"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"receiverContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"caseNotes":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}},"caseResponses":{"type":"array","items":{"$ref":"#/components/schemas/CaseResponseDTO"}}}},"CaseCustomFieldStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"fieldName":{"type":"string"},"value":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]}}},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountryCode":{"type":"string"},"city":{"type":"string"},"emailCheckFailData":{"type":"string"}}},"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"}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CaseResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["APPROVAL","INFORMATION_REQUEST","INFORMATION_RESPONSE","REJECTION"]},"caseNumber":{"type":"string"},"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"nextSteps":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```

## POST /v1/collaboration-requests/{token}/information-request

> Submit an information request

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Responses","description":"Approve, reject, and respond to cases"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/information-request":{"post":{"tags":["Case Responses"],"summary":"Submit an information request","operationId":"submitInformationRequest","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseInformationRequestDTO"}}},"required":true},"responses":{"200":{"description":"Information request submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CaseInformationRequestDTO":{"required":["engineerEmail","engineerName","requestedInformation"],"type":"object","properties":{"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"requestedInformation":{"type":"string"}}},"CollaborationRequestStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"submitCompanyName":{"type":"string"},"submitCompanyId":{"type":"integer","format":"int64"},"submitterCaseNumber":{"type":"string"},"receiveCompanyName":{"type":"string"},"receiveCompanyId":{"type":"integer","format":"int64"},"receiverCaseNumber":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"direction":{"type":"string","enum":["OUTBOUND","INBOUND"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["OPEN","INFORMATION","REJECTED","ACCEPTED","CLOSED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"responded":{"type":"boolean"},"respondBy":{"type":"string","format":"date-time"},"feedbackRequested":{"type":"boolean"},"reminderSent":{"type":"boolean"},"priorityNote":{"type":"string"},"escalationInstructions":{"type":"string"},"testCase":{"type":"boolean"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CaseCustomFieldStatusDTO"}},"submittedBy":{"$ref":"#/components/schemas/UserDTO"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"receiverContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"caseNotes":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}},"caseResponses":{"type":"array","items":{"$ref":"#/components/schemas/CaseResponseDTO"}}}},"CaseCustomFieldStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"fieldName":{"type":"string"},"value":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]}}},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountryCode":{"type":"string"},"city":{"type":"string"},"emailCheckFailData":{"type":"string"}}},"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"}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CaseResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["APPROVAL","INFORMATION_REQUEST","INFORMATION_RESPONSE","REJECTION"]},"caseNumber":{"type":"string"},"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"nextSteps":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```

## POST /v1/collaboration-requests/{token}/closure

> Close a collaboration request

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Responses","description":"Approve, reject, and respond to cases"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/closure":{"post":{"tags":["Case Responses"],"summary":"Close a collaboration request","operationId":"closeCollaborationRequest","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Collaboration request closed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CollaborationRequestStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"submitCompanyName":{"type":"string"},"submitCompanyId":{"type":"integer","format":"int64"},"submitterCaseNumber":{"type":"string"},"receiveCompanyName":{"type":"string"},"receiveCompanyId":{"type":"integer","format":"int64"},"receiverCaseNumber":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"direction":{"type":"string","enum":["OUTBOUND","INBOUND"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["OPEN","INFORMATION","REJECTED","ACCEPTED","CLOSED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"responded":{"type":"boolean"},"respondBy":{"type":"string","format":"date-time"},"feedbackRequested":{"type":"boolean"},"reminderSent":{"type":"boolean"},"priorityNote":{"type":"string"},"escalationInstructions":{"type":"string"},"testCase":{"type":"boolean"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CaseCustomFieldStatusDTO"}},"submittedBy":{"$ref":"#/components/schemas/UserDTO"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"receiverContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"caseNotes":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}},"caseResponses":{"type":"array","items":{"$ref":"#/components/schemas/CaseResponseDTO"}}}},"CaseCustomFieldStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"fieldName":{"type":"string"},"value":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]}}},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountryCode":{"type":"string"},"city":{"type":"string"},"emailCheckFailData":{"type":"string"}}},"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"}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CaseResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["APPROVAL","INFORMATION_REQUEST","INFORMATION_RESPONSE","REJECTION"]},"caseNumber":{"type":"string"},"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"nextSteps":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```

## POST /v1/collaboration-requests/{token}/approval

> Approve a collaboration request

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Responses","description":"Approve, reject, and respond to cases"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/approval":{"post":{"tags":["Case Responses"],"summary":"Approve a collaboration request","operationId":"approveCollaborationRequest","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseApprovalDTO"}}},"required":true},"responses":{"200":{"description":"Collaboration request approved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}}}},"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"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CaseApprovalDTO":{"required":["caseNumber","engineerEmail","engineerName","nextSteps"],"type":"object","properties":{"caseNumber":{"type":"string"},"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"nextSteps":{"type":"string"}}},"CollaborationRequestStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"submitCompanyName":{"type":"string"},"submitCompanyId":{"type":"integer","format":"int64"},"submitterCaseNumber":{"type":"string"},"receiveCompanyName":{"type":"string"},"receiveCompanyId":{"type":"integer","format":"int64"},"receiverCaseNumber":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"direction":{"type":"string","enum":["OUTBOUND","INBOUND"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["OPEN","INFORMATION","REJECTED","ACCEPTED","CLOSED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"responded":{"type":"boolean"},"respondBy":{"type":"string","format":"date-time"},"feedbackRequested":{"type":"boolean"},"reminderSent":{"type":"boolean"},"priorityNote":{"type":"string"},"escalationInstructions":{"type":"string"},"testCase":{"type":"boolean"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CaseCustomFieldStatusDTO"}},"submittedBy":{"$ref":"#/components/schemas/UserDTO"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"receiverContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"caseNotes":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}},"caseResponses":{"type":"array","items":{"$ref":"#/components/schemas/CaseResponseDTO"}}}},"CaseCustomFieldStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"fieldName":{"type":"string"},"value":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]}}},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountryCode":{"type":"string"},"city":{"type":"string"},"emailCheckFailData":{"type":"string"}}},"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"}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CaseResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["APPROVAL","INFORMATION_REQUEST","INFORMATION_RESPONSE","REJECTION"]},"caseNumber":{"type":"string"},"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"nextSteps":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```

## PATCH /v1/collaboration-requests/{token}/approval

> Update an approved collaboration request

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"Case Responses","description":"Approve, reject, and respond to cases"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/collaboration-requests/{token}/approval":{"patch":{"tags":["Case Responses"],"summary":"Update an approved collaboration request","operationId":"updateApproval","parameters":[{"name":"token","in":"path","description":"The token provided by TSANet for the collaboration request","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/CaseApprovalUpdateDTO"}},"application/json":{"schema":{"$ref":"#/components/schemas/CaseApprovalUpdateDTO"}}},"required":true},"responses":{"200":{"description":"Collaboration request approval updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/CollaborationRequestStatusDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CaseApprovalUpdateDTO":{"type":"object","properties":{"caseNumber":{"$ref":"#/components/schemas/JsonNullableString"},"engineerName":{"$ref":"#/components/schemas/JsonNullableString"},"engineerPhone":{"$ref":"#/components/schemas/JsonNullableString"},"engineerEmail":{"$ref":"#/components/schemas/JsonNullableString"},"nextSteps":{"$ref":"#/components/schemas/JsonNullableString"}}},"JsonNullableString":{"type":"object","properties":{"present":{"type":"boolean"}},"description":"Internal case number for the submitter's tracking system"},"CollaborationRequestStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"submitCompanyName":{"type":"string"},"submitCompanyId":{"type":"integer","format":"int64"},"submitterCaseNumber":{"type":"string"},"receiveCompanyName":{"type":"string"},"receiveCompanyId":{"type":"integer","format":"int64"},"receiverCaseNumber":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"direction":{"type":"string","enum":["OUTBOUND","INBOUND"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["OPEN","INFORMATION","REJECTED","ACCEPTED","CLOSED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"responded":{"type":"boolean"},"respondBy":{"type":"string","format":"date-time"},"feedbackRequested":{"type":"boolean"},"reminderSent":{"type":"boolean"},"priorityNote":{"type":"string"},"escalationInstructions":{"type":"string"},"testCase":{"type":"boolean"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CaseCustomFieldStatusDTO"}},"submittedBy":{"$ref":"#/components/schemas/UserDTO"},"submitterContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"receiverContactDetails":{"$ref":"#/components/schemas/ContactDetailsDTO"},"caseNotes":{"type":"array","items":{"$ref":"#/components/schemas/CaseNoteDTO"}},"caseResponses":{"type":"array","items":{"$ref":"#/components/schemas/CaseResponseDTO"}}}},"CaseCustomFieldStatusDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"section":{"type":"string","enum":["CONTACT_SECTION","COMMON_CUSTOMER_SECTION","PROBLEM_SECTION"]},"fieldName":{"type":"string"},"value":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["STRING","INTEGER","EMAIL","PHONE","URL","TEXT","HIDDEN","CUSTOM","SELECT","TIERSELECT","GROUPSELECT","COPY","DB_SELECT","TIMEZONE"]}}},"UserDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountryCode":{"type":"string"},"city":{"type":"string"},"emailCheckFailData":{"type":"string"}}},"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"}}},"CaseNoteDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"caseId":{"type":"integer","format":"int64"},"companyName":{"type":"string"},"creatorUsername":{"type":"string"},"creatorEmail":{"type":"string"},"creatorName":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"status":{"type":"string","enum":["ENTERED","READ","RESPONDED","REMOVED"]},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CaseResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["APPROVAL","INFORMATION_REQUEST","INFORMATION_RESPONSE","REJECTION"]},"caseNumber":{"type":"string"},"engineerName":{"type":"string"},"engineerPhone":{"type":"string"},"engineerEmail":{"type":"string"},"nextSteps":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"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"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tsanet.gitbook.io/connect/api-reference/case-responses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
