{"info":{"contact":{"email":"api@biglelegal.com"},"description":"This API will allow you to manage your templates","license":{"name":"","url":""},"termsOfService":"https://www.biglelegal.com/en/terms-and-conditions","title":"Bigle API Models","version":"v1.1.6"},"openapi":"3.0.3","paths":{"/status":{"get":{"description":"This endpoint returns the API status. You either get a successful response if the API is active or an error otherway.","summary":"Returns the endpoint status.","operationId":"status","tags":["Status"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Successful Operation","type":"object","properties":{"environment":{"description":"The Bigle API environment.","type":"string"},"version":{"description":"The Bigle API version.","type":"string"},"requestId":{"description":"The unique request identifier used in the call.","type":"string"}},"example":{"environment":"pro","version":"1.0.0","requestId":"9EGma3eHch3fyEwwW620Q5RFVulXfDwz"}}}}},"403":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Invalid Authorization"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Invalid Authorization","requestId":"q088686Nrch5772MUwaDDm0g28EM1bGs"}}}}},"412":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Internal server error"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Internal server error","requestId":"SeLorB15010KZcYTLkl5lemEY7jJMsRs"}}}}}},"security":[{"bearerSecurity":[]}]}},"/template":{"get":{"description":"This endpoint return the list of templates available","summary":"Templates list","operationId":"tempateList","tags":["Template"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Successful Operation","type":"object","properties":{"templates":{"description":"Template","type":"array","items":{"description":"Template","type":"object","properties":{"templateUid":{"description":"A unique identifier for the template.","type":"string"},"name":{"description":"Template name","type":"string"},"description":{"description":"Template description","type":"string"},"groupName":{"description":"The group name this template belongs to.","type":"string"},"clientId":{"description":"An identifier set by the client.","type":"string"},"requestId":{"description":"Unique request ID","type":"string"}}}}},"example":{"templates":[{"templateUid":"kamjevgtjlfnhlimnszds","name":"Template name","description":"Template description","groupName":"Group name","clientId":"fmjphtxauuofjmwnkhxaagko","requestId":"inGGvDkO0jbl015zw0AuqHjEaY0019P4"},{"templateUid":"tuazjcrjwggalqnlfsowidafcw","name":"Template name","description":"Template description","groupName":"Group name","clientId":"jlkljrtzgmiwvawavyulmb","requestId":"8dv0yYVKUpgQPUBOxWR3B2494R2ZFEDC"}]}}}}},"403":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Invalid Authorization"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Invalid Authorization","requestId":"T4RtU77JTu2tz19Atd1RC42FlAr243fr"}}}}},"412":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Request body should be informed","Invalid max items value","Invalid sorting field value","Templates not found","Groups not found","Template list could not be retreived from database"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Request body should be informed","requestId":"7kYco0iewCKW0lCW2jYvrwd247818f33"}}}}}},"security":[{"bearerSecurity":[]}],"parameters":[{"description":"Maximum number of items to retrieve. (max:1000)","in":"query","name":"maxItems","required":false,"schema":{"description":"Maximum number of items to retrieve. (max:1000)","default":100,"maximum":1000,"format":"double","type":"number"}},{"description":"Field used to sort results.","in":"query","name":"sortingField","required":false,"schema":{"description":"Field used to sort results.","default":"name","enum":["name","creationTime","clientId"],"type":"string"}}]}},"/template/{templateUid}/structure":{"get":{"description":"This endpoint return the structure needed to create a document with this template","summary":"Template structure","operationId":"tempateStructure","tags":["Template"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Successful Operation","type":"object","properties":{"main":{"description":"Document main format","type":"object","properties":{"fieldString":{"description":"fieldString","type":"object","properties":{"type":{"description":"Field type","enum":["SHORT_TEXT","LONG_TEXT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field (string)","type":"string"}}},"fieldNumber":{"description":"fieldNumber","type":"object","properties":{"type":{"description":"Field type","enum":["NUMBER"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field (number)","type":"string"}}},"fieldDate":{"description":"fieldDate","type":"object","properties":{"type":{"description":"Field type","enum":["DATE"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field (timestamp[miliseconds])","type":"string"}}},"fieldSingleChoice":{"description":"fieldSingleChoice","type":"object","properties":{"type":{"description":"Field type","enum":["SHORT_TEXT","LONG_TEXT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"options":{"description":"Possible options (minItems:1)","minItems":1,"type":"array","items":{"description":"Possible options","type":"string"}},"content":{"description":"Structure for the content of this field (string)","type":"string"}}},"fieldMultipleChoice":{"description":"fieldMultipleChoice","type":"object","properties":{"type":{"description":"Field type","enum":["SHORT_TEXT","LONG_TEXT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"options":{"description":"Possible options (minItems:1)","minItems":1,"type":"array","items":{"description":"Possible options","type":"string"}},"content":{"description":"Structure for the content of this field (Map<option, boolean>)","type":"string"}}},"fieldSingleFile":{"description":"fieldSingleFile","type":"object","properties":{"type":{"description":"Single file field type","enum":["ANNEX","IMAGE"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field","type":"object","properties":{"type":{"description":"Value type","enum":["url","base64"],"type":"string"},"value":{"description":"URL or Base64 value for the file","type":"string"},"fileName":{"description":"File name with extension","type":"string"}}}}},"fieldMultipleFile":{"description":"fieldMultipleFile","type":"object","properties":{"type":{"description":"Single file field type","enum":["ATTACHMENT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field","type":"array","items":{"description":"Structure for the content of this field","type":"object","properties":{"type":{"description":"Value type","enum":["url","base64"],"type":"string"},"value":{"description":"URL or Base64 value for the file","type":"string"},"fileName":{"description":"File name with extension","type":"string"}}}}}},"section":{"description":"Dropdown field","type":"object","properties":{"type":{"description":"Section type","enum":["SECTION"],"type":"string"},"content":{"description":"Section","type":"object","properties":{"fieldString":{"description":"fieldString","type":"object","properties":{"type":{"description":"Field type","enum":["SHORT_TEXT","LONG_TEXT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field (string)","type":"string"}}},"fieldNumber":{"description":"fieldNumber","type":"object","properties":{"type":{"description":"Field type","enum":["NUMBER"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field (number)","type":"string"}}},"fieldDate":{"description":"fieldDate","type":"object","properties":{"type":{"description":"Field type","enum":["DATE"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field (timestamp[miliseconds])","type":"string"}}},"fieldSingleChoice":{"description":"fieldSingleChoice","type":"object","properties":{"type":{"description":"Field type","enum":["SHORT_TEXT","LONG_TEXT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"options":{"description":"Possible options (minItems:1)","minItems":1,"type":"array","items":{"description":"Possible options","type":"string"}},"content":{"description":"Structure for the content of this field (string)","type":"string"}}},"fieldMultipleChoice":{"description":"fieldMultipleChoice","type":"object","properties":{"type":{"description":"Field type","enum":["SHORT_TEXT","LONG_TEXT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"options":{"description":"Possible options (minItems:1)","minItems":1,"type":"array","items":{"description":"Possible options","type":"string"}},"content":{"description":"Structure for the content of this field (Map<option, boolean>)","type":"string"}}},"fieldSingleFile":{"description":"fieldSingleFile","type":"object","properties":{"type":{"description":"Single file field type","enum":["ANNEX","IMAGE"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field","type":"object","properties":{"type":{"description":"Value type","enum":["url","base64"],"type":"string"},"value":{"description":"URL or Base64 value for the file","type":"string"},"fileName":{"description":"File name with extension","type":"string"}}}}},"fieldMultipleFile":{"description":"fieldMultipleFile","type":"object","properties":{"type":{"description":"Single file field type","enum":["ATTACHMENT"],"type":"string"},"optional":{"description":"Optional type","type":"boolean"},"content":{"description":"Structure for the content of this field","type":"array","items":{"description":"Structure for the content of this field","type":"object","properties":{"type":{"description":"Value type","enum":["url","base64"],"type":"string"},"value":{"description":"URL or Base64 value for the file","type":"string"},"fileName":{"description":"File name with extension","type":"string"}}}}}}}}}}}},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"shortTextField":{"type":"SHORT_TEXT","optional":false,"content":"string"},"longTextField":{"type":"LONG_TEXT","optional":false,"content":"string"},"editorTextField":{"type":"EDITOR_TEXT","optional":false,"content":"string"},"numberField":{"type":"NUMBER","optional":false,"content":"number"},"dateField":{"type":"DATE","optional":false,"content":"timestamp [miliseconds]"},"singleChoiceField":{"type":"SINGLE_CHOICE","optional":false,"options":["option_1","option_2"],"content":"string"},"multipleChoiceField":{"type":"MULTIPLE_CHOICE","optional":false,"options":{"option_1":false,"option_2":false},"content":"Map<option, boolean>"},"dropdownField":{"type":"DROPDOWN","optional":false,"options":["option_1","option_2"],"content":"string"},"attachmentField":{"type":"ATTACHMENT","optional":false,"content":[{"type":"url","value":"https://example.com/attachment.pdf","fileName":"Attachment"}]},"annexField":{"type":"ANNEX","optional":false,"content":{"type":"url","value":"https://example.com/annex.pdf","fileName":"Annex"}},"imageField":{"type":"IMAGE","optional":false,"content":{"type":"url","value":"https://example.com/image.png","fileName":"Image"}},"section":{"type":"SECTION","content":{"shortTextField":{"type":"SHORT_TEXT","optional":false,"content":"string"},"longTextField":{"type":"LONG_TEXT","optional":false,"content":"string"},"editorTextField":{"type":"EDITOR_TEXT","optional":false,"content":"string"},"numberField":{"type":"NUMBER","optional":false,"content":"number"},"dateField":{"type":"DATE","optional":false,"content":"timestamp [miliseconds]"},"singleChoiceField":{"type":"SINGLE_CHOICE","optional":false,"options":["option_1","option_2"],"content":"string"},"multipleChoiceField":{"type":"MULTIPLE_CHOICE","optional":false,"options":{"option_1":false,"option_2":false},"content":"Map<option, boolean>"},"dropdownField":{"type":"DROPDOWN","optional":false,"options":["option_1","option_2"],"content":"string"},"attachmentField":{"type":"ATTACHMENT","optional":false,"content":[{"type":"url","value":"https://example.com/attachment.pdf","fileName":"Attachment"}]},"annexField":{"type":"ANNEX","optional":false,"content":{"type":"url","value":"https://example.com/annex.pdf","fileName":"Annex"}},"imageField":{"type":"IMAGE","optional":false,"content":{"type":"url","value":"https://example.com/image.png","fileName":"Image"}}}},"requestId":"1j3jdh5RZyi5tcHQ8YtAyTD1Lkgy8d1V"}}}}},"403":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Invalid Authorization"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Invalid Authorization","requestId":"eEPg133Q7iy172UlU1r8JbzE9jjI4bk5"}}}}},"412":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Request body should be informed","Template UID should be informed","Invalid template UID","Template does not exist","Template details could not be retreived from database","Model blocks do not exist","Model blocks details could not be retreived from database","Model sections do not exist","Model sections details could not be retreived from database","Model fields do not exist","Model fields details could not be retreived from database","Model subtemplates details could not be retreived from database","Model subtemplates do not exist","Subtemplates structure does not exist"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Request body should be informed","requestId":"D37DD88PsZ7s48x6n2dm18Y09VMkcwxt"}}}}}},"security":[{"bearerSecurity":[]}],"parameters":[{"description":"A unique identifier of the template.","in":"path","name":"templateUid","required":true,"schema":{"description":"A unique identifier of the template.","type":"string"}}]}},"/template/{templateUid}":{"get":{"description":"This endpoint returns information about a template and its blocks","summary":"Template Information","operationId":"template","tags":["Template"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Successful Operation","type":"object","properties":{"templateBlocks":{"description":"List of model blocks that conform an automated model","type":"array","items":{"description":"List of model blocks that conform an automated model","type":"object","properties":{"templateBlockUid":{"description":"A unique identifier for the template.","type":"string"},"title":{"description":"Title of the template block.","type":"string"},"clientId":{"description":"ClientId of the block.","type":"string"}}}},"templateUid":{"description":"Template unique identifier","type":"string"},"templateName":{"description":"Template name","type":"string"},"templateDescription":{"description":"Description of the template","type":"string"},"clientId":{"description":"ClientId assigned to the template","type":"string"},"groupdUid":{"description":"GroupUid assigned to the template","type":"string"},"groupName":{"description":"Group name assigned to the template","type":"string"},"active":{"description":"Boolean variable that tells if the template is active or not","type":"boolean"},"creationTime":{"description":"Timestamp for the creation of the template","type":"string"},"downloadLanguage":{"description":"Default download language of the documents created with the template","type":"string"},"multiLanguages":{"description":"Array of languages that the template can be downloaded with","type":"array","items":{"description":"Array of languages that the template can be downloaded with","type":"string"}}},"example":{"templateBlocks":[{"templateBlockUid":"hhuilshjkejsismocutsfjtkic","title":"First block template name","clientId":"0001"},{"templateBlockUid":"avuqjhoybdmidggdrrpb","title":"Second block template name","clientId":"0002."}],"templateUid":"eehzftrycetpgfxljpwmjazmayo","templateName":"First template","templateDescription":"Description of the template","clientId":"0001","groupUid":"kdtscbdwpzpnhozjtzavrytvfs","groupName":"First group","active":true,"creationTime":1788755893544,"downloadLanguage":"es","multiLanguages":["en","es","ca"]}}}}},"403":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Invalid Authorization"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Invalid Authorization","requestId":"1B5IVyEz089tGAJdR92eU5DSXsm88J5V"}}}}},"412":{"description":"Error processing request","content":{"application/json":{"schema":{"description":"Error processing request","type":"object","properties":{"time":{"description":"Error time","type":"string"},"message":{"description":"Error message","enum":["Request body should be informed","Template UID should be informed","Invalid template UID","Template does not exist","Template details could not be retreived from database","Model blocks do not exist","Model blocks details could not be retreived from database","Group list details could not be retreived from database","Groups not found"],"type":"string"},"requestId":{"description":"Unique request ID","type":"string"}},"example":{"time":"2021-01-01T00:00:00.000+00:00 (UTC+0)","message":"Request body should be informed","requestId":"iJF5R7s6vglj79Y0jMrjkCtFllxNxQY2"}}}}}},"security":[{"bearerSecurity":[]}],"parameters":[{"description":"A unique identifier of the template.","in":"path","name":"templateUid","required":true,"schema":{"description":"A unique identifier of the template.","type":"string"}}]}}},"servers":[{"url":"https://europe-west1-bigle-platform.cloudfunctions.net/apiModelEU-v1"}],"components":{"securitySchemes":{"bearerSecurity":{"type":"http","scheme":"bearer"}}}}