Core - Attachments ================== .. Last update: 28/10/2021 Module dedicated to handling attachments. The base url for the APIs in this page is at:: /api/mobile/ A JSON file with OpenAPI data about all core-related mobile APIs can be downloaded :download:`here `. Gets a specific attachment file as download ------------------------------------------- .. openapi:: /openapi/srv-core/api-src-WebMobile.json :paths: /v1/attachment/{id} | id: The guid of the attachment to download (Guid) The answer will be an HTTP download like this:: /9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQA... The result can be also a negative response with one of these messages: ``No data found for file ...`` No data found. ``Unable to serve data at ...`` Generic error. Or a "Not Found" error. Sync License Document's Attachments ----------------------------------- Receives data about multiple attachments related to the user's last license document .. openapi:: /openapi/srv-core/api-src-WebMobile.json :paths: /v1/attachment/license-document/sync The body of the request is the following:: { Attachments: [ { Guid: '91cd7750-44dc-41ca-b6cd-b801a6cca9ec', // Guid Data: "base64-encoded content of the file", // String Name: "Attachment name", // String MimeType: "application/pdf" // String }, { ... } ] } In case of problems while registering one or more attachments, the API will return an OK response with the details of the attachments with errors:: { [ { Attachment: "91cd7750-44dc-41ca-b6cd-b801a6cca9ec", // Guid of the attachment Code: "10101", // Numeric code of the error Message: "..." // Localized description of the error }, { ... } ] } The error reason may be: * 00100: some error arose while trying to save the attachment in the storage