{"openapi":"3.1.0","info":{"title":"EM Stitching API","description":"API to stitch bundles into a PDF. caseTypeId & jurisdictionId are required attributes for Documents to use CDAM.","version":"v0.1.0"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"tags":[{"name":"DocumentTasks Service","description":"Endpoint for managing DocumentTasks."}],"paths":{"/api/document-tasks":{"post":{"tags":["DocumentTasks Service"],"summary":"Create a documentTaskDTO","description":"A POST request to create a documentTaskDTO","operationId":"createDocumentTask","parameters":[{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}},"required":true},"responses":{"201":{"description":"Successfully created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}},"400":{"description":"documentTaskDTO not valid, invalid id","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}},"401":{"description":"Unauthorised","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}}}}},"/api/document-tasks/{id}":{"get":{"tags":["DocumentTasks Service"],"summary":"Get an existing documentTaskDTO","description":"A GET request to retrieve a documentTaskDTO","operationId":"getDocumentTask","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"DocumentTask Id","required":true,"schema":{"type":"Long"}}],"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}},"401":{"description":"Unauthorised","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTaskDTO"}}}}}}},"/":{"get":{"tags":["welcome-resource"],"operationId":"welcome","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"components":{"schemas":{"BundleDTO":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"bundleTitle":{"type":"string"},"description":{"type":"string"},"stitchedDocumentURI":{"type":"string"},"stitchStatus":{"type":"string"},"folders":{"type":"array","items":{"$ref":"#/components/schemas/BundleFolderDTO"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/BundleDocumentDTO"}},"fileName":{"type":"string"},"fileNameIdentifier":{"type":"string"},"coverpageTemplate":{"type":"string"},"coverpageTemplateData":{"$ref":"#/components/schemas/JsonNode"},"pageNumberFormat":{"type":"string","enum":["numberOfPages","pageRange"]},"hasTableOfContents":{"type":"boolean"},"hasCoversheets":{"type":"boolean"},"hasFolderCoversheets":{"type":"boolean"},"hasDocumentSubtitles":{"type":"boolean"},"paginationStyle":{"type":"string","enum":["off","topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight"]},"hashToken":{"type":"string"},"documentImage":{"$ref":"#/components/schemas/DocumentImage"},"enableEmailNotification":{"type":"boolean"}}},"BundleDocumentDTO":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"docTitle":{"type":"string"},"docDescription":{"type":"string"},"documentURI":{"type":"string"},"sortIndex":{"type":"integer","format":"int32"}},"required":["docTitle"]},"BundleFolderDTO":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"description":{"type":"string"},"folderName":{"type":"string"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/BundleDocumentDTO"}},"sortIndex":{"type":"integer","format":"int32"}}},"CallbackDto":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"callbackState":{"type":"string","enum":["NEW","SUCCESS","FAILURE"]},"failureDescription":{"type":"string"},"callbackUrl":{"type":"string"}},"required":["callbackUrl"]},"DocumentImage":{"type":"object","properties":{"docmosisAssetId":{"type":"string"},"imageRenderingLocation":{"type":"string","enum":["allPages","firstPage"]},"coordinateX":{"type":"integer","format":"int32"},"coordinateY":{"type":"integer","format":"int32"},"imageRendering":{"type":"string","enum":["opaque","translucent"]}}},"DocumentTaskDTO":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"bundle":{"$ref":"#/components/schemas/BundleDTO"},"taskState":{"type":"string","enum":["NEW","IN_PROGRESS","DONE","FAILED"]},"failureDescription":{"type":"string"},"callback":{"$ref":"#/components/schemas/CallbackDto"},"serviceAuth":{"type":"string"},"caseTypeId":{"type":"string"},"caseId":{"type":"string"},"jurisdictionId":{"type":"string"}},"required":["bundle"]},"JsonNode":{}}}}
