--- swagger: "2.0" info: description: "REST API for the management of electronical eform objects" version: "2.6.1149" title: "eForms REST API" termsOfService: "http://www.healthconnect.be" contact: url: "http://www.healthconnect.be" email: "support@healthconnect.be" host: "e-forms.be" basePath: "/api" schemes: - "https" paths: /cloud/api/v1/forms: post: summary: "Create a new form instance" description: "Create a new form instance based on the specified form prototype.\ \ The new instance will receive a unique id included in the response. Depending\ \ on the underlying configuration, this call will erase the previous form\ \ instance associated with this credential. Some configurations allow only\ \ a single active form instance per credential." operationId: "createForm" consumes: - "application/json;charset=UTF-8" produces: - "application/json;charset=UTF-8" parameters: - in: "body" name: "body" description: "JSON to create a new form instance" required: false schema: $ref: "#/definitions/CreateFormRequest" - name: "" in: "header" required: true type: "string" default: "" responses: 200: description: "successful operation" schema: $ref: "#/definitions/FormReference" /cloud/api/v1/forms/{formId}: get: summary: "Retrieve all form instance information" description: "Retrieve all form instance information such as environment information,\ \ where to fetch the supporting files, etc. This call is typically the first\ \ call made to setup the form." operationId: "getFormProperties" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: $ref: "#/definitions/FormProperties" delete: summary: "Remove the form." description: "Remove the Form." operationId: "deleteForm" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/attachments: get: summary: "Get the attachments" description: "Get all attachments attached to this form. If there are no attachments\ \ attached, an empty array is returned." operationId: "getAttachments" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: type: "array" items: $ref: "#/definitions/AttachmentVO" post: summary: "Add an attachment" description: "Add a attachment at the end of the list of attachments." operationId: "addAttachment" consumes: - "multipart/mixed" - "multipart/form-data" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "attachment" in: "formData" description: "The attachment" required: true type: "file" responses: 200: description: "successful operation" schema: $ref: "#/definitions/AttachmentVO" delete: summary: "Remove all attachments" description: "Empty the list of attachments on the form." operationId: "clearAllAttachments" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "" /cloud/api/v1/forms/{formId}/attachments/reset: post: summary: "Reset all attachments" description: "Reset the list of attachments on the form." operationId: "resetAllAttachments" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/attachments/resize: post: summary: "Resize all attachments" description: "Resize the list of attachments on the form." operationId: "resizeAttachments" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "target" in: "query" required: false type: "integer" format: "int64" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/attachments/{attachmentId}: get: summary: "Get the attachment" description: "Retrieve the attachment matching the ID in the URL." operationId: "getAttachment" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "attachmentId" in: "path" description: "The attachment id" required: true type: "string" responses: 200: description: "successful operation" schema: $ref: "#/definitions/AttachmentVO" delete: summary: "Remove the attachment" description: "Remove the attachment from the list of attachments." operationId: "deleteAttachment" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "attachmentId" in: "path" description: "The attachment id" required: true type: "string" responses: 200: description: "" /cloud/api/v1/forms/{formId}/attachments/{attachmentId}/content: get: summary: "Get the raw attachment content" description: "Retrieve the raw attachment content matching the ID in the URL." operationId: "downloadAttachment" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "attachmentId" in: "path" description: "The attachment id" required: true type: "string" - name: "size" in: "query" required: false type: "string" enum: - "SMALL" - "MEDIUM" - "LARGE" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/data: get: summary: "Get the form data" description: "Get all form data attached to this form. If there are no form\ \ data attached, an empty array is returned. If a type is specified, only\ \ the data with the given type is returned" operationId: "getAllData" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "type" in: "query" required: false type: "string" responses: 200: description: "successful operation" schema: type: "array" items: $ref: "#/definitions/FormData" post: summary: "Add data" description: "Add data to the form." operationId: "addData" consumes: - "application/json;charset=UTF-8" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - in: "body" name: "body" description: "The list of data" required: true schema: $ref: "#/definitions/DataContainer" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/data-set: get: summary: "Export this form's data set" description: "Export this form to the configured data set format." operationId: "generateDataSet" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: default: description: "successful operation" post: summary: "Store a data set" description: "" operationId: "saveDataSet" produces: - "text/plain" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: type: "string" /cloud/api/v1/forms/{formId}/data/{key}: get: summary: "Get the data" description: "Retrieve the data matching the key in the URL. " operationId: "getData" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "key" in: "path" description: "The data key" required: true type: "string" responses: 200: description: "successful operation" schema: $ref: "#/definitions/FormData" delete: summary: "Remove the data" description: "Remove the data from the form." operationId: "deleteData" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "key" in: "path" description: "The data key" required: true type: "string" responses: 200: description: "" /cloud/api/v1/forms/{formId}/data/{key}/content: get: summary: "Get the raw content" description: "Retrieve the raw content matching the key in the URL." operationId: "getDataContent" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "key" in: "path" description: "The data key" required: true type: "string" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/error_report: post: summary: "Create error report." description: "Create error report." operationId: "errorReport" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "message" in: "query" required: true type: "ref" - name: "redux" in: "query" required: true type: "ref" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/export: get: summary: "Export this form" description: "Export this form to the configured export format. This export\ \ can be used to recreate the form with the same state." operationId: "generateExport" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/formats: get: summary: "Get all available export formats" description: "Retrieve a list of available export formats." operationId: "getAvailableFormats" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: type: "array" items: type: "array" items: type: "string" /cloud/api/v1/forms/{formId}/lock: delete: summary: "Remove the lock." description: "Release the backend lock on the form." operationId: "releaseForm" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/merge: post: summary: "Merge data in the current form." description: "Merge data from a data set in the current form." operationId: "mergeDataInForm" consumes: - "application/json;charset=UTF-8" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - in: "body" name: "body" description: "The merge request with the key to merge into the current form" required: true schema: $ref: "#/definitions/MergeRequest" responses: 200: description: "successful operation" schema: type: "array" items: $ref: "#/definitions/FormData" /cloud/api/v1/forms/{formId}/recipients: get: summary: "Get the recipients" description: "Get all recipients for this form. If there are no recipients,\ \ an empty array is returned." operationId: "getRecipients" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: type: "array" items: $ref: "#/definitions/Contact" post: summary: "Add a recipient" description: "Add a recipient at the end of the list of recipients." operationId: "addRecipient" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - in: "body" name: "body" description: "The new recipient" required: true schema: $ref: "#/definitions/Contact" responses: 200: description: "successful operation" schema: $ref: "#/definitions/Contact" put: summary: "Sets the recipients" description: "Replaces the recipients with the given list" operationId: "setRecipients" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - in: "body" name: "body" description: "The list of recipients" required: true schema: $ref: "#/definitions/Contacts" responses: 200: description: "successful operation" schema: type: "array" items: $ref: "#/definitions/Contact" delete: summary: "Remove all recipients" description: "Empty the list of recipients on the form." operationId: "clearAllRecipients" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "" /cloud/api/v1/forms/{formId}/recipients/add/self: put: summary: "Adds self as receiver" description: "Only adds self as receiver when not ambiguous." operationId: "addSelf" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: $ref: "#/definitions/Contact" /cloud/api/v1/forms/{formId}/recipients/healthcareactorids: put: summary: "Sets the recipients" description: "Replaces the recipients with the given list" operationId: "setRecipientsByHealthcareActorIds" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - in: "body" name: "body" description: "The list of recipients" required: true schema: type: "array" items: $ref: "#/definitions/HealthcareActorId" responses: 200: description: "successful operation" schema: type: "array" items: $ref: "#/definitions/Contact" /cloud/api/v1/forms/{formId}/recipients/put/self: put: summary: "Clears all recipients and adds self as receiver." description: "Only adds self as receiver when not ambiguous." operationId: "clearRecipientsAndAddSelf" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: type: "array" items: $ref: "#/definitions/Contact" /cloud/api/v1/forms/{formId}/recipients/{healthCareActorId}: put: summary: "Add a recipient" description: "Add a recipient based on the healthcareActorId at the end of the\ \ list of recipients." operationId: "addRecipient" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "healthCareActorId" in: "path" description: "The new recipient" required: true type: "ref" responses: 200: description: "successful operation" schema: $ref: "#/definitions/Contact" /cloud/api/v1/forms/{formId}/recipients/{recipientId}: get: summary: "Get the recipient" description: "Retrieve the recipient matching the ID in the URL." operationId: "getRecipient" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "recipientId" in: "path" description: "The recipient id" required: true type: "string" responses: 200: description: "successful operation" schema: $ref: "#/definitions/Contact" delete: summary: "Remove the recipient" description: "Remove the recipient from the list of recipients." operationId: "deleteRecipient" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "recipientId" in: "path" description: "The recipient id" required: true type: "string" responses: default: description: "successful operation" /cloud/api/v1/forms/{formId}/sender: get: summary: "Retrieve the sender" description: "Get the sender configured for this form. If there is no sender\ \ configured on the form, a 404 status code is returned." operationId: "getSender" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: $ref: "#/definitions/Contact" put: summary: "Set the sender" description: "Set the sender overwriting any existing sender if there is one\ \ configured." operationId: "setSender" consumes: - "application/json;charset=UTF-8" produces: - "application/json;charset=UTF-8" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - in: "body" name: "body" description: "The contact to set as sender" required: true schema: $ref: "#/definitions/Contact" responses: 200: description: "successful operation" schema: $ref: "#/definitions/Contact" delete: summary: "Remove the sender" description: "Remove the sender configured on the form. After executing this\ \ call, the GET operation will return status code 404." operationId: "deleteSender" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "" /cloud/api/v1/forms/{formId}/sender/self: put: summary: "Set user as sender" description: "Set the sender as the user, overwriting any existing sender if\ \ there is one configured." operationId: "setSelfAsSender" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" responses: 200: description: "successful operation" schema: $ref: "#/definitions/Contact" /cloud/api/v1/forms/{formId}/{format}: get: summary: "Export this form" description: "Export this form to the given format." operationId: "export" parameters: - name: "formId" in: "path" description: "The form id" required: true type: "string" - name: "format" in: "path" description: "The export format" required: true type: "string" responses: default: description: "successful operation" definitions: ActingCloudUser: type: "object" properties: givenName: type: "string" readOnly: true name: type: "string" readOnly: true username: type: "string" readOnly: true ssin: type: "string" readOnly: true email: type: "string" readOnly: true departments: type: "array" readOnly: true items: type: "string" qualities: type: "array" readOnly: true items: $ref: "#/definitions/Quality" AttachmentVO: type: "object" properties: dimension: $ref: "#/definitions/DimensionVO" creationDateTime: type: "string" format: "date-time" originalSize: type: "integer" format: "int64" sizes: type: "object" additionalProperties: $ref: "#/definitions/DimensionVO" id: type: "string" size: type: "integer" format: "int64" fileName: type: "string" mimeType: type: "string" AttachmentsConstraint: type: "object" properties: maxAttachmentsSize: type: "integer" format: "int64" readOnly: true targetAttachmentsSize: type: "integer" format: "int64" readOnly: true minAttachmentsCount: type: "integer" format: "int32" readOnly: true maxAttachmentsCount: type: "integer" format: "int32" readOnly: true CloudIdentifier: type: "object" properties: value: type: "string" readOnly: true type: type: "string" readOnly: true CloudUser: type: "object" properties: tokenId: type: "string" readOnly: true userId: type: "string" readOnly: true stable: type: "boolean" readOnly: true default: false person: type: "boolean" readOnly: true default: false corilusId: type: "boolean" readOnly: true default: false integrator: readOnly: true $ref: "#/definitions/Integrator" cloudUserDetails: readOnly: true $ref: "#/definitions/CloudUserDetails" actingCloudUser: readOnly: true $ref: "#/definitions/ActingCloudUser" grantedAuthorities: type: "array" readOnly: true items: type: "string" CloudUserDetails: type: "object" properties: givenName: type: "string" readOnly: true name: type: "string" readOnly: true identifier: readOnly: true $ref: "#/definitions/CloudIdentifier" qualities: type: "array" readOnly: true items: $ref: "#/definitions/Quality" postalCode: type: "string" readOnly: true Contact: type: "object" required: - "identifier" properties: id: type: "string" description: "Unique contact id. Set by the server side when returning a contact\ \ instance. If set by the client side, this field must be null." readOnly: true firstName: type: "string" description: "The contact's first name. Either this field is filled together\ \ with the last name, or the name field is filled." readOnly: true lastName: type: "string" description: "The contact's last name." readOnly: true name: type: "string" description: "The contact's name. A contact with just a name is usually an\ \ organization." readOnly: true identifier: readOnly: true $ref: "#/definitions/EhealthIdentifier" subContact: readOnly: true $ref: "#/definitions/SubContact" description: "A sender or receiver of a form." Contacts: type: "object" properties: contacts: type: "array" items: $ref: "#/definitions/Contact" CreateFormRequest: type: "object" properties: newFormRequest: type: "boolean" default: false maxAttachmentsSize: type: "integer" format: "int64" minAttachmentsCount: type: "integer" format: "int32" maxAttachmentsCount: type: "integer" format: "int32" recreateFormRequest: type: "boolean" default: false DataContainer: type: "object" properties: data: type: "array" items: $ref: "#/definitions/FormData" DimensionVO: type: "object" required: - "height" - "width" properties: width: type: "integer" format: "int32" readOnly: true height: type: "integer" format: "int32" readOnly: true EhealthIdentifier: type: "object" required: - "identifier" - "quality" properties: identifier: type: "string" description: "The identifier to contact e-health." readOnly: true minLength: 1 quality: type: "string" description: "The contact's e-health quality." readOnly: true minLength: 1 applicationId: type: "string" description: "The contact's e-health application id." readOnly: true description: "An identifier to send of a channel (most often e-health)." Environment: type: "object" properties: name: type: "string" readOnly: true coreVersion: type: "string" readOnly: true apiVersion: type: "string" readOnly: true googleAnalyticsKey: type: "string" readOnly: true env: type: "string" readOnly: true FormData: type: "object" required: - "value" properties: key: type: "string" description: "The key" readOnly: true minLength: 1 value: type: "string" description: "The value" readOnly: true type: type: "string" description: "The type of value (KeyValue or RichText)" readOnly: true minLength: 1 FormProperties: type: "object" properties: instanceInfo: readOnly: true $ref: "#/definitions/Instance" integrator: readOnly: true $ref: "#/definitions/Integrator" environment: readOnly: true $ref: "#/definitions/Environment" userInfo: readOnly: true $ref: "#/definitions/UserInfo" cloudUser: readOnly: true $ref: "#/definitions/CloudUser" attachmentsConstraint: readOnly: true $ref: "#/definitions/AttachmentsConstraint" FormReference: type: "object" properties: formId: type: "string" description: "The form's instance identifier." readOnly: true clientUrl: type: "string" description: "The URL to open for the user to show the form." readOnly: true HealthcareActorId: type: "object" properties: type: $ref: "#/definitions/TypeHealthcareActorId" baseIdentifier: $ref: "#/definitions/Identifier" Id: type: "object" required: - "name" - "version" properties: name: type: "string" description: "The name of the form-definition." readOnly: true minLength: 1 version: type: "string" description: "The version of the form-definition." readOnly: true minLength: 1 description: "Combines the name and version number of a form-definition, which\ \ is a unique combination for each form-definition." Identifier: type: "object" properties: baseIdentifier: $ref: "#/definitions/Identifier" type: $ref: "#/definitions/TypeIdentifier" Instance: type: "object" properties: formId: type: "string" readOnly: true locked: type: "boolean" readOnly: true default: false lockedMessage: type: "string" readOnly: true prototypeId: readOnly: true $ref: "#/definitions/Id" locale: readOnly: true $ref: "#/definitions/Locale" formManagesAttachments: type: "boolean" readOnly: true default: false canModifyAttachments: type: "boolean" readOnly: true default: false canModifySender: type: "boolean" readOnly: true default: false canModifyRecipients: type: "boolean" readOnly: true default: false dataUrls: type: "object" readOnly: true additionalProperties: type: "string" Integrator: type: "object" required: - "name" - "version" properties: name: type: "string" description: "The name of the integrator." readOnly: true minLength: 1 version: type: "string" description: "The current version-number of the integrator." readOnly: true minLength: 1 description: "The integrator" Locale: type: "object" properties: displayName: type: "string" language: type: "string" script: type: "string" country: type: "string" variant: type: "string" extensionKeys: type: "array" uniqueItems: true items: type: "string" unicodeLocaleAttributes: type: "array" uniqueItems: true items: type: "string" unicodeLocaleKeys: type: "array" uniqueItems: true items: type: "string" iso3Language: type: "string" iso3Country: type: "string" displayLanguage: type: "string" displayScript: type: "string" displayCountry: type: "string" displayVariant: type: "string" MergeRequest: type: "object" properties: dataSetId: type: "string" description: "The id of the data set to merge" readOnly: true minLength: 1 mergeStrategy: type: "string" description: "Do we want to extend our data set or overwrite it" readOnly: true minLength: 1 Quality: type: "object" properties: name: type: "string" readOnly: true identifier: type: "string" readOnly: true designation: type: "string" readOnly: true SubContact: type: "object" properties: firstName: type: "string" description: "The contact's first name. Either this field is filled together\ \ with the last name, or the name field is filled." readOnly: true lastName: type: "string" description: "The contact's last name." readOnly: true name: type: "string" description: "The contact's name. A contact with just a name is usually an\ \ organization." readOnly: true identifier: type: "string" description: "The identifier to contact e-health." readOnly: true quality: type: "string" description: "The contact's e-health quality." readOnly: true minLength: 1 description: "A sub contact for a contact." TypeHealthcareActorId: type: "object" TypeIdentifier: type: "object" UserInfo: type: "object" properties: userId: type: "string" readOnly: true roles: type: "array" readOnly: true items: type: "string" stable: type: "boolean" readOnly: true default: false person: type: "boolean" readOnly: true default: false