{"swagger":"2.0","info":{"description":"API to exchange documents between Abacus and a thirdparty document management system. This YAML describes the Abacus-side REST-services.","version":"1.27","title":"Abacus DMS Connector","contact":{"email":"info@abacus.ch"}},"host":"abacus.ch","basePath":"/api/dms/v1","tags":[{"name":"document","description":"services related to a document"},{"name":"tags","description":"services related to document tags (Abacus v2021.202 or newer)"},{"name":"categories","description":"services related to document categories (Abacus v2021.202 or newer)"},{"name":"storages","description":"service to retrieve the informations to a storage (dossier)"},{"name":"entities","description":"service to retrieve informations about abacus entities"},{"name":"test","description":"Test connection"}],"schemes":["https"],"paths":{"/mandants/{mandant}/document":{"post":{"tags":["document"],"summary":"saves a new document to Abacus.","description":"Saves a new document to Abacus. A new document id is created and returned in the response.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"body","name":"body","description":"document header informations to save","required":true,"schema":{"$ref":"#/definitions/DocumentProperties"}}],"responses":{"201":{"description":"successful operation","schema":{"$ref":"#/definitions/Id"}},"400":{"description":"could not save document","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/mandants/{mandant}/document/{documentId}":{"put":{"tags":["document"],"summary":"modifies an existing document","description":"Modifies an existing documents header informations.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to modify"},{"in":"body","name":"body","description":"document header informations to save","required":true,"schema":{"$ref":"#/definitions/DocumentProperties"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiResponse"}},"400":{"description":"could not save document","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"no document found with the given documentId"}}},"delete":{"tags":["document"],"summary":"deletes a document","description":"Deletes the header-informations of the committed document","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to delete"}],"responses":{"200":{"description":"successful operation"},"400":{"description":"could not delete document","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"no document found with the given documentId"}}},"get":{"tags":["document"],"summary":"gets the document properties of a document","description":"gets the properties of a documents","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/DocumentProperties"}},"400":{"description":"could not get document properties","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"no document found with the given documentId"}}}},"/mandants/{mandant}/document/{documentId}/tags":{"get":{"tags":["tags"],"summary":"returns the tags of the document","description":"returns the tags of the document","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Tags"}},"400":{"description":"bad request, f.e. documentId can not be parsed.","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"document with the given id not found"},"500":{"description":"exception on server. f.e. dms connector is not activated","schema":{"$ref":"#/definitions/ApiResponse"}}}},"post":{"tags":["tags"],"summary":"adds a tag to the document","description":"adds a tag to the document","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document"},{"in":"body","name":"body","description":"tag to add for the document","required":true,"schema":{"$ref":"#/definitions/Value"}}],"responses":{"201":{"description":"successful operation","schema":{"$ref":"#/definitions/Id"}},"400":{"description":"bad request, f.e. documentId can not be parsed.","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"document with the given id not found"},"500":{"description":"exception on server. f.e. dms connector is not activated","schema":{"$ref":"#/definitions/ApiResponse"}}}}},"/mandants/{mandant}/document/{documentId}/tags/{tagId}":{"delete":{"tags":["tags"],"summary":"removes a tag from a document","description":"removes the tag with the given tagId from the document with the given documentId","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to delete"},{"in":"path","name":"tagId","type":"string","required":true,"description":"36-char id of the tag to delete"}],"responses":{"200":{"description":"successful operation"},"400":{"description":"bad request, f.e. tagId or documentId can not be parsed.","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"document or tag with the given id not found"},"500":{"description":"exception on server. f.e. dms connector is not activated","schema":{"$ref":"#/definitions/ApiResponse"}}}}},"/mandants/{mandant}/document/{documentId}/categories":{"get":{"tags":["categories"],"summary":"returns the categories of the document","description":"returns the categories of the document","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Categories"}},"400":{"description":"bad request, f.e. documentId can not be parsed.","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"document with the given id not found"},"500":{"description":"exception on server. f.e. dms connector is not activated","schema":{"$ref":"#/definitions/ApiResponse"}}}},"post":{"tags":["categories"],"summary":"adds the document to the given categories","description":"adds the document to the given categories","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document"},{"in":"body","name":"body","description":"categories to add for the document","required":true,"schema":{"$ref":"#/definitions/CategoryNumbers"}}],"responses":{"201":{"description":"successful operation"},"400":{"description":"bad request, f.e. documentId can not be parsed.","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"document with the given id not found"},"500":{"description":"exception on server. f.e. dms connector is not activated","schema":{"$ref":"#/definitions/ApiResponse"}}}}},"/mandants/{mandant}/document/{documentId}/categories/{categoryNr}":{"delete":{"tags":["categories"],"summary":"removes the category from the document","description":"removes the category from the document","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to delete"},{"in":"path","name":"categoryNr","type":"integer","required":true,"description":"number of the category"}],"responses":{"200":{"description":"successful operation"},"400":{"description":"bad request, f.e. documentId can not be parsed.","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"},"404":{"description":"document with the given id not found"},"500":{"description":"exception on server. f.e. dms connector is not activated","schema":{"$ref":"#/definitions/ApiResponse"}}}}},"/mandants/{mandant}/storages":{"get":{"tags":["storages"],"summary":"gets the informations of all available storages","description":"returns the informations of all avaiblable storages","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"}],"responses":{"200":{"description":"informations of all avaiblable storages","schema":{"$ref":"#/definitions/Storages"}},"400":{"description":"Error occurred while retrieving storage informations","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/mandants/{mandant}/storages/{storageId}":{"get":{"tags":["storages"],"summary":"gets the storage informations","description":"returns the informations (names, application, dossierObject) of the storage with the given storageId.","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"storageId","type":"string","required":true,"description":"36-char id of the storage"}],"responses":{"200":{"description":"storage informations (names, application) of the storage with the given storageId","schema":{"$ref":"#/definitions/Storage"}},"400":{"description":"Error occurred while retrieving storage informations","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/mandants/{mandant}/storages/{storageId}/folders":{"get":{"tags":["storages"],"summary":"gets the folder structure of the storage","description":"returns the folder structure of the storage with the given storageId.","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"storageId","type":"string","required":true,"description":"36-char id of the storage"}],"responses":{"200":{"description":"folder structure of the storage with the given storageId","schema":{"$ref":"#/definitions/Folders"}},"400":{"description":"Error occurred while retrieving folder structure","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/mandants/{mandant}/folders/{folderId}":{"get":{"tags":["storages"],"summary":"gets the folder structure of a folder","description":"returns the folder with the given folderId.","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"path","name":"folderId","type":"string","required":true,"description":"36-char id of the folder"}],"responses":{"200":{"description":"folder structure of the folder with the given folderId","schema":{"$ref":"#/definitions/Folder"}},"400":{"description":"Error occurred while retrieving folder structure","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/mandants/{mandant}/entities":{"post":{"tags":["entities"],"summary":"returns the entities of either a dossier object or a mapped keyword","description":"returns the entities of either a dossier object or a mapped keyword if configured accordingly within Abacus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"},{"in":"query","name":"dossier_object","type":"string","description":"id of the dossier object. Either this parameter or the parameter \"key\" is required."},{"in":"query","name":"key","type":"string","description":"key of the report. Either this parameter or the parameter \"dossier_object\" is required."},{"in":"body","name":"body","description":"input values","required":false,"schema":{"$ref":"#/definitions/InputValues"}}],"responses":{"200":{"description":"entities of either a dossier object or a mapped keyword","schema":{"$ref":"#/definitions/Entities"}},"400":{"description":"Error occurred while retrieving entities","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/mandants/{mandant}/connectiontest":{"get":{"tags":["test"],"summary":"service to test connectivity","produces":["application/json"],"parameters":[{"in":"path","name":"mandant","type":"integer","minimum":1,"maximum":999999,"required":true,"description":"number of the Abacus mandant, ex. 7777"}],"security":[{"dmsconnector_auth":[]}],"responses":{"200":{"description":"OK (successfully authenticated)","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}}},"definitions":{"DocumentProperties":{"type":"object","required":["name","storageId"],"properties":{"creationUser":{"$ref":"#/definitions/User"},"mandant":{"type":"integer","minimum":1,"maximum":999999,"description":"number of the Abacus mandant, ex. 7777","example":7777},"storageId":{"type":"string","format":"string","minimum":36,"maximum":36,"description":"Id of the storage which contains the document","example":"39f527c0-1e35-e001-8fdf-00505698000c"},"folderId":{"type":"string","format":"string","minimum":36,"maximum":36,"description":"Id of the folder which contains the document","example":"916bef5a-1d18-e134-39b8-7814400cf8e6"},"udk":{"type":"string","format":"string","maximum":26,"description":"unique document key, ex. 7 (for address with address number 7). Attention it's not always a number","example":"7"},"name":{"type":"string","format":"string","maximum":255,"description":"name of the document including the file extension, ex. myfile.pdf","example":"myfile.pdf"},"description":{"type":"string","format":"string","maximum":200,"description":"document description","example":"myDescription"},"eid":{"type":"string","format":"string","maximum":36,"description":"external id for a document. Several documents can have the same eid Default is empty string"},"size":{"type":"integer","format":"int64","description":"file size in bytes","example":18432},"creationTimeStamp":{"type":"string","format":"date-time","description":"document creation timestamp as defined by RFC3339","example":"2017-07-21T17:32:28Z"},"modificationTimeStamp":{"type":"string","format":"date-time","description":"document modification timestamp as defined by RFC3339","example":"2017-07-21T17:32:28Z"}}},"Id":{"type":"object","properties":{"id":{"type":"string","format":"string","minLength":36,"maxLength":36,"description":"Unique id as saved in Abacus","example":"0de1d5af-4535-e001-8fdf-00505698000c"}}},"Storages":{"type":"array","description":"array of all available storages","items":{"$ref":"#/definitions/Storage"}},"Storage":{"type":"object","properties":{"id":{"type":"string","format":"string","minLength":36,"maxLength":36,"description":"Unique id for a storage as saved in Abacus","example":"39f527c0-1e35-e001-8fdf-00505698000c"},"mandant":{"type":"integer","minimum":1,"maximum":999999,"description":"number of the Abacus mandant, ex. 7777","example":7777},"name":{"type":"string","format":"string","description":"name of the storage","example":"Korrespondenz"},"translations":{"$ref":"#/definitions/Translations"},"application":{"$ref":"#/definitions/Application"},"dossierObject":{"$ref":"#/definitions/DossierObject"}}},"Folders":{"type":"array","description":"array of folders of the storage","items":{"$ref":"#/definitions/Folder"}},"Folder":{"type":"object","properties":{"id":{"type":"string","format":"string","minLength":36,"maxLength":36,"description":"Unique id for a folder as saved in Abacus","example":"39f527c0-1e35-e001-8fdf-00505698000c"},"name":{"type":"string","format":"string","description":"name of the folder. not unique, there can theoretically be two folders with the same name.","example":"Ordner"},"translations":{"$ref":"#/definitions/Translations"},"folders":{"$ref":"#/definitions/Folders"}}},"Entities":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","description":"key value pairs according to the configured report"}}},"example":{"entities":[{"NR":"149","NAME":"Abacus Research AG","PRENAME":"","STREET":"Abacus-Platz","HOUSE_NUMBER":"1","ZIP":"9300","CITY":"Wittenbach","COUNTRY":"CH","MODIFICATION_DATE":"28.08.201313:04:27.254"}]}},"Translations":{"type":"object","additionalProperties":{"type":"string","description":"translated name"},"example":{"de":"Übersetzung","en":"Translation","fr":"Traduction"}},"DossierObject":{"type":"object","properties":{"id":{"type":"string","format":"string","maxLength":10,"description":"Unique id for a dossierObject as saved in Abacus","example":"ADR"},"name":{"type":"string","format":"string","description":"name of the dossierObject","example":"Adressen"},"translations":{"$ref":"#/definitions/Translations"}}},"Application":{"type":"object","properties":{"id":{"type":"string","format":"string","maxLength":10,"description":"Unique id for an application as saved in Abacus","example":"adre"},"name":{"type":"string","format":"string","description":"name of the application","example":"CRM"},"translations":{"$ref":"#/definitions/Translations"}}},"User":{"type":"object","properties":{"name":{"type":"string","format":"string","description":"username in Abacus","example":"meier"},"fullname":{"type":"string","format":"string","description":"firstname and surname","example":"Hans Meier"},"id":{"type":"string","format":"string","maximum":36,"description":"unique user id in Abacus","example":"388f3b0e-741b-e701-740e-705a0fc541c6"}}},"InputValues":{"type":"object","properties":{"inputValues":{"type":"array","description":"input values","items":{"$ref":"#/definitions/InputValue"}}}},"InputValue":{"type":"object","properties":{"id":{"type":"string","format":"string","description":"id of the input parameter"},"value":{"type":"string","format":"string","description":"value of the input parameter"}}},"Tags":{"type":"array","description":"array of tags","items":{"$ref":"#/definitions/Tag"}},"Tag":{"type":"object","properties":{"id":{"type":"string","format":"string","minLength":36,"maxLength":36,"description":"Unique id for a tag as saved in Abacus","example":"39f527c0-1e35-e001-8fdf-00505698000c"},"value":{"type":"string","format":"string","description":"text of the tag"}}},"Value":{"type":"object","properties":{"value":{"type":"string","format":"string"}}},"Categories":{"type":"array","description":"array of categories","items":{"$ref":"#/definitions/Category"}},"Category":{"type":"object","properties":{"nr":{"type":"integer","minimum":1,"maximum":999999,"description":"Unique number of a category as saved in Abacus","example":1},"active":{"type":"boolean"},"name":{"type":"string","format":"string","description":"name of the category","example":"Kategorie 1"},"translations":{"$ref":"#/definitions/Translations"}}},"CategoryNumbers":{"type":"array","items":{"type":"integer","example":1}},"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}},"responses":{"UnauthorizedError":{"description":"Authentication information is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}}},"securityDefinitions":{"dmsconnector_auth":{"type":"oauth2","flow":"application","tokenUrl":"https://abacus.ch/oauth/oauth2/v1/token"}},"security":[{"dmsconnector_auth":[]}]}