{"openapi":"3.0.1","info":{"title":"LinkSquares API","version":"1.0.0"},"servers":[{"url":"https://api.linksquares.com/api"}],"paths":{"/finalize/v2/agreements/{agreement_id}/answers/{answer_id}/attachments/{attachment_id}/file":{"get":{"summary":"redirects to an agreement answer attachment file's presigned download URL","tags":["Finalize Attachments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement UUID"},{"name":"answer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The answer UUID"},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The attachment UUID"}],"responses":{"302":{"description":"success","headers":{"location":{"schema":{"type":"string","format":"uri"},"description":"Presigned download URL for the attachment file."}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/questions/{question_id}/attachments/{attachment_id}/file":{"get":{"summary":"redirects to an agreement question attachment file's presigned download URL","tags":["Finalize Attachments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement UUID"},{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The question UUID"},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The attachment UUID"}],"responses":{"302":{"description":"success","headers":{"location":{"schema":{"type":"string","format":"uri"},"description":"Presigned download URL for the attachment file."}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/agreement_versions":{"post":{"summary":"creates an agreement version","tags":["Finalize Agreement Versions V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement UUID."}],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement version.","example":"37c5e7c4-f675-11ed-b67e-0242ac120002"}}},"_links":{"type":"object","description":"Links to finish agreement version creation.","properties":{"agreement_version_file_upload":{"type":"object","properties":{"href":{"type":"string","description":"Presigned upload URL for the agreement version file.","example":"https://s3.amazonaws.com/linksquares-finalize-bucket/store/agreement_version/d0441f5b-3f7a-43de-84ef-37758b9929dd/file/ffd9b8871fb6250a4a98a53011e17527/basic_agreement.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<Amz-Credential-Value>&X-Amz-Date=20230402T134848Z&X-Amz-Expires=900&X-Amz-Security-Token=<Amz-Security-Token-Value>&X-Amz-SignedHeaders=host&X-Amz-Signature=<Amz-Signature-Value>"},"operation":{"type":"string","description":"The HTTP verb. PUT only.","example":"put"},"file":{"type":"string","description":"File name with extension.","example":"basic_agreement.docx"}},"required":["href","operation","file"]},"agreement_version_upload_complete":{"type":"object","properties":{"href":{"type":"string","description":"Endpoint to complete agreement version creation.","example":"https://api.linksquares.com/api/finalize/v2/agreements/eb05deb4-05c5-45d0-ae74-9ec2f3e2ad86/agreement_versions/37c5e7c4-f675-11ed-b67e-0242ac120002"},"operation":{"type":"string","description":"The HTTP verb. PATCH only.","example":"patch"},"body":{"type":"object","properties":{"data":{"type":"object","properties":{"upload_complete":{"type":"boolean","description":"Patch this field as `true` after the agreement version file has been uploaded.","example":"true"}},"required":["upload_complete"]}},"required":["data"]}},"required":["href","operation","body"]}},"required":["agreement_version_file_upload","agreement_version_upload_complete"]}},"required":["_links","data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status_id":{"type":"string","format":"uuid","description":"The status UUID."},"agreement_version_file":{"type":"object","description":"Information about the agreement version file to be uploaded.","properties":{"name":{"type":"string","description":"File name with extension. File must be type docx, pdf, or xlsx.","example":"LinkSquares_NDA.docx"}},"required":["name"]}},"required":["status_id","agreement_version_file"]}},"required":["data"]}}},"required":true},"security":[{"ApiKeyAuth":[]}]},"get":{"summary":"returns the agreement versions on an agreement","tags":["Finalize Agreement Versions V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The UUID of the agreement record."}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement version."},"file_name":{"type":"string","description":"The name of the agreement version file.","example":"LinkSquares_NDA.docx"},"status_id":{"type":"string","format":"uuid","description":"The UUID of the agreement version's current status."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the agreement version was created."},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"The ISO 8601 datetime of when the agreement version was deleted. Expected to be null if not deleted."}},"required":["id","file_name","status_id","created_at","deleted_at"]}},"total_count":{"type":"integer","description":"Total number of items returned","example":1},"_links":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/agreements/894e86b8-2866-494e-bb16-5aa19fce3348/agreement_versions?page=3&per_page=1"}}},"prev":{"type":"object","properties":{"href":{"type":"string","description":"URL to the previous page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/agreements/894e86b8-2866-494e-bb16-5aa19fce3348/agreement_versions?page=1&per_page=1"}}}}}},"required":["total_count","_links","data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/agreement_versions/{agreement_version_id}/file":{"get":{"summary":"redirects to an agreement version file's presigned download URL","tags":["Finalize Agreement Versions V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement ID."},{"name":"agreement_version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement version ID."}],"responses":{"302":{"description":"success","headers":{"location":{"schema":{"type":"string","format":"uri"},"description":"Presigned download URL for the agreement version file."}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/agreement_versions/{agreement_version_id}":{"get":{"summary":"returns a single agreement version","tags":["Finalize Agreement Versions V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The UUID of the agreement."},{"name":"agreement_version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The UUID of the agreement version."}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement version."},"file_name":{"type":"string","description":"The name of the agreement version file.","example":"LinkSquares_NDA.docx"},"status_id":{"type":"string","format":"uuid","description":"The UUID of the agreement version's current status."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the agreement version was created."},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"The ISO 8601 datetime of when the agreement version was deleted. Expected to be null if not deleted."}},"required":["id","file_name","status_id","created_at","deleted_at"]}},"required":["data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]},"patch":{"summary":"Finishes the agreement version creation process","tags":["Finalize Agreement Versions V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement UUID."},{"name":"agreement_version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement version UUID."}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement version."},"file_name":{"type":"string","description":"The name of the agreement version file.","example":"LinkSquares_NDA.docx"},"status_id":{"type":"string","format":"uuid","description":"The UUID of the agreement version's current status."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the agreement version was created."},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"The ISO 8601 datetime of when the agreement version was deleted. Expected to be null if not deleted."}},"required":["id","file_name","status_id","created_at","deleted_at"]}},"required":["data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"upload_complete":{"type":"boolean","description":"For agreement version creation, patch this field as `true` after the agreement version file has been uploaded."}},"required":["upload_complete"]}},"required":["data"]}}},"required":true},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/attachments":{"post":{"summary":"creates an agreement attachment","tags":["Finalize Attachments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement UUID."}],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the attachment record."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the attachment was created.","readOnly":true},"file_name":{"type":"string","description":"The name of the attachment file. Expected to be null if file has not been uploaded yet.","example":"ImportantSpreadsheet.xlsx","nullable":true}},"required":["id","created_at","file_name"]},"_links":{"type":"object","description":"For attachment creation.","properties":{"attachment_file_upload":{"type":"object","properties":{"href":{"type":"string","description":"Presigned upload URL for the attachment file.","example":"https://s3.amazonaws.com/linksquares-finalize-bucket/store/attachment/d0441f5b-3f7a-43de-84ef-37758b9929dd/file/ffd9b8871fb6250a4a98a53011e17527/basic_agreement.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<Amz-Credential-Value>&X-Amz-Date=20230402T134848Z&X-Amz-Expires=900&X-Amz-Security-Token=<Amz-Security-Token-Value>&X-Amz-SignedHeaders=host&X-Amz-Signature=<Amz-Signature-Value>"},"operation":{"type":"string","description":"The HTTP verb. PUT only.","example":"put"},"file":{"type":"string","description":"File name with extension.","example":"basic_attachment.docx"}},"required":["href","operation","file"]},"attachment_upload_complete":{"type":"object","properties":{"href":{"type":"string","description":"URL for completing file uploads.","example":"https://api.linksquares.com/api/finalize/v2/agreements/eb05deb4-05c5-45d0-ae74-9ec2f3e2ad86/attachments/37c5e7c4-f675-11ed-b67e-0242ac120002"},"operation":{"type":"string","description":"The HTTP verb. PATCH only.","example":"patch"},"body":{"type":"object","properties":{"data":{"type":"object","properties":{"upload_complete":{"type":"boolean","description":"For attachment creation, patch this field as `true` when the attachment file has been uploaded.","example":"true"}},"required":["upload_complete"]}},"required":["data"]}},"required":["href","operation","body"]}},"required":["attachment_file_upload","attachment_upload_complete"]}},"required":["_links","data"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"attachment_file":{"type":"object","properties":{"name":{"type":"string","description":"The name of the attachment file.","example":"ImportantSpreadsheet.xlsx"}},"required":["name"]}},"required":["attachment_file"]}}}}},"required":true},"security":[{"ApiKeyAuth":[]}]},"get":{"summary":"returns the attachments on an agreement","tags":["Finalize Attachments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The UUID of the agreement record."},{"name":"page","required":false,"in":"query","schema":{"type":"integer","default":1},"description":"Which page of attachments to get.","example":2},{"name":"per_page","required":false,"in":"query","schema":{"type":"integer","default":10},"description":"How many attachments should be returned per page.","example":10}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the attachment record."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the attachment was created.","readOnly":true},"file_name":{"type":"string","description":"The name of the attachment file. Expected to be null if file has not been uploaded yet.","example":"ImportantSpreadsheet.xlsx","nullable":true}},"required":["id","created_at","file_name"]}},"total_count":{"type":"integer","description":"Total number of items returned","example":1},"_links":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/agreements/894e86b8-2866-494e-bb16-5aa19fce3348/attachments?page=3&per_page=1"}}},"prev":{"type":"object","properties":{"href":{"type":"string","description":"URL to the previous page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/agreements/894e86b8-2866-494e-bb16-5aa19fce3348/attachments?page=1&per_page=1"}}}}}},"required":["total_count","_links","data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/attachments/{attachment_id}/file":{"get":{"summary":"redirects to an agreement attachment file's presigned download URL","tags":["Finalize Attachments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string"},"description":"The agreement id","example":"ed85ba3c-d323-11ed-afa1-0242ac120002"},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string"},"description":"The attachment id","example":"ed85ba3c-d323-11ed-afa1-0242ac120002"}],"responses":{"302":{"description":"success","headers":{"location":{"schema":{"type":"string","format":"uri"},"description":"Presigned download URL for the attachment file."}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/attachments/{attachment_id}":{"get":{"summary":"returns a single agreement attachment","tags":["Finalize Attachments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string"},"description":"The agreement id","example":"ed85ba3c-d323-11ed-afa1-0242ac120002"},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string"},"description":"The attachment id","example":"ed85ba3c-d323-11ed-afa1-0242ac120002"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the attachment record."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the attachment was created.","readOnly":true},"file_name":{"type":"string","description":"The name of the attachment file. Expected to be null if file has not been uploaded yet.","example":"ImportantSpreadsheet.xlsx","nullable":true}},"required":["id","created_at","file_name"]}},"required":["data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]},"patch":{"summary":"Finishes the agreement attachment upload process","tags":["Finalize Attachments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement UUID."},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The attachment UUID."}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the attachment record."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the attachment was created.","readOnly":true},"file_name":{"type":"string","description":"The name of the attachment file. Expected to be null if file has not been uploaded yet.","example":"ImportantSpreadsheet.xlsx","nullable":true}},"required":["id","created_at","file_name"]}},"required":["data"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"upload_complete":{"type":"boolean","description":"For attachment creation, patch this field as `true` when the attachment file has been uploaded."}},"required":["upload_complete"]}},"required":["data"]}}},"required":true},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements":{"post":{"summary":"creates an agreement","tags":["Finalize Agreements V2"],"parameters":[],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement record.","readOnly":true},"name":{"type":"string","description":"The name of the agreement.","example":"LinkSquares Contract"},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the agreement record was created.","readOnly":true},"status_updated_at":{"type":"string","nullable":true,"format":"date-time","description":"The ISO 8601 datetime of when the agreement status was updated. Expected to be null if the agreement is not fully created.","readOnly":true},"kind":{"type":"string","enum":["draft","intake","request","sign"],"description":"The kind of the agreement.","readOnly":true},"analyze_agreement_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the Analyze agreement that was created and referenced by a Fully Signed Finalize agreement.","readOnly":true,"example":"2bdb40a3-e5d3-47fb-bcb8-b5b1d6ee549d"},"template_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the template the agreement was created from. Expected to be null if the agreement was not created from a template.","readOnly":true,"example":"a25771d9-f44b-4284-82a7-a9e822ae6c18"},"author_id":{"type":"string","format":"uuid","description":"The UUID of the user record that created the agreement.","readOnly":true},"owner_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the user record that is currently the agreement owner. Expected to be null if the agreement does not have an owner.","example":"b25771d9-f44b-4284-82a7-a9e822ae6c18"},"collaborator_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement collaborator User UUIDs."},"status_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the current status record. Expected to be null if the agreement is not fully created."},"question_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement question UUIDs."},"token_value_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement token value UUIDs."},"pen":{"type":"object","properties":{"assigned_to_counterparty":{"type":"boolean","description":"Indicates whether the pen is assigned to the counterparty."},"holder_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement pen holder User UUIDs."}}}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"required":["id","name","status_updated_at","created_at","template_id","author_id","owner_id","kind","analyze_agreement_id","collaborator_ids","status_id","question_ids","token_value_ids"],"single_only":["collaborator_ids","question_ids","token_value_ids"]},"_links":{"type":"object","description":"Upload links to finish intake agreement creation.","properties":{"agreement_file_upload":{"type":"object","properties":{"href":{"type":"string","description":"Presigned upload URL for the agreement file.","example":"https://s3.amazonaws.com/linksquares-finalize-bucket/store/agreementversion/d0441f5b-3f7a-43de-84ef-37758b9929dd/file/ffd9b8871fb6250a4a98a53011e17527/basic_agreement.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<Amz-Credential-Value>&X-Amz-Date=20230402T134848Z&X-Amz-Expires=900&X-Amz-Security-Token=<Amz-Security-Token-Value>&X-Amz-SignedHeaders=host&X-Amz-Signature=<Amz-Signature-Value>"},"operation":{"type":"string","description":"The HTTP verb. PUT only.","example":"put"},"file":{"type":"string","description":"File name with extension.","example":"basic_agreement.docx"}},"required":["href","operation","file"]},"answer_file_uploads":{"type":"array","items":{"type":"object","properties":{"href":{"type":"string","description":"Presigned upload URL for the answer file.","example":"https://s3.amazonaws.com/linksquares-finalize-bucket/store/agreement/d0441f5b-3f7a-43de-84ef-37758b9929dd/file/ffd9b8871fb6250a4a98a53011e17527/basic_agreement.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<Amz-Credential-Value>&X-Amz-Date=20230402T134848Z&X-Amz-Expires=900&X-Amz-Security-Token=<Amz-Security-Token-Value>&X-Amz-SignedHeaders=host&X-Amz-Signature=<Amz-Signature-Value>"},"operation":{"type":"string","description":"The HTTP verb. PUT only.","example":"put"},"file":{"type":"string","description":"File name with extension.","example":"ImportantSpreadsheet.xlsx"}},"required":["href","operation","file"]}},"agreement_uploads_complete":{"type":"object","properties":{"href":{"type":"string","description":"URL for completing file uploads.","example":"https://api.linksquares.com/api/finalize/v2/agreements/eb05deb4-05c5-45d0-ae74-9ec2f3e2ad86"},"operation":{"type":"string","description":"The HTTP verb. PATCH only.","example":"patch"},"body":{"type":"object","properties":{"data":{"type":"object","properties":{"upload_complete":{"type":"boolean","description":"For agreement creation flow, patch this field as `true` when all agreement files have been uploaded."}},"required":["upload_complete"]}},"required":["data"]}},"required":["href","operation","body"]}},"required":["agreement_file_upload","agreement_uploads_complete"]}},"required":["_links","data"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","description":"The name of the agreement.","example":"LinkSquares Contract"},"kind":{"type":"string","enum":["draft","intake","request"],"description":"The kind of the agreement."},"template_id":{"type":"string","format":"uuid","description":"The UUID of the template or request form to create from."},"agreement_file":{"type":"object","properties":{"name":{"type":"string","description":"File name with extension. File must be type docx, pdf, or xlsx.","example":"LinkSquares_NDA.docx"}},"description":"Information about the file to be uploaded with this agreement. Only applicable for 'intake' templates."},"tokens":{"type":"array","description":"The values for the template tokens. Only applicable for 'draft' templates. Must provide 'selected' for single and multi select token types and 'value' for every other token type.","items":{"type":"object","oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template token."},"value":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"The value of the token.","example":"Token 1 value"}},"required":["id","value"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template token."},"selected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token option."}},"required":["id"]}}},"required":["id","selected"]}]}},"answers":{"type":"array","description":"The answers to the template questions. Must provide 'selected' for single and multi select question types and 'value' for every other question type.","items":{"type":"object","oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question."},"value":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"The answer to the question.","example":"Answer to question one"}},"required":["id","value"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question."},"selected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer option."},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id"]}}},"required":["id","selected"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question."},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the answer file.","example":"ImportantSpreadsheet.xlsx"}},"required":["name"]}}},"required":["id","files"]}]}},"tables_values":{"type":"array","description":"The table tokens to populate corresponding table token placeholders in the template, tokens must be be prefixed by #[ and suffixed by ]#","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the table token."},"start_token":{"type":"string","description":"Start table token identifier.","example":"#[TABLE::START::Subscription_Fees]#"},"end_token":{"type":"string","description":"End table token identifier.","example":"#[TABLE::END::Subscription_Fees]#"},"total_tokens":{"type":"object","description":"The total token identifiers and their values.","example":"\"#[TOTAL::Quote_Rollup_ARR]#\" : \"$32,851.728\""},"row_tokens":{"type":"array","description":"The row token identifiers and their values.","items":{"type":"object"}}},"required":["start_token","end_token","total_tokens","row_tokens"]}},"source":{"type":"object","properties":{"source_name":{"type":"string","description":"Name of the ingestion source","example":"Salesforce"},"metadata":{"type":"object","properties":{"source_record_id":{"type":"string","description":"Ingestion source record id"},"source_record_name":{"type":"string","description":"Name of the ingestion source record","example":"SFDC Opportunity.docx"},"source_record_url":{"type":"string","description":"Link to ingestion source record","example":"https://example.com/deals/1"},"color":{"type":"string","description":"Hex value of color associated with the ingestion source","example":"#FFFFFF"}}}},"description":"Information about the ingestion source of agreements","required":["source_name","metadata"]}},"required":["name","kind","template_id"]}},"required":["data"]}}},"required":true},"security":[{"ApiKeyAuth":[]}]},"get":{"summary":"returns a list of agreements","tags":["Finalize Agreements V2"],"parameters":[{"name":"page","required":false,"in":"query","schema":{"type":"integer","default":1},"description":"Which page of agreements to get.","example":2},{"name":"per_page","required":false,"in":"query","schema":{"type":"integer","default":10},"description":"How many agreements should be returned per page.","example":10},{"name":"filter","required":false,"in":"query","schema":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"description":"Filter agreements by a specific attribute. Options are:</br>\n                    ```filter[name]``` - Returns only agreements with the specified name attribute. This can query name with partial match.</br>\n                    ```filter[created_at][before]``` - Returns only agreements created before this date. Must be in ISO8601 format.</br>\n                    ```filter[created_at][after]``` - Returns only agreements created after this date. Must be in ISO8601 format.</br>\n                    ```filter[status_updated_at][before]``` - Returns only agreements with status updated before this date. Must be in ISO8601 format.</br>\n                    ```filter[status_updated_at][after]``` - Returns only agreements with status updated after this date. Must be in ISO8601 format.</br>\n                    ```filter[status_id][]``` - Filter to agreements with a ```status_id``` that contains the specified value.</br>\n                    ```filter[template_id][]``` - Filter to agreements with a ```template_id``` that contains the specified value.</br>\n                    ```filter[analyze_agreement_id][]``` - Filter to agreements with an ```analyze_agreement_id``` that contains the specified value.</br></br>\n                    NOTE: Query multiple ```status_id``` or ```template_id``` using syntax: ```?filter[template_id][]=4076215b-2476-467b-893d-1fe9fd9199d9&filter[template_id][]=93978d89-38a9-4d5f-b531-9468ff1ba9af```</br>"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement record.","readOnly":true},"name":{"type":"string","description":"The name of the agreement.","example":"LinkSquares Contract"},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the agreement record was created.","readOnly":true},"status_updated_at":{"type":"string","nullable":true,"format":"date-time","description":"The ISO 8601 datetime of when the agreement status was updated. Expected to be null if the agreement is not fully created.","readOnly":true},"kind":{"type":"string","enum":["draft","intake","request","sign"],"description":"The kind of the agreement.","readOnly":true},"analyze_agreement_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the Analyze agreement that was created and referenced by a Fully Signed Finalize agreement.","readOnly":true,"example":"2bdb40a3-e5d3-47fb-bcb8-b5b1d6ee549d"},"template_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the template the agreement was created from. Expected to be null if the agreement was not created from a template.","readOnly":true,"example":"a25771d9-f44b-4284-82a7-a9e822ae6c18"},"author_id":{"type":"string","format":"uuid","description":"The UUID of the user record that created the agreement.","readOnly":true},"owner_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the user record that is currently the agreement owner. Expected to be null if the agreement does not have an owner.","example":"b25771d9-f44b-4284-82a7-a9e822ae6c18"},"status_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the current status record. Expected to be null if the agreement is not fully created."},"pen":{"type":"object","properties":{"assigned_to_counterparty":{"type":"boolean","description":"Indicates whether the pen is assigned to the counterparty."},"holder_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement pen holder User UUIDs."}}}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"required":["id","name","status_updated_at","created_at","template_id","author_id","owner_id","kind","analyze_agreement_id","status_id"],"single_only":["collaborator_ids","question_ids","token_value_ids"]}},"total_count":{"type":"integer","description":"Total number of items returned","example":1},"_links":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/agreements?page=3&per_page=1"}}},"prev":{"type":"object","properties":{"href":{"type":"string","description":"URL to the previous page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/agreements?page=1&per_page=1"}}}}}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"required":["total_count","_links","data"],"single_only":["collaborator_ids","question_ids","token_value_ids"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}":{"get":{"summary":"returns a single agreement","tags":["Finalize Agreements V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string"},"description":"The agreement id","example":"6d3b27ba-0949-44e0-b207-105722610af5"},{"name":"include","in":"query","required":false,"description":"When given the value 'embedded', the response will include subresource content","example":"embedded","schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement record.","readOnly":true},"name":{"type":"string","description":"The name of the agreement.","example":"LinkSquares Contract"},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the agreement record was created.","readOnly":true},"status_updated_at":{"type":"string","nullable":true,"format":"date-time","description":"The ISO 8601 datetime of when the agreement status was updated. Expected to be null if the agreement is not fully created.","readOnly":true},"kind":{"type":"string","enum":["draft","intake","request","sign"],"description":"The kind of the agreement.","readOnly":true},"analyze_agreement_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the Analyze agreement that was created and referenced by a Fully Signed Finalize agreement.","readOnly":true,"example":"2bdb40a3-e5d3-47fb-bcb8-b5b1d6ee549d"},"template_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the template the agreement was created from. Expected to be null if the agreement was not created from a template.","readOnly":true,"example":"a25771d9-f44b-4284-82a7-a9e822ae6c18"},"author_id":{"type":"string","format":"uuid","description":"The UUID of the user record that created the agreement.","readOnly":true},"owner_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the user record that is currently the agreement owner. Expected to be null if the agreement does not have an owner.","example":"b25771d9-f44b-4284-82a7-a9e822ae6c18"},"collaborator_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement collaborator User UUIDs."},"status_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the current status record. Expected to be null if the agreement is not fully created."},"question_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement question UUIDs."},"token_value_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement token value UUIDs."},"pen":{"type":"object","properties":{"assigned_to_counterparty":{"type":"boolean","description":"Indicates whether the pen is assigned to the counterparty."},"holder_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement pen holder User UUIDs."}}}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"required":["id","name","status_updated_at","created_at","template_id","author_id","owner_id","kind","analyze_agreement_id","collaborator_ids","status_id","question_ids","token_value_ids"],"single_only":["collaborator_ids","question_ids","token_value_ids"]},"_embedded":{"properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"type":"object","description":"Includes the full sub-resource objects. Only present if ?include=embedded query parameter is supplied","required":["users","questions","token_values","statuses"]}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"required":["_embedded","data"],"single_only":["collaborator_ids","question_ids","token_value_ids"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]},"patch":{"summary":"Updates an agreement","tags":["Finalize Agreements V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string"},"description":"The agreement id.","example":"6d3b27ba-0949-44e0-b207-105722610af5"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement record.","readOnly":true},"name":{"type":"string","description":"The name of the agreement.","example":"LinkSquares Contract"},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the agreement record was created.","readOnly":true},"status_updated_at":{"type":"string","nullable":true,"format":"date-time","description":"The ISO 8601 datetime of when the agreement status was updated. Expected to be null if the agreement is not fully created.","readOnly":true},"kind":{"type":"string","enum":["draft","intake","request","sign"],"description":"The kind of the agreement.","readOnly":true},"analyze_agreement_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the Analyze agreement that was created and referenced by a Fully Signed Finalize agreement.","readOnly":true,"example":"2bdb40a3-e5d3-47fb-bcb8-b5b1d6ee549d"},"template_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the template the agreement was created from. Expected to be null if the agreement was not created from a template.","readOnly":true,"example":"a25771d9-f44b-4284-82a7-a9e822ae6c18"},"author_id":{"type":"string","format":"uuid","description":"The UUID of the user record that created the agreement.","readOnly":true},"owner_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the user record that is currently the agreement owner. Expected to be null if the agreement does not have an owner.","example":"b25771d9-f44b-4284-82a7-a9e822ae6c18"},"collaborator_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement collaborator User UUIDs."},"status_id":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the current status record. Expected to be null if the agreement is not fully created."},"question_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement question UUIDs."},"token_value_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement token value UUIDs."},"pen":{"type":"object","properties":{"assigned_to_counterparty":{"type":"boolean","description":"Indicates whether the pen is assigned to the counterparty."},"holder_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the agreement pen holder User UUIDs."}}}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"required":["id","name","status_updated_at","created_at","template_id","author_id","owner_id","kind","analyze_agreement_id","collaborator_ids","status_id","question_ids","token_value_ids"],"single_only":["collaborator_ids","question_ids","token_value_ids"]}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement question.","readOnly":true},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","readOnly":true},"description":{"type":"string","description":"A description of what the question is asking.","readOnly":true},"required":{"type":"boolean","description":"Whether the question is required or not.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement question attachment UUIDs."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","description":"The answer option value.","example":"Option 1"},"custom_description":{"type":"string","description":"A user-defined description for the answer option","example":"The best option."}},"required":["id","description"]},"description":"List of possible answer options."},"answer":{"type":"object","oneOf":[{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"value":{"type":"string","description":"The answer value.","readOnly":true}},"required":["id","value"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of the selected answer option UUIDs."}},"required":["id","selected_option_ids"]},{"properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer.","readOnly":true},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of agreement answer attachment UUIDs."}},"required":["id","attachment_ids"]}]}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","answer_type":"text","description":"What is the agreement name?","required":true,"answer":{"id":"4fa85f64-5717-4562-b3fc-2c963f66afa6","value":"LinkSquares Non Disclosure Agreement"}},"required":["id","answer_type","description","required","answer"]}},"token_values":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid","readOnly":true},"description":"The UUIDs of the selected answer options."}},"required":["id","token_id","selected_option_ids"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token value.","readOnly":true},"token_id":{"type":"string","format":"uuid","description":"The template token UUID associated with the token value."},"value":{"type":"string","description":"The value of the token.","example":"Nevada","readOnly":true}},"required":["id","token_id","value"]}]}},"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}}},"required":["data"],"single_only":["collaborator_ids","question_ids","token_value_ids"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"upload_complete":{"type":"boolean","description":"For agreement creation flow, patch this field as `true` when all agreement files have been uploaded."},"status_id":{"type":"string","format":"uuid","description":"The UUID of the Agreement Status record you want to transition to."},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the Question record that you want to update."},"answer":{"type":"object","oneOf":[{"properties":{"value":{"type":"string","description":"The answer value."}},"required":["value"]},{"properties":{"selected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the answer option record that you want to select."}},"required":["id"]},"description":"List of the selected answer options."}},"required":["selected"]}]}},"required":["id","answer"]}}}}},"required":["data"]}}},"required":true},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/agreements/{agreement_id}/comments":{"post":{"summary":"creates a comment","tags":["Finalize Comments V2"],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The agreement UUID."}],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the comment record."},"author_id":{"type":"string","format":"uuid","description":"The UUID of the author of the comment record."},"text":{"type":"string","description":"The text content of the comment."},"commentable_id":{"type":"string","format":"uuid","description":"The UUID of the agreement."},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the comment was created.","readOnly":true}},"required":["id","author_id","text","commentable_id","created_at"]}},"required":["data"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"text":{"type":"string","description":"The text of the comment.","example":"This is my comment."}},"required":["text"]}}}}},"required":true},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/statuses":{"get":{"summary":"returns a list of statuses","tags":["Finalize Statuses V2"],"parameters":[{"name":"page","required":false,"in":"query","schema":{"type":"integer","default":1},"description":"Which page of statuses to get.","example":2},{"name":"per_page","required":false,"in":"query","schema":{"type":"integer","default":10},"description":"How many statuses to get per page.","example":5}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the agreement status record.","example":"77c1e48c-23c2-4958-9dcb-84f23d896512","readOnly":true},"name":{"type":"string","description":"The name of the agreement status.","example":"Internal Review","readOnly":true},"description":{"type":"string","description":"The description of the agreement status.","example":"This is where an agreement starts when an agreement is directly drafted from a third party paper template, an our-paper template or agreement is sent to Finalize.","readOnly":true},"internal_enum":{"type":"string","description":"A unique string to identify the agreement status.","example":"internal_review","readOnly":true}},"required":["id","name","description","internal_enum"]}},"total_count":{"type":"integer","description":"Total number of items returned","example":1},"_links":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/statuses?page=3&per_page=1"}}},"prev":{"type":"object","properties":{"href":{"type":"string","description":"URL to the previous page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/statuses?page=1&per_page=1"}}}}}},"required":["total_count","_links","data"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/me":{"get":{"summary":"returns information about the current user and a health check status","tags":["Finalize System"],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"whoami":"user@example.com","timestamp":"2022-06-14T14:49:10Z","status":"up"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/tasks":{"get":{"summary":"returns a list of tasks","tags":["Finalize Tasks V2"],"parameters":[{"name":"page","required":false,"in":"query","schema":{"type":"integer","default":1},"description":"Which page of tasks to get.","example":2},{"name":"per_page","required":false,"in":"query","schema":{"type":"integer","default":10},"description":"How many tasks should be returned per page.","example":10},{"name":"filter","required":false,"in":"query","schema":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"description":"Filter tasks by a specific attribute. Options are:</br>\n                    ```filter[name]``` - Returns only tasks with the specified name attribute. This can query name with partial match.</br>\n                    ```filter[active]``` - Returns either active or inactive tasks. Options are: `true` or `false`.</br>\n                    ```filter[status][]``` - Returns only tasks with the specified statuses. Options are: ```unreviewed```, ```approved```, ```rejected```</br>\n                    ```filter[agreement_id][]``` - Returns only tasks that belong to an agreement with the specified agreement UUIDs.</br>\n                    ```filter[author_id][]``` - Returns only tasks that have an author with the specified user UUIDs.</br>\n                    ```filter[assignee_ids][]``` - Returns only tasks assigned to the specified user UUIDs. Includes tasks with additional assignee UUIDs besides those specified.</br>\n                    NOTE: Query multiple ```agreement_id``` or ```author_id``` using syntax: ```?filter[agreement_id][]=4076215b-2476-467b-893d-1fe9fd9199d9&filter[agreement_id][]=93978d89-38a9-4d5f-b531-9468ff1ba9af```</br>"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the task record.","readOnly":true},"active":{"type":"boolean","description":"Denotes if the task is active or not.","example":"true","readOnly":true},"agreement_id":{"type":"string","format":"uuid","description":"The UUID of the parent agreement. Will be null for stand-alone tasks.","readOnly":true,"nullable":true},"approval_type":{"type":"string","description":"The requirements of approval. Will be null for tasks of type GenericTask.","enum":["latest_version","text","attachment"],"nullable":true},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the assignee User UUIDs.","readOnly":true},"attachment_id":{"type":"string","format":"uuid","description":"The UUID of the attachment.","readOnly":true,"nullable":true},"author_id":{"type":"string","format":"uuid","description":"The UUID of the task author.","readOnly":true,"nullable":true},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the task was created.","example":"2023-08-15T20:00:39Z","readOnly":true},"due_date":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of the task due date.","example":"2023-09-15T20:00:39Z","readOnly":true,"nullable":true},"name":{"type":"string","description":"The name of the task.","example":"Approve Deliverable","readOnly":true,"nullable":true},"position":{"type":"integer","description":"Denotes the order for \"ordered\" tasks in which tasks should be completed. Tasks of type StandaloneTask and GenericTask can have a null position.","example":"1","readOnly":true,"nullable":true},"resolver_id":{"type":"string","format":"uuid","description":"The UUID of the User that completed the task.","readOnly":true,"nullable":true},"status":{"type":"string","description":"Indicates the current status of a task.","enum":["unreviewed","approved","rejected(deprecated)"]},"text":{"type":"string","description":"Information on completing the task.","example":"Please review the latest version and approve the agreement to complete this task","readOnly":true},"type":{"type":"string","description":"Indicates the type of a task.","enum":["ApprovalTask","GenericTask","StandaloneTask"],"readOnly":true}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}}},"required":["active","agreement_id","approval_type","assignee_ids","attachment_id","author_id","created_at","due_date","id","name","position","resolver_id","status","text","type"]}},"total_count":{"type":"integer","description":"Total number of items returned","example":1},"_links":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/tasks?page=3&per_page=1"}}},"prev":{"type":"object","properties":{"href":{"type":"string","description":"URL to the previous page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/tasks?page=1&per_page=1"}}}}}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}}},"required":["total_count","_links","data"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/tasks/{task_id}":{"get":{"summary":"returns a single task","tags":["Finalize Tasks V2"],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string"},"description":"The task id","example":"6d3b27ba-0949-44e0-b207-105722610af5"},{"name":"include","in":"query","required":false,"description":"When given the value 'embedded', the response will include subresource content","example":"embedded","schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the task record.","readOnly":true},"active":{"type":"boolean","description":"Denotes if the task is active or not.","example":"true","readOnly":true},"agreement_id":{"type":"string","format":"uuid","description":"The UUID of the parent agreement. Will be null for stand-alone tasks.","readOnly":true,"nullable":true},"approval_type":{"type":"string","description":"The requirements of approval. Will be null for tasks of type GenericTask.","enum":["latest_version","text","attachment"],"nullable":true},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the assignee User UUIDs.","readOnly":true},"attachment_id":{"type":"string","format":"uuid","description":"The UUID of the attachment.","readOnly":true,"nullable":true},"author_id":{"type":"string","format":"uuid","description":"The UUID of the task author.","readOnly":true,"nullable":true},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the task was created.","example":"2023-08-15T20:00:39Z","readOnly":true},"due_date":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of the task due date.","example":"2023-09-15T20:00:39Z","readOnly":true,"nullable":true},"name":{"type":"string","description":"The name of the task.","example":"Approve Deliverable","readOnly":true,"nullable":true},"position":{"type":"integer","description":"Denotes the order for \"ordered\" tasks in which tasks should be completed. Tasks of type StandaloneTask and GenericTask can have a null position.","example":"1","readOnly":true,"nullable":true},"resolver_id":{"type":"string","format":"uuid","description":"The UUID of the User that completed the task.","readOnly":true,"nullable":true},"status":{"type":"string","description":"Indicates the current status of a task.","enum":["unreviewed","approved","rejected(deprecated)"]},"text":{"type":"string","description":"Information on completing the task.","example":"Please review the latest version and approve the agreement to complete this task","readOnly":true},"type":{"type":"string","description":"Indicates the type of a task.","enum":["ApprovalTask","GenericTask","StandaloneTask"],"readOnly":true}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}}},"required":["active","agreement_id","approval_type","assignee_ids","attachment_id","author_id","created_at","due_date","id","name","position","resolver_id","status","text","type"]},"_embedded":{"properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}}},"type":"object","description":"Includes the full sub-resource objects. Only present if ?include=embedded query parameter is supplied","required":["users"]}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}}},"required":["_embedded","data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]},"patch":{"summary":"sets a task status to approved","tags":["Finalize Tasks V2"],"parameters":[{"name":"task_id","in":"path","required":true,"format":"uuid","description":"The task UUID.","example":"69327aa7-db27-488a-af22-855f19324286","schema":{"type":"string"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the task record.","readOnly":true},"active":{"type":"boolean","description":"Denotes if the task is active or not.","example":"true","readOnly":true},"agreement_id":{"type":"string","format":"uuid","description":"The UUID of the parent agreement. Will be null for stand-alone tasks.","readOnly":true,"nullable":true},"approval_type":{"type":"string","description":"The requirements of approval. Will be null for tasks of type GenericTask.","enum":["latest_version","text","attachment"],"nullable":true},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of the assignee User UUIDs.","readOnly":true},"attachment_id":{"type":"string","format":"uuid","description":"The UUID of the attachment.","readOnly":true,"nullable":true},"author_id":{"type":"string","format":"uuid","description":"The UUID of the task author.","readOnly":true,"nullable":true},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the task was created.","example":"2023-08-15T20:00:39Z","readOnly":true},"due_date":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of the task due date.","example":"2023-09-15T20:00:39Z","readOnly":true,"nullable":true},"name":{"type":"string","description":"The name of the task.","example":"Approve Deliverable","readOnly":true,"nullable":true},"position":{"type":"integer","description":"Denotes the order for \"ordered\" tasks in which tasks should be completed. Tasks of type StandaloneTask and GenericTask can have a null position.","example":"1","readOnly":true,"nullable":true},"resolver_id":{"type":"string","format":"uuid","description":"The UUID of the User that completed the task.","readOnly":true,"nullable":true},"status":{"type":"string","description":"Indicates the current status of a task.","enum":["unreviewed","approved","rejected(deprecated)"]},"text":{"type":"string","description":"Information on completing the task.","example":"Please review the latest version and approve the agreement to complete this task","readOnly":true},"type":{"type":"string","description":"Indicates the type of a task.","enum":["ApprovalTask","GenericTask","StandaloneTask"],"readOnly":true}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}}},"required":["active","agreement_id","approval_type","assignee_ids","attachment_id","author_id","created_at","due_date","id","name","position","resolver_id","status","text","type"]}},"_embedded":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the user record.","readOnly":true},"first_name":{"type":"string","description":"The first name of the user.","example":"Steve","readOnly":true},"last_name":{"type":"string","description":"The last name of the user.","example":"Urkel","readOnly":true},"email":{"type":"string","description":"The email of the user.","example":"surkel@linksquares.com","readOnly":true}},"required":["id","first_name","last_name","email"]}}},"required":["data"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["approved"],"description":"The status you want to transition the Task to."}},"required":["status"]}},"required":["data"]}}},"required":true},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/templates":{"get":{"summary":"returns a list of templates","tags":["Finalize Templates V2"],"parameters":[{"name":"page","required":false,"in":"query","schema":{"type":"integer","default":1},"description":"Which page of templates to get.","example":2},{"name":"per_page","required":false,"in":"query","schema":{"type":"integer","default":10},"description":"How many templates should be returned per page.","example":10},{"name":"filter","required":false,"in":"query","schema":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"description":"Filter templates by a specific attribute. Options are:</br>\n                    ```filter[created_at][before]``` - Returns only templates created before this date. Must be in ISO8601 format.</br>\n                    ```filter[created_at][after]``` - Returns only templates created after this date. Must be in ISO8601 format.</br>\n                    ```filter[name]``` - Returns only templates with the specified name attribute. This can query name with partial match.</br>\n                    ```filter[kind]``` - Returns only templates with the specified kind attribute. __Must be draft, intake or request_form__.</br></br>\n                    NOTE: Query multiple ```kind``` using syntax: ```?filter[kind][]=intake&filter[kind][]=draft```</br>"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template record.","readOnly":true,"example":"99fd96ed-2c61-4066-b800-c34850146ea9"},"name":{"type":"string","description":"The name of the template.","example":"Security Addendum"},"description":{"type":"string","description":"The description of the template.","example":"Security terms for vendors"},"kind":{"type":"string","enum":["draft","intake","request_form"],"description":"The kind of the template.","readOnly":true,"example":"draft"},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the template was created.","readOnly":true},"updated_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the template was updated.","readOnly":true}},"_embedded":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template token record.","readOnly":true},"kind":{"type":"string","enum":["text_field","text_area","date","clause","multi_select","single_selection"],"description":"The kind of template token.","example":"single_selection"},"question":{"type":"string","description":"The template token question.","example":"What is the single selection token?"},"required":{"type":"boolean","description":"Indicates whether the template token is required."},"clause_category_id":{"type":"string","format":"uuid","description":"The clause category UUID for the template token.","nullable":true},"clause_category_name":{"type":"string","description":"The clause category name for the template token.","example":"Governing Law","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token option record."},"value":{"type":"string","description":"The value of the token option record.","example":"Option 1"}}}}},"required":["id","kind","question","required","clause_category_id","clause_category_name","options"]}},"questions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question one?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"text"}},"required":["id","description","required","answer_type"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question two?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required.","example":false},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"single_selection"},"answer_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the question answer_option record.","readOnly":true},"description":{"type":"string","description":"The description of the question answer_option record.","example":"Yes"}},"required":["id","description"]},"description":"List of possible answer options for the question."}},"required":["id","description","required","answer_type","answer_options"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question three?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"file"},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of template question attachment UUIDs."}},"required":["id","description","required","answer_type","attachment_ids"]}]}}},"required":["id","name","description","created_at","updated_at","kind"],"single_only":["question_ids","token_ids","instructions"]}},"total_count":{"type":"integer","description":"Total number of items returned","example":1},"_links":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/templates?page=3&per_page=1"}}},"prev":{"type":"object","properties":{"href":{"type":"string","description":"URL to the previous page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/templates?page=1&per_page=1"}}}}}},"_embedded":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template token record.","readOnly":true},"kind":{"type":"string","enum":["text_field","text_area","date","clause","multi_select","single_selection"],"description":"The kind of template token.","example":"single_selection"},"question":{"type":"string","description":"The template token question.","example":"What is the single selection token?"},"required":{"type":"boolean","description":"Indicates whether the template token is required."},"clause_category_id":{"type":"string","format":"uuid","description":"The clause category UUID for the template token.","nullable":true},"clause_category_name":{"type":"string","description":"The clause category name for the template token.","example":"Governing Law","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token option record."},"value":{"type":"string","description":"The value of the token option record.","example":"Option 1"}}}}},"required":["id","kind","question","required","clause_category_id","clause_category_name","options"]}},"questions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question one?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"text"}},"required":["id","description","required","answer_type"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question two?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required.","example":false},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"single_selection"},"answer_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the question answer_option record.","readOnly":true},"description":{"type":"string","description":"The description of the question answer_option record.","example":"Yes"}},"required":["id","description"]},"description":"List of possible answer options for the question."}},"required":["id","description","required","answer_type","answer_options"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question three?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"file"},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of template question attachment UUIDs."}},"required":["id","description","required","answer_type","attachment_ids"]}]}}},"required":["total_count","_links","data"],"single_only":["question_ids","token_ids","instructions"]}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/templates/{template_id}/questions/{question_id}/attachments/{attachment_id}/file":{"get":{"summary":"redirects to a template question attachment file's presigned download URL","tags":["Finalize Attachments V2"],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The template UUID"},{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The template question UUID"},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The attachment UUID"}],"responses":{"302":{"description":"success","headers":{"location":{"schema":{"type":"string","format":"uri"},"description":"Presigned download URL for the attachment file."}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/finalize/v2/templates/{template_id}":{"get":{"summary":"returns a single template","tags":["Finalize Templates V2"],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The UUID of the template."},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"When given the value 'embedded', the response will include subresource content.","example":"embedded"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template record.","readOnly":true,"example":"99fd96ed-2c61-4066-b800-c34850146ea9"},"name":{"type":"string","description":"The name of the template.","example":"Security Addendum"},"description":{"type":"string","description":"The description of the template.","example":"Security terms for vendors"},"kind":{"type":"string","enum":["draft","intake","request_form"],"description":"The kind of the template.","readOnly":true,"example":"draft"},"instructions":{"type":"string","nullable":true,"description":"Instructions for the template.","example":"Some instructions with link"},"created_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the template was created.","readOnly":true},"updated_at":{"type":"string","format":"date-time","description":"The ISO 8601 datetime of when the template was updated.","readOnly":true},"token_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"question_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"_embedded":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template token record.","readOnly":true},"kind":{"type":"string","enum":["text_field","text_area","date","clause","multi_select","single_selection"],"description":"The kind of template token.","example":"single_selection"},"question":{"type":"string","description":"The template token question.","example":"What is the single selection token?"},"required":{"type":"boolean","description":"Indicates whether the template token is required."},"clause_category_id":{"type":"string","format":"uuid","description":"The clause category UUID for the template token.","nullable":true},"clause_category_name":{"type":"string","description":"The clause category name for the template token.","example":"Governing Law","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token option record."},"value":{"type":"string","description":"The value of the token option record.","example":"Option 1"}}}}},"required":["id","kind","question","required","clause_category_id","clause_category_name","options"]}},"questions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question one?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"text"}},"required":["id","description","required","answer_type"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question two?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required.","example":false},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"single_selection"},"answer_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the question answer_option record.","readOnly":true},"description":{"type":"string","description":"The description of the question answer_option record.","example":"Yes"}},"required":["id","description"]},"description":"List of possible answer options for the question."}},"required":["id","description","required","answer_type","answer_options"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question three?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"file"},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of template question attachment UUIDs."}},"required":["id","description","required","answer_type","attachment_ids"]}]}}},"required":["id","name","description","created_at","updated_at","kind","instructions","token_ids","question_ids"],"single_only":["question_ids","token_ids","instructions"]},"_embedded":{"properties":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template token record.","readOnly":true},"kind":{"type":"string","enum":["text_field","text_area","date","clause","multi_select","single_selection"],"description":"The kind of template token.","example":"single_selection"},"question":{"type":"string","description":"The template token question.","example":"What is the single selection token?"},"required":{"type":"boolean","description":"Indicates whether the template token is required."},"clause_category_id":{"type":"string","format":"uuid","description":"The clause category UUID for the template token.","nullable":true},"clause_category_name":{"type":"string","description":"The clause category name for the template token.","example":"Governing Law","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token option record."},"value":{"type":"string","description":"The value of the token option record.","example":"Option 1"}}}}},"required":["id","kind","question","required","clause_category_id","clause_category_name","options"]}},"questions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question one?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"text"}},"required":["id","description","required","answer_type"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question two?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required.","example":false},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"single_selection"},"answer_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the question answer_option record.","readOnly":true},"description":{"type":"string","description":"The description of the question answer_option record.","example":"Yes"}},"required":["id","description"]},"description":"List of possible answer options for the question."}},"required":["id","description","required","answer_type","answer_options"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question three?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"file"},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of template question attachment UUIDs."}},"required":["id","description","required","answer_type","attachment_ids"]}]}}},"type":"object","description":"Includes the full sub-resource objects. Only present if ?include=embedded query parameter is supplied","required":["tokens","questions"]}},"_embedded":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template token record.","readOnly":true},"kind":{"type":"string","enum":["text_field","text_area","date","clause","multi_select","single_selection"],"description":"The kind of template token.","example":"single_selection"},"question":{"type":"string","description":"The template token question.","example":"What is the single selection token?"},"required":{"type":"boolean","description":"Indicates whether the template token is required."},"clause_category_id":{"type":"string","format":"uuid","description":"The clause category UUID for the template token.","nullable":true},"clause_category_name":{"type":"string","description":"The clause category name for the template token.","example":"Governing Law","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the token option record."},"value":{"type":"string","description":"The value of the token option record.","example":"Option 1"}}}}},"required":["id","kind","question","required","clause_category_id","clause_category_name","options"]}},"questions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question one?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"text"}},"required":["id","description","required","answer_type"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question two?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required.","example":false},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"single_selection"},"answer_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the question answer_option record.","readOnly":true},"description":{"type":"string","description":"The description of the question answer_option record.","example":"Yes"}},"required":["id","description"]},"description":"List of possible answer options for the question."}},"required":["id","description","required","answer_type","answer_options"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the template question record.","readOnly":true},"description":{"type":"string","nullable":true,"description":"The description of the template question record.","example":"What is question three?"},"required":{"type":"boolean","description":"Indicates whether the the template question is required."},"answer_type":{"type":"string","enum":["text","paragraph","date","numbers","multiple_selection","single_selection","file","url"],"description":"The answer type of the question.","example":"file"},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of template question attachment UUIDs."}},"required":["id","description","required","answer_type","attachment_ids"]}]}}},"required":["_embedded","data"],"single_only":["question_ids","token_ids","instructions"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."}},"required":["message"],"example":{"message":"Not Found"}}}}},"422":{"description":"unprocessable_entity","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A message describing the error."},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the top level field that caused the error."},"field_path":{"type":"string","description":"The JSON query path of the specific field that caused the error. Omits the 'data' field when applicable."},"message":{"type":"string","description":"A message describing the error."}},"required":["field_name","message"]}}},"required":["message","errors"],"example":{"message":"Validation Failed","errors":[{"field_name":"template_id","message":"template_id is missing"},{"field_name":"tokens","field_path":"tokens[1].selected","message":"Invalid options selected"}]}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreements/{id}/attachments":{"post":{"summary":"accepts file name and responds with an upload url to be used to upload an attachment","tags":["Analyze Agreement Attachments"],"description":"returns an AWS S3 url upon success for subsequent file upload. On Successful response, execute a PUT request to the AWS S3 URL with file.Example Documentation: https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html","parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"attachment_upload_url":"https://www.linksquares.com/example-upload-url"},"schema":{"type":"object","required":["attachment_upload_url"],"properties":{"attachment_upload_url":{"type":"string"}}}}}},"422":{"description":"could not create agreement attachment","content":{"application/json":{"example":{"message":"file_name must have an extension matching .csv, .doc, .docx, .pdf, .txt, .xls, .xlsx or .asice","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"404":{"description":"agreement not found","content":{"application/json":{"example":{"message":"Agreement Not Found"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"500":{"description":"could not create s3 url","content":{"application/json":{"example":{"message":"Internal Server Error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string"}},"required":["file_name"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreements/{id}/tags":{"get":{"summary":"returns list of objects representing the agreement tags based on query parameters","tags":["Analyze Agreement Tags"],"parameters":[{"name":"name","in":"query","description":"Specify agreement type name to filter results [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name]. Prepend `-` for descending [-name]","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify cursor from previous response to get next page of data","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"description":"Specify page size of results, between 1 and 100","schema":{"type":"string"}},{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful without params","content":{"application/json":{"example":{"page_size":100,"count":3,"next_cursor":null,"tags":[{"id":"3c740352-c9e9-11ef-a9e5-cb7c68892296","name":"blue tag"},{"id":"3c746e6e-c9e9-11ef-a9e5-671fee2ed3c1","name":"green tag"},{"id":"3c74d5b6-c9e9-11ef-a9e5-176bf255c272","name":"yellow tag"}]},"schema":{"type":"object","properties":{"page_size":{"type":"integer","description":"The number of results displayed","example":100},"count":{"type":"integer","description":"Total number of results found","example":100},"next_cursor":{"type":"string","nullable":true,"format":"uuid","description":"The string that must be passed to the cursor parameter to get the next page of results","readOnly":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the tag","example":"7c0ddaff-ce77-468d-b771-5ba8ca8d0718"},"name":{"type":"string","description":"The name of the tag","example":"Blue"}}}}},"required":["page_size","count","next_cursor","tags"]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"cursor is invalid","content":{"application/json":{"example":{"message":"cursor is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreements/{id}/terms":{"get":{"summary":"returns list of objects representing the agreement terms based on query parameters","tags":["Analyze Agreement Terms"],"parameters":[{"name":"name","in":"query","description":"Specify agreement type name to filter results [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name]. Prepend `-` for descending [-name]","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify cursor from previous response to get next page of data","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"description":"Specify page size of results, between 1 and 100","schema":{"type":"string"}},{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful without params","content":{"application/json":{"example":{"page_size":100,"count":4,"next_cursor":null,"terms":[{"id":"3e55b9f4-c9e9-11ef-a9e5-ab7197a9c119","name":"abc","value":"a","kind":"string","status":"User-Defined"},{"id":"3e570fc0-c9e9-11ef-a9e5-fbb8c7724a5c","name":"bcd","value":null,"kind":"list","status":"User-Defined"},{"id":"3e5795e4-c9e9-11ef-a9e5-c365df7a21fb","name":"cde","value":"c","kind":"string","status":"User-Defined"},{"id":"3e589aa2-c9e9-11ef-a9e5-ebc5130f81af","name":"def","value":"d","kind":"string","status":"User-Defined"}]},"schema":{"type":"object","properties":{"page_size":{"type":"integer","description":"The number of results displayed","example":100},"count":{"type":"integer","description":"Total number of results found","example":100},"next_cursor":{"type":"string","nullable":true,"format":"uuid","description":"The string that must be passed to the cursor parameter to get the next page of results","readOnly":true},"terms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the term","example":"49615d81-2a09-41d9-b45b-d4f45be9377e"},"name":{"type":"string","description":"The name of the term","example":"Effective Date"},"value":{"type":"string","description":"The value of the term","example":"2022-12-25","nullable":true},"kind":{"type":"string","description":"The kind of the term","example":"Date"},"status":{"type":"string","description":"The status of the term","example":"User-Defined"}}}}},"required":["page_size","count","next_cursor","terms"]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"cursor is invalid","content":{"application/json":{"example":{"message":"cursor is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreements/{id}/terms/{term_id}":{"get":{"summary":"returns an object representing a single term","tags":["Analyze Agreement Terms"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}},{"name":"term_id","in":"path","description":"term id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"40478b16-c9e9-11ef-a9e5-5357efa0e7df","name":"abc","value":123,"kind":"string","status":"User-Defined"},"schema":{"type":"object","required":["id","name","kind","status"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"integer"}]},"kind":{"type":"string"},"status":{"type":"string"}}}}}},"404":{"description":"term not found","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreements/{id}":{"get":{"summary":"returns an object representing a single agreement","tags":["Analyze Agreements"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"410204f0-c9e9-11ef-a9e5-8b852e4f60f7","parent_agreement_id":"40fb3c74-c9e9-11ef-a9e5-d3210a7f1859","finalize_agreement_id":"d86fc2c8-751b-4267-b43b-419da7f30129","name":"Agreement1","original_name":"original 1","updated_date":"2025-01-03T10:41:52.698-05:00","upload_date":"2025-01-03T10:41:52.698-05:00","uploaded_by":"Kristin Murray","type":{"id":"40f01ee8-c9e9-11ef-a9e5-53e5cd05c6ad","name":"Master Agreement"},"tags":[{"id":"40f3ca84-c9e9-11ef-a9e5-df73d58c63a8","name":"green"},{"id":"40f44194-c9e9-11ef-a9e5-8723505e0a8e","name":"yellow"}],"terms":[{"id":"4103bee4-c9e9-11ef-a9e5-ff1f34a8ff53","value":"test term value","name":"stt_1","kind":"string","status":"AI Inconclusive"},{"id":"41060c76-c9e9-11ef-a9e5-ff9e4fd16539","value":"test term value 2","name":"stt_2","kind":"string","status":"AI Not Present"}],"child_agreements":[{"id":"411c7592-c9e9-11ef-a9e5-07b6fee33765"}]},"schema":{"type":"object","required":["id","original_name","name","type","terms","tags","uploaded_by","upload_date","updated_date","parent_agreement_id","finalize_agreement_id","child_agreements"],"properties":{"id":{"type":"string","format":"uuid","description":"id"},"original_name":{"type":"string","description":"original file name"},"name":{"type":"string","description":"agreement name"},"type":{"type":"object","description":"agreement type","required":["id","name"],"properties":{"id":{"type":"string","description":"type id"},"name":{"type":"string","description":"type name"}}},"terms":{"type":"array","description":"agreement terms","items":{"type":"object","properties":{"value":{"type":"string","description":"value"},"name":{"type":"string","description":"term type name"},"status":{"type":"string","description":"status"},"kind":{"type":"string","description":"term type kind"}}}},"tags":{"type":"array","description":"tags","items":{"type":"object","properties":{"name":{"type":"string","description":"name"}}}},"uploaded_by":{"type":"string","description":"full name of uploading user"},"upload_date":{"type":"string","description":"uploaded date"},"updated_date":{"type":"string","description":"updated date"},"parent_agreement_id":{"type":"string","description":"parent agreement id"},"finalize_agreement_id":{"type":"string","description":"finalize agreement id"},"child_agreements":{"type":"array","description":"child agreements","items":{"type":"object","properties":{"id":{"type":"string","description":"child agreement id"}}}}}}}}},"403":{"description":"inactive user","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"example":{"message":"User is not active","error_code":"forbidden"}}}},"404":{"description":"No record found for id","content":{"application/json":{"example":{"message":"Record Not Found","error_code":"not_found"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"invalid id format","content":{"application/json":{"example":{"message":"id is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreements/{id}/hierarchy":{"get":{"summary":"returns an object representing a hierarchy for a given agreement","tags":["Analyze Agreement Hierarchy"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"name":"Agreement2","effective_date":"2021-09-23","agreement_id":"44ea7c46-c9e9-11ef-a9e5-677e29131982","upload_date":"2025-01-03T10:41:59-05:00","children":[{"name":"Agreement1","effective_date":"2021-09-23","agreement_id":"44ef6f1c-c9e9-11ef-a9e5-9b5e3e487615","upload_date":"2025-01-03T10:41:59-05:00","children":[{"name":"child agreement 1","effective_date":"2021-09-23","agreement_id":"45051380-c9e9-11ef-a9e5-c7f7737d0de9","upload_date":"2025-01-03T10:41:59-05:00","children":null}]}]},"schema":{"type":"object","properties":{"name":{"type":"string","description":"Agreement Name (Parent)","example":"Example Master Agreement"},"effective_date":{"type":"string","nullable":true,"description":"Effective Date of Agreement","example":"2021-09-23"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the Agreement"},"upload_date":{"type":"string","description":"Upload Date of the Agreement","example":"2022-10-23"},"children":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Child Agreement","example":"Example Child Agreement Name"},"effective_date":{"type":"string","nullable":true,"description":"Effective Date of Child Agreement","example":"2020-04-23"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the Child Agreement"},"upload_date":{"type":"string","description":"Upload Date of the Child Agreement","example":"2022-03-23"},"children":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Grandchild Agreement","example":"Example Child Agreement Name"},"effective_date":{"type":"string","nullable":true,"description":"Effective Date of Grandchild Agreement","example":"2021-01-23"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the Grandchild Agreement"},"upload_date":{"type":"string","description":"Upload Date of the Grandchild Agreement","example":"2022-12-23"}}}}}}}},"required":["name","effective_date","agreement_id","upload_date","children"]}}}},"403":{"description":"inactive user","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"example":{"message":"User is not active","error_code":"forbidden"}}}},"404":{"description":"No record found for id","content":{"application/json":{"example":{"message":"Record Not Found","error_code":"not_found"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"invalid id format","content":{"application/json":{"example":{"message":"id is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreements":{"get":{"summary":"returns list of objects representing the agreements based on query parameters","tags":["Analyze Agreements"],"parameters":[{"name":"type","in":"query","description":"Specify agreement type name to filter results by agreement type [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"tags","in":"query","description":"Specify comma separated tags to return agreements with all tags requested [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"after_date","in":"query","description":"Specify after_date which will return all agreements updated since date [YYYY-MM-DD]","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name, updated_date, upload_date]. Prepend `-` for descending [-name, -updated_date, -upload_date]","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify cursor from previous response to get next page of data","required":false,"schema":{"type":"string"}},{"name":"tags_delimiter","in":"query","description":"Specify a delimiter to separate tags, default is comma [,].  Acceptable delimiters [- ~ . _ ,]","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"description":"Specify page size of results, between 1 and 100","schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"page_size":{"type":"integer","description":"The number of results displayed","example":100},"count":{"type":"integer","description":"Total number of results found","example":100},"next_cursor":{"type":"string","nullable":true,"format":"uuid","description":"The string that must be passed to the cursor parameter to get the next page of results","readOnly":true},"agreements":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the Agreement","example":"70f50d77-dca2-43cf-8c03-20c2c273c366"},"parent_agreement_id":{"type":"string","nullable":true,"description":"UUID of the Parent Agreement","example":"6c0aa9a8-7b68-4a84-a814-352f82e24d57"},"finalize_agreement_id":{"type":"string","nullable":true,"description":"UUID of the Finalize Agreement","example":"c759a525-33dd-48ae-82a6-bb2d163ea68a"},"name":{"type":"string","description":"Agreement Name","readOnly":true,"example":"Example Agreement Name"},"original_name":{"type":"string","description":"Original File Name","example":"Example Original File Name"},"updated_date":{"type":"string","description":"Last Updated Date of Agreement","example":"2023-06-27T14:27:11.022-04:00"},"upload_date":{"type":"string","description":"Upload Date of the Agreement","example":"2023-06-27T14:27:11.022-04:00"},"uploaded_by":{"type":"string","description":"Name of User who Uploaded Agreement","example":"John Doe"},"type":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID of the Agreement Type","example":"d3ff9c27-01fd-4b4c-bccb-3d542e16deb0"},"name":{"type":"string","description":"Name of the Agreement Type","example":"Master Agreement"}}},"tags":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the tag","example":"790d8f0b-6786-4611-9082-43a01369c13b"},"name":{"type":"string","description":"The name of the tag","example":"Blue"}}}},"child_agreements":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID of the Child Agreement","example":"efbb9abe-ffd0-4d09-846c-79fab9d75aac"}}}},"terms":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the term","example":"b4df1d3e-d469-4a33-9502-c52a23b8b35f"},"name":{"type":"string","description":"The name of the term","example":"Effective Date"},"value":{"type":"string","description":"The value of the term","example":"2022-12-25","nullable":true},"kind":{"type":"string","description":"The kind of the term","example":"Date"},"status":{"type":"string","description":"The status of the term","example":"User-Defined"}}}}}},"required":["id","parent_agreement_id","finalize_agreement_id","name","original_name","updated_date","upload_date","uploaded_by","type","tags","terms","child_agreements"]}},"required":["page_size","count","next_cursor","agreements"]},"example":{"page_size":100,"count":2,"next_cursor":null,"agreements":[{"id":"497ff240-c9e9-11ef-a9e5-0745adcfce56","parent_agreement_id":null,"finalize_agreement_id":"96b757e3-9851-42a3-ab36-4e7191a5a718","name":"Agreement2","original_name":"original 2","updated_date":"2025-01-03T10:42:06.945-05:00","upload_date":"2025-01-03T10:42:06.945-05:00","uploaded_by":"Roman Goldner","type":{"id":"497920c8-c9e9-11ef-a9e5-17508c00a153","name":"Assignment"},"tags":[{"id":"497a5dee-c9e9-11ef-a9e5-7f73d5ef16f8","name":"blue"}],"terms":null,"child_agreements":[{"id":"49851bee-c9e9-11ef-a9e5-1b796d2e4fad"}]},{"id":"498e057e-c9e9-11ef-a9e5-134817fa837e","parent_agreement_id":null,"finalize_agreement_id":"2268fd88-0fbd-44a7-9890-a5f8553c17e5","name":"Agreement2 (1)","original_name":"original 2","updated_date":"2025-01-03T10:42:07.037-05:00","upload_date":"2025-01-03T10:42:07.037-05:00","uploaded_by":"Arturo Dooley","type":{"id":"497920c8-c9e9-11ef-a9e5-17508c00a153","name":"Assignment"},"tags":[{"id":"497a5dee-c9e9-11ef-a9e5-7f73d5ef16f8","name":"blue"}],"terms":[{"id":"498f5e42-c9e9-11ef-a9e5-6361b0af7201","value":"1","name":"stt_1","kind":"string","status":"AI Processing"},{"id":"499120ec-c9e9-11ef-a9e5-133280493a1e","value":"custom","name":"stt_2","kind":"string","status":"User-Defined"},{"id":"49938972-c9e9-11ef-a9e5-e7214b2623aa","value":"strong value","name":"stt_3","kind":"string","status":"AI Present"}],"child_agreements":null}]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"wrong date format","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"example":{"message":"after_date is in invalid format","error_code":"unknown_error"}}}}},"security":[{"ApiKeyAuth":[]}]},"post":{"summary":"accepts file name and other meta data and responds with an upload url to be used to upload an agreement","tags":["Analyze Agreements"],"description":"returns an AWS S3 url upon success for subsequent file upload. On Successful response, execute a PUT request to the AWS S3 URL with file.Example Documentation: https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"upload_id":"507ab0bc-c9e9-11ef-a9e5-7f4c876ba9b8","name":"custom name","file_name":"new file name.pdf","type":"Master Agreement","status":"Initialized","url":"https://linksquares-agreement-api-upload-test.s3.amazonaws.com/502f8600-c9e9-11ef-a9e5-3fab6639dcb9/507ab0bc-c9e9-11ef-a9e5-7f4c876ba9b8/new%20file%20name.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARONR2CMFCC2WDUIG%2F20250103%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250103T154218Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Security-Token=unused-test-session-key&X-Amz-Signature=41de9c58f89525eaf216503f7fb1b5afd26e6de87b888b8a2c65dd61bba40f21","tags":["red","blue"],"terms":[{"name":"stt_1","value":"value2"},{"name":"Warranty_58","value":"1.5"},{"name":"stt_2","value":"LinkSquares Ireland, Ltd St"}],"parent_agreement_id":"5045d950-c9e9-11ef-a9e5-0fca592fad08"},"schema":{"type":"object","properties":{"upload_id":{"type":"string","description":"UUID of the Upload","example":"d113f0c6-4946-435f-ba1c-79255b8d3d75"},"name":{"type":"string","description":"The custom name of the document being uploaded","example":"Example Agreement Name"},"type":{"type":"string","description":"The Agreement Type of the Upload","example":"Master Agreement"},"file_name":{"type":"string","description":"The name of the file being uploaded","example":"example_agreement_name.pdf"},"status":{"type":"string","description":"Status of the Upload","example":"Initialized"},"url":{"type":"string","description":"AWS Presigned Upload URL","example":"https://linksquares-agreement-api-upload-test.s3.amazonaws.com/3f4f51c8-15d9-11ee-8c7f-1f7f5cacceef/4037a5e0-15d9-11ee-8c7f-9ffe3bde9219/new%20file%20name.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARONR2CMFGDRHHB3F%2F20230628%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230628T172852Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Security-Token=unused-test-session-key&X-Amz-Signature=2d3739f49a682547d1f52c3ab0b32709ec39df9954b8a05e1abb2588414276cf"},"parent_agreement_id":{"type":"string","nullable":true,"description":"UUID of the Parent Agreement","example":"79f5fa1c-343a-4e45-aa22-7d376dc7ffb2"},"tags":{"type":"array","nullable":true,"minItems":0,"items":{"type":"string","description":"Tag Name"}},"terms":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the term","example":"Effective Date"},"value":{"type":"string","description":"The value of the term","example":"2022-12-25","nullable":true}}}}},"required":["upload_id","name","file_name","type","status","url","tags","terms","parent_agreement_id"]}}}},"403":{"description":"inactive user","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"example":{"message":"User is not active","error_code":"forbidden"}}}},"422":{"description":"invalid extension","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"example":{"message":"file_name must have an extension matching [pdf, docx]","error_code":"unknown_error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string"},"name":{"type":"string"},"agreement_type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"terms":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"approve_agreement":{"type":"boolean"},"parent_agreement_id":{"type":"string"}},"required":["file_name"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/clause_categories":{"get":{"summary":"returns list of objects representing clause categories based on query parameters","tags":["Analyze Clause Categories"],"parameters":[{"name":"name","in":"query","description":"Specify agreement type name to filter results [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name]. Prepend `-` for descending [-name]","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify cursor from previous response to get next page of data","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"description":"Specify page size of results, between 1 and 100","schema":{"type":"string"}}],"responses":{"200":{"description":"successful without params","content":{"application/json":{"example":{"page_size":100,"count":3,"next_cursor":null,"clause_categories":[{"id":"bdf89e59-f9d1-4eff-a8ca-8872b6473066","name":"abc","created_at":"2025-01-03T10:42:27-05:00","updated_at":"2025-01-03T10:42:27-05:00"},{"id":"181b57b4-0d84-420e-a90c-6069611cbdc3","name":"def","created_at":"2025-01-03T10:42:27-05:00","updated_at":"2025-01-03T10:42:27-05:00"},{"id":"700d7487-e165-4f85-8836-75e44ad73838","name":"ghi","created_at":"2025-01-03T10:42:27-05:00","updated_at":"2025-01-03T10:42:27-05:00"}]},"schema":{"type":"object","properties":{"page_size":{"type":"integer","description":"The number of results displayed","example":100},"count":{"type":"integer","description":"Total number of results found","example":100},"next_cursor":{"type":"string","nullable":true,"format":"uuid","description":"The string that must be passed to the cursor parameter to get the next page of results","readOnly":true},"clause_categories":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the Clause Category","example":"b60a4c9d-d0b7-45dd-9ff1-772de4e55e80"},"name":{"type":"string","description":"Clause Category Name","example":"Example Agreement Name"},"created_at":{"type":"string","description":"Created Date of Clause Category","example":"2023-06-27T14:27:11.022-04:00"},"updated_at":{"type":"string","description":"Last Updated Date of Clause Category","example":"2023-06-27T14:27:11.022-04:00"}},"required":["id","name","created_at","updated_at"]}}},"required":["page_size","count","next_cursor","clause_categories"]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"cursor is invalid","content":{"application/json":{"example":{"message":"cursor is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/clauses":{"get":{"summary":"returns list of objects representing clauses based on query parameters","tags":["Analyze Clauses"],"parameters":[{"name":"name","in":"query","description":"Specify agreement type name to filter results [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name]. Prepend `-` for descending [-name]","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify cursor from previous response to get next page of data","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","description":"Specify page size of results, between 1 and 100","required":false,"schema":{"type":"string"}},{"name":"clause_category_id","in":"query","description":"Specify the clause category id to filter results","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful without params","content":{"application/json":{"example":{"page_size":100,"count":3,"next_cursor":null,"clauses":[{"id":"5a2304de-c9e9-11ef-a9e5-7f16ec8d0698","name":"clause a","text":"Magnam dignissimos consectetur et.","clause_category_id":"d63b1b7c-78c5-4746-8054-7e1c2ab340c3","note":"Explicabo dolores optio iste.","agreement_id":"5a1fc2a6-c9e9-11ef-a9e5-c725631f0e3d","created_at":"2025-01-03T10:42:34-05:00","updated_at":"2025-01-03T10:42:34-05:00","author_name":"Rosalva Witting"},{"id":"5a2db514-c9e9-11ef-a9e5-0f50390e8c63","name":"clause b","text":"Iste ab ex placeat.","clause_category_id":"e012a167-f29c-4e8f-b36a-82ca408da27b","note":"Corporis veniam fugit necessitatibus.","agreement_id":"5a2a6120-c9e9-11ef-a9e5-97b0ce4aebee","created_at":"2025-01-03T10:42:34-05:00","updated_at":"2025-01-03T10:42:34-05:00","author_name":"Meg Hessel"},{"id":"5a3864b4-c9e9-11ef-a9e5-33fc928380a6","name":"clause c","text":"Rerum quis eos quo.","clause_category_id":"d63b1b7c-78c5-4746-8054-7e1c2ab340c3","note":"Ut et reiciendis eius.","agreement_id":"5a351dea-c9e9-11ef-a9e5-37530fc2ba65","created_at":"2025-01-03T10:42:34-05:00","updated_at":"2025-01-03T10:42:34-05:00","author_name":"Jaunita Trantow"}]},"schema":{"type":"object","properties":{"page_size":{"type":"integer","description":"The number of results displayed","example":100},"count":{"type":"integer","description":"Total number of results found","example":100},"next_cursor":{"type":"string","nullable":true,"format":"uuid","description":"The string that must be passed to the cursor parameter to get the next page of results","readOnly":true},"clause_categories":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the Clause","example":"06cdb55a-273c-4568-b6e9-6b8f70904729"},"name":{"type":"string","description":"Clause Name","example":"Example Clause Name"},"text":{"type":"string","description":"Clause Text","example":"lorem ipsum"},"clause_category_id":{"type":"string","description":"UUID of the associated Clause Category","example":"4db4fb9c-5303-4331-8002-96ff75201779"},"note":{"type":"string","description":"Note","example":"Please adhere to this note."},"agreement_id":{"type":"string","description":"UUID of the associated Agreement","example":"f3c6d9b1-e06d-4663-a0ca-cb5a39f2d6af"},"created_at":{"type":"string","description":"Created Date of Clause","example":"2023-06-27T14:27:11.022-04:00"},"updated_at":{"type":"string","description":"Last Updated Date of Clause","example":"2023-06-27T14:27:11.022-04:00"},"author_name":{"type":"string","description":"Name of Author","example":"John Doe"}},"required":["id","name","text","clause_category_id","note","agreement_id","created_at","updated_at","author_name"]}}},"required":["page_size","count","next_cursor","clauses"]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"cursor is invalid","content":{"application/json":{"example":{"message":"cursor is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/agreement_types":{"get":{"summary":"returns list of objects representing the agreement types based on query parameters","tags":["Analyze Agreement Types"],"parameters":[{"name":"name","in":"query","description":"Specify agreement type name to filter results [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name]. Prepend `-` for descending [-name]","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify cursor from previous response to get next page of data","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"description":"Specify page size of results, between 1 and 100","schema":{"type":"string"}}],"responses":{"200":{"description":"successful without params","content":{"application/json":{"example":{"page_size":100,"count":3,"next_cursor":null,"agreement_types":[{"id":"5e6d7038-c9e9-11ef-a9e5-27ee1b10ca92","name":"Addendum","is_smart":false},{"id":"5e6a3210-c9e9-11ef-a9e5-fbd3102d5202","name":"Master Agreement","is_smart":false},{"id":"5e70b428-c9e9-11ef-a9e5-0f1eec393fb1","name":"Service Agreement","is_smart":false}]},"schema":{"type":"object","properties":{"page_size":{"type":"integer","description":"The number of results displayed","example":100},"count":{"type":"integer","description":"Total number of results found","example":100},"next_cursor":{"type":"string","nullable":true,"format":"uuid","description":"The string that must be passed to the cursor parameter to get the next page of results","readOnly":true},"agreement_types":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the Agreement Type","example":"c6374132-cc52-4181-b1e7-ef74091a663e"},"name":{"type":"string","description":"Agreement Type Name","example":"Example Clause Name"},"is_smart":{"type":"boolean","description":"Boolean indicator of whether the agreement type is smart or not","example":false}},"required":["id","name","is_smart"]}}},"required":["page_size","count","next_cursor","agreement_types"]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"cursor is invalid","content":{"application/json":{"example":{"message":"cursor is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/uploads/{id}":{"get":{"summary":"accepts an upload id from the response of an agreement upload request and returns status and agreement id","tags":["Analyze Uploads"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"upload_id":"5f9f7492-c9e9-11ef-a9e5-df16f1960c64","status":"success","agreement_id":"5f9c4cf4-c9e9-11ef-a9e5-b7c2f96b53ae","updated_date":"2025-01-03T10:42:44.061-05:00","message":null},"schema":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid","description":"UUID of Upload","example":"0d797b42-15f7-11ee-ae77-67008a40b00c"},"status":{"type":"string","description":"Status of the Upload","example":"success"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the related Agreement"},"updated_date":{"type":"string","description":"Last Updated Date of the Upload","example":"2022-10-23"},"message":{"type":"string","nullable":true,"description":"Additional information about the Upload status","example":"2021-09-23"}},"required":["upload_id","status","agreement_id","updated_date","message"]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"404":{"description":"No record found for id","content":{"application/json":{"example":{"message":"Record Not Found","error_code":"not_found"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"invalid id format","content":{"application/json":{"example":{"message":"id is in invalid format","error_code":"unknown_error"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v1/me":{"get":{"summary":"returns information about the current user","tags":["Analyze System"],"parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"whoami":"cody@heller.example","status":"up","timestamp":"2025-01-03T15:42:46Z"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}":{"patch":{"summary":"updates an agreement","tags":["Analyze Agreements V2"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful with params","content":{"application/json":{"example":{"data":{"id":"64514e16-c9e9-11ef-a9e5-8367152ed5ff","parent_agreement_id":"644bd51c-c9e9-11ef-a9e5-7fa6f3b7e195","name":"Updated Agreement Name","original_name":"original 1","updated_date":"2025-01-03T15:42:51Z","upload_date":"2025-01-03T15:42:51Z","uploaded_by":"Margot Windler","type_id":"6441d170-c9e9-11ef-a9e5-4f7244ae722d","tag_ids":["6445814e-c9e9-11ef-a9e5-8385b6c966c7","6445f1ce-c9e9-11ef-a9e5-f7ed8be51b4c"],"term_ids":["6453a94a-c9e9-11ef-a9e5-97ce18295677","64564be6-c9e9-11ef-a9e5-639216c7a5cc"],"child_agreements":[{"id":"646938a0-c9e9-11ef-a9e5-eb4ec48168ed"}]}},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{}}}}}}},"404":{"description":"parent agreement id not found","content":{"application/json":{"example":{"message":"Parent agreement not found: 6f1065c5-9218-48ee-a52a-1e2ee6b904bb","error_code":"parent_agreement_not_found"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"422":{"description":"validation failure on value","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"type_id","error_code":"validation_failure","message":"type_id must be a string"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type_id":{"type":"string"},"name":{"type":"string"},"parent_agreement_id":{"type":"string","nullable":true}},"required":["value"]}},"required":["data"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}/download":{"get":{"summary":"returns agreement file url","tags":["Analyze Agreements V2"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}},{"name":"use_original_name","in":"query","schema":{"type":"boolean"},"required":false,"description":"A filter used to return original file or renamed with a smart_name","example":"`?use_original_name=true`"}],"responses":{"200":{"description":"successful with params","content":{"application/json":{"example":{"data":{"url":"memory://945fbe130411de5413658c00f66729d2/real.pdf"}},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{}}}}}}},"404":{"description":"failure with agreement not found","content":{"application/json":{"example":{"message":"Not Found","error_code":"agreement_not_found"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"failure when user does not have an access","content":{"application/json":{"example":{"message":"Access Denied for User","error_code":"unauthorized_user"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"422":{"description":"validation failure on value","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"use_original_name","error_code":"validation_failure","message":"use_original_name must be boolean"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}/attachments/{attachment_id}":{"delete":{"summary":"delete an agreement attachment","tags":["Analyze Agreement Attachments"],"description":"Deletes an agreement attachment and returns no content on success.","parameters":[{"name":"id","in":"path","description":"Agreement ID","required":true,"schema":{"type":"string"}},{"name":"attachment_id","in":"path","description":"Attachment ID","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"agreement attachment successfully deleted"},"404":{"description":"agreement attachment not found"},"400":{"description":"failed to delete agreement attachment"}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}/attachments":{"get":{"summary":"get attachments of an agreement","tags":["Analyze Agreement Attachments"],"description":"Get list of attachments belong to the agreement on sucess.","parameters":[{"name":"id","in":"path","description":"Agreement ID","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify uuid of the last agreement attachment from the collection for pagination","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Specify the limit count of returned collection","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful with limit param","content":{"application/json":{"example":{"data":[{"id":"cba8ced2-7244-4586-8e52-35bd280305cf","file_name":null,"file_size":null,"file_type":null,"uploaded_by":"Candie Mills","created_at":"2025-01-03T15:42:46Z"}],"total_count":2,"_links":{}},"schema":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/tags?cursor=0bbb5bb8-4036-11ee-82e0-9b1bc927e249"}}}}}}}},"404":{"description":"cursor not found","content":{"application/json":{"example":{"message":"Cursor not found: 513ef741-fe0e-47cc-ba64-1a8e790c53ab","error_code":"cursor_not_found"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"422":{"description":"invalid limit","content":{"application/json":{"example":{"message":"limit must be greater than 0","error_code":"unknown_error"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}/attachments/{attachment_id}/download":{"get":{"summary":"download an agreement attachment file","tags":["Analyze Agreement Attachments"],"description":"Download an agreement attachment file and returns s3 url on success.","parameters":[{"name":"id","in":"path","description":"Agreement ID","required":true,"schema":{"type":"string"}},{"name":"attachment_id","in":"path","description":"Attachment ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successfully returns agreement attachment file url","content":{"application/json":{"example":{"data":{"url":"memory://f7604ab981af167da753c418686f7469/real.pdf"}},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{}}}}}}},"404":{"description":"attachment file does not exist","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"unauthorized user","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}/terms/{term_id}":{"patch":{"summary":"updates a term","tags":["Analyze Agreement Terms V2"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}},{"name":"term_id","in":"path","description":"term id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful without params","content":{"application/json":{"example":{"data":{"id":"6293ea16-c9e9-11ef-a9e5-873f45840ef4","name":"generic term abc","value":"text example","kind":"text","status":"User-Defined"}},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id","name","kind","status"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"integer"}]},"kind":{"type":"string"},"status":{"type":"string"}}}}}}}},"404":{"description":"failure with term not found","content":{"application/json":{"example":{"message":"Term not found: cd7a206b-03eb-4f86-b7f7-27f46cacf321","error_code":"term_not_found"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"422":{"description":"validation failure on value","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"value","error_code":"validation_failure","message":"value must be boolean"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["data"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}/notes":{"post":{"summary":"returns created notes","tags":["Analyze Agreements V2"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful with valid params","content":{"application/json":{"example":{"data":[{"id":"6d4a2b0a-c9e9-11ef-a9e5-d3a06648dd10","content":"Hi","user_id":"6d315148-c9e9-11ef-a9e5-ef559863d70d","agreement_id":"6d3899a8-c9e9-11ef-a9e5-37ed7a52c050","created_at":"2025-01-03T10:43:06.990-05:00"}]},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","required":["content"],"properties":{"id":{"type":"string","description":"note id"},"content":{"type":"string","description":"notes content"},"user_id":{"type":"string","description":"user id"},"agreement_id":{"type":"string","description":"agreement id"},"created_at":{"type":"string","description":"when it was created"}}}}}}}}},"404":{"description":"failure when agreement not found","content":{"application/json":{"example":{"message":"Not Found","error_code":"agreement_or_user_not_found"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"failure when user does not have an access","content":{"application/json":{"example":{"message":"Access Denied for User","error_code":"unauthorized_user"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"422":{"description":"validation failure when there is no content","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"data","error_code":"validation_failure","message":"data [1, {:content=>[\"must be filled\"]}]"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"user_email":{"type":"string"}}}}},"required":["data","content"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/agreements/{id}/tags/{tag_id}":{"post":{"summary":"adds a tag to the agreement","tags":["Analyze Agreement Tags V2"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","description":"tag id","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"successfully created with valid params","content":{"application/json":{"example":{"data":{"name":"repellendus1","color":"blue","id":"6e406e70-c9e9-11ef-a9e5-d7f8bad18c42"}},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{}}}}}}},"404":{"description":"failure when tag not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}},"example":{"message":"Not Found","error_code":"tag_not_found"}}}},"422":{"description":"validation failure when wrong params format","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"id","error_code":"validation_failure","message":"id is in invalid format"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"failure when user does not have an access","content":{"application/json":{"example":{"message":"Access Denied for User","error_code":"unauthorized_user"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"summary":"remove tag from agreement","tags":["Analyze Agreement Tags V2"],"parameters":[{"name":"id","in":"path","description":"agreement id","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","description":"tag id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The resource was deleted successfully."},"404":{"description":"failure when tag does not belong to agreement","content":{"application/json":{"example":{"message":"Tag does not belong to the agreement","error_code":"no_such_tag_in_agreement"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"failure when user does not have an access","content":{"application/json":{"example":{"message":"Access Denied for User","error_code":"unauthorized_user"},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"422":{"description":"failure validation when pass wrong params format","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"id","error_code":"validation_failure","message":"id is in invalid format"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/tags":{"get":{"summary":"gets a list of company tags","tags":["Analyze Tags V2"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Specify page size of results, between 1 and 100","schema":{"type":"string"}},{"name":"name","in":"query","description":"Specify tag name to filter results [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Specify uuid of the last tag form the collection for pagination","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name]. Prepend `-` for descending [-name]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful with pagination","content":{"application/json":{"example":{"data":[{"id":"71fba502-c9e9-11ef-a9e5-2bc20c150e80","name":"blue tag","color":"blue","agreements_count":0}],"total_count":3,"_links":{"next":{"href":"http://www.example.com/api/analyze/v2/tags?cursor=71fba502-c9e9-11ef-a9e5-2bc20c150e80&limit=1"}}},"schema":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/tags?cursor=0bbb5bb8-4036-11ee-82e0-9b1bc927e249"}}}}}}}},"422":{"description":"limit does not have a valid value","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"limit","error_code":"validation_failure","message":"limit must be an integer"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]},"post":{"summary":"create company tags","tags":["Analyze Tags V2"],"parameters":[],"responses":{"201":{"description":"successfully created with valid params","content":{"application/json":{"example":{"data":{"id":null,"name":"blanditiis","color":"evergreen","agreements_count":0,"created_at":null}},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{}}}}}}},"422":{"description":"duplicate name passed","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}},"example":{"message":"Tag has already been created.","error_code":"tag_exists"}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","red","purple","dark_blue","smart_green","aqua","orange","yellow","light_gray","medium_gray","dark_gray","evergreen","brown","sky_blue","pink","slate"]}}}},"required":["data","name"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/tags/{id}":{"delete":{"summary":"delete company tag","tags":["Analyze Tags V2"],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the company tag to be deleted","schema":{"type":"string"}}],"responses":{"204":{"description":"successfully"},"403":{"description":"unauthorized user - read only","content":{"application/json":{"example":{"message":"Access Denied for User","error_code":"unauthorized_user"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"404":{"description":"tag not found","content":{"application/json":{"example":{"message":"Tag does not exist.","error_code":"tag_not_found"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"422":{"description":"fails validation","content":{"application/json":{"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"tag_id","error_code":"validation_failure","message":"tag_id is in invalid format"}]},"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"405":{"description":"not allowed","content":{"application/json":{"example":{"message":"Tag has associated role, role must first be disassociated.","error_code":"tag_has_associated_role"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"410":{"description":"resource gone","content":{"application/json":{"example":{"message":"Tag was previously deleted.","error_code":"tag_previously_deleted"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/analyze/v2/term_types":{"get":{"summary":"gets a list of term types","tags":["Analyze Term Types V2"],"parameters":[{"name":"page_size","in":"query","required":false,"description":"Specify page size of results, between 1 and 100","schema":{"type":"string"}},{"name":"name","in":"query","description":"Specify term type name to filter results [Case Sensitive]","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Specify the field to sort by [name]. Prepend `-` for descending [-name]","required":false,"schema":{"type":"string"}},{"name":"include","in":"query","schema":{"type":"string"},"description":"Specify the documents to include [embedded]","required":false}],"responses":{"200":{"description":"success with embedded documents","content":{"application/json":{"schema":{"type":"object","properties":{"total_count":{"type":"integer","description":"Total number of results found","example":100},"data":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"id":{"type":"string","description":"UUID of the Term Type","example":"9c4d28a6-45e7-48c8-96ab-8b0e99766460"},"name":{"type":"string","description":"Term Type Name","readOnly":true,"example":"Effective Date"},"kind":{"type":"string","description":"Kind of Term Type","example":"date"},"created_at":{"type":"string","description":"Last Updated Date of Agreement","example":"2023-06-27T14:27:11.022-04:00"},"agreement_type_id":{"type":"string","nullable":true,"format":"uuid","description":"UUID of the associated Agreement Type","example":"149e4d63-0ef1-46b2-bdb3-7f19078b67f7"}}},"required":["id","name","kind","created_at","agreement_type_id"]},"_embedded":{"type":"object","nullable":true,"minItems":0,"properties":{"agreement_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"ID of Agreement Type","example":"0d797b42-15f7-11ee-ae77-67008a40b00c"},"name":{"type":"string","nullable":true,"description":"Name of Agreement Type","example":"Master Agreement"}},"required":["id","name"]}}},"required":["agreement_types"]},"_links":{"type":"object","properties":{"next":{"type":"object","properties":{"href":{"type":"string","description":"URL to the next page of items (null if none)","example":"https://api.linksquares.com/api/finalize/v2/agreements?page=3&per_page=100"}}},"prev":{"type":"object","properties":{"href":{"type":"string","description":"URL to the previous page of items (null if none)","example":"https://api.linksquares.com/api/analyze/v2/agreements?page=1&per_page=100"}}}}}},"required":["data","total_count"]},"example":{"data":[{"id":"73cfd574-c9e9-11ef-a9e5-6376026a0f2a","name":"generic term def","kind":"checkbox","created_at":"2025-01-03T15:43:17Z","agreement_type_id":"73c92346-c9e9-11ef-a9e5-23026e14c13b"},{"id":"73cf7048-c9e9-11ef-a9e5-d75f9532775f","name":"generic term cde","kind":"string","created_at":"2025-01-03T15:43:17Z","agreement_type_id":null}],"total_count":4,"_links":{"next":{"href":"http://www.example.com/api/analyze/v2/term_types?include=embedded&page=2&page_size=2&sort_by=-name"}},"_embedded":{"agreement_types":[{"id":"73c92346-c9e9-11ef-a9e5-23026e14c13b","name":"Custom Template"}]}}}}},"422":{"description":"page_size does not have a valid value","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string"},"error_code":{"type":"string"},"message":{"type":"string"}}}}}},"example":{"message":"Validation Failed","error_code":"validation_failure","errors":[{"field_name":"page_size","error_code":"must_be_int","message":"page_size must be an integer"}]}}}},"403":{"description":"inactive user","content":{"application/json":{"example":{"message":"User is not active","error_code":"forbidden"},"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}}},"components":{"schemas":{"AnalyzeAgreement":{"type":"object","required":["id","original_name","name","type","terms","tags","uploaded_by","upload_date","updated_date","parent_agreement_id","finalize_agreement_id","child_agreements"],"properties":{"id":{"type":"string","format":"uuid","description":"id"},"original_name":{"type":"string","description":"original file name"},"name":{"type":"string","description":"agreement name"},"type":{"type":"object","description":"agreement type","required":["id","name"],"properties":{"id":{"type":"string","description":"type id"},"name":{"type":"string","description":"type name"}}},"terms":{"type":"array","description":"agreement terms","items":{"type":"object","properties":{"value":{"type":"string","description":"value"},"name":{"type":"string","description":"term type name"},"status":{"type":"string","description":"status"},"kind":{"type":"string","description":"term type kind"}}}},"tags":{"type":"array","description":"tags","items":{"type":"object","properties":{"name":{"type":"string","description":"name"}}}},"uploaded_by":{"type":"string","description":"full name of uploading user"},"upload_date":{"type":"string","description":"uploaded date"},"updated_date":{"type":"string","description":"updated date"},"parent_agreement_id":{"type":"string","description":"parent agreement id"},"finalize_agreement_id":{"type":"string","description":"finalize agreement id"},"child_agreements":{"type":"array","description":"child agreements","items":{"type":"object","properties":{"id":{"type":"string","description":"child agreement id"}}}}}},"AnalyzeAgreementHierarchy":{"type":"object","properties":{"name":{"type":"string","description":"Agreement Name (Parent)","example":"Example Master Agreement"},"effective_date":{"type":"string","nullable":true,"description":"Effective Date of Agreement","example":"2021-09-23"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the Agreement"},"upload_date":{"type":"string","description":"Upload Date of the Agreement","example":"2022-10-23"},"children":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Child Agreement","example":"Example Child Agreement Name"},"effective_date":{"type":"string","nullable":true,"description":"Effective Date of Child Agreement","example":"2020-04-23"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the Child Agreement"},"upload_date":{"type":"string","description":"Upload Date of the Child Agreement","example":"2022-03-23"},"children":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Grandchild Agreement","example":"Example Child Agreement Name"},"effective_date":{"type":"string","nullable":true,"description":"Effective Date of Grandchild Agreement","example":"2021-01-23"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the Grandchild Agreement"},"upload_date":{"type":"string","description":"Upload Date of the Grandchild Agreement","example":"2022-12-23"}}}}}}}},"required":["name","effective_date","agreement_id","upload_date","children"]},"AnalyzeAgreementTag":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"AnalyzeAgreementTerm":{"type":"object","required":["id","name","kind","status"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"integer"}]},"kind":{"type":"string"},"status":{"type":"string"}}},"AnalyzeCreateAgreement":{"type":"object","properties":{"upload_id":{"type":"string","description":"UUID of the Upload","example":"afa8c92a-5745-473f-9cf8-4e2b0e3673f7"},"name":{"type":"string","description":"The custom name of the document being uploaded","example":"Example Agreement Name"},"type":{"type":"string","description":"The Agreement Type of the Upload","example":"Master Agreement"},"file_name":{"type":"string","description":"The name of the file being uploaded","example":"example_agreement_name.pdf"},"status":{"type":"string","description":"Status of the Upload","example":"Initialized"},"url":{"type":"string","description":"AWS Presigned Upload URL","example":"https://linksquares-agreement-api-upload-test.s3.amazonaws.com/3f4f51c8-15d9-11ee-8c7f-1f7f5cacceef/4037a5e0-15d9-11ee-8c7f-9ffe3bde9219/new%20file%20name.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARONR2CMFGDRHHB3F%2F20230628%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230628T172852Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Security-Token=unused-test-session-key&X-Amz-Signature=2d3739f49a682547d1f52c3ab0b32709ec39df9954b8a05e1abb2588414276cf"},"parent_agreement_id":{"type":"string","nullable":true,"description":"UUID of the Parent Agreement","example":"8df9a01d-d8b8-49f6-86a6-b38cc8c375d6"},"tags":{"type":"array","nullable":true,"minItems":0,"items":{"type":"string","description":"Tag Name"}},"terms":{"type":"array","nullable":true,"minItems":0,"items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the term","example":"Effective Date"},"value":{"type":"string","description":"The value of the term","example":"2022-12-25","nullable":true}}}}},"required":["upload_id","name","file_name","type","status","url","tags","terms","parent_agreement_id"]},"AnalyzeCreateAgreementAttachment":{"type":"object","required":["attachment_upload_url"],"properties":{"attachment_upload_url":{"type":"string"}}},"AnalyzeAgreementType":{"type":"object","required":["id","name","is_smart"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"is_smart":{"type":"boolean"}}},"AnalyzeClause":{"type":"object","required":["id","name","text","clause_category_id","note","agreement_id","author_name","created_at","updated_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"},"clause_category_id":{"type":"string"},"note":{"type":"string"},"agreement_id":{"type":"string"},"author_name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"AnalyzeClauseCategory":{"type":"object","required":["id","name","created_at","updated_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"AnalyzeUpload":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid","description":"UUID of Upload","example":"0d797b42-15f7-11ee-ae77-67008a40b00c"},"status":{"type":"string","description":"Status of the Upload","example":"success"},"agreement_id":{"type":"string","format":"uuid","description":"UUID of the related Agreement"},"updated_date":{"type":"string","description":"Last Updated Date of the Upload","example":"2022-10-23"},"message":{"type":"string","nullable":true,"description":"Additional information about the Upload status","example":"2021-09-23"}},"required":["upload_id","status","agreement_id","updated_date","message"]}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}}}}