Appearance
POST
/communication/template-text/template-texts/{id}/locales/{locale}/attachments/filesRequired scope:
templatetext:updateAttaches a file to a language of an e-mail template. The request is multipart/form-data with the part file and, optionally, the part description (left out or blank: the name of the file). The file is stored on the Azure file share that the filedir of the company in Ramos names, under attachments/templates/
Parameters ​
Path parameters
locale stringLocale code (e.g. 'sv', 'en').
Query parameters
description stringThe description of the attachment, at most 2000 characters. Left out or blank: the name of the file.
Response ​
The attachment that was added.
JSON
{
"id": "6f1c4c0e-2a53-4f5c-9d6a-0c3f6b1d7a11",
"kind": "REPORT",
"fileName": "Purchase_order_{inorderno}.pdf",
"description": "Purchase order",
"reportId": 10035,
"parameters": {
"inorderno": "{inorderno}"
},
"languageId": 1,
"skuFormatId": 0,
"size": 48213,
"contentType": "application/pdf"
}
| Error code | Description |
|---|---|
attachment-storage-failed | The file could not be stored on the file share. Nothing was changed. |
attachment-storage-not-available | The company has no file directory (filedir) in Ramos, or it is not the UNC path of a share on the Azure storage account of the environment (account.file.core.windows.net), or files are not enabled in this environment, so files cannot be attached. |
attachment-too-large | The file is larger than the limit of a request, or the files of the language would be larger than 10 MB together. |
attachments-not-supported | The template is an SMS or an invoicetext; only an e-mail can have attachments. |
duplicate-attachment-name | The language already has an attachment with the file name, in any case. |
empty-attachment-file | The file is empty. |
file-type-not-allowed | The file does not have one of the allowed extensions. |
invalid-attachment-description | The description is longer than 2000 characters. |
invalid-attachment-name | The file has no usable name or its name is longer than 255 characters, or the path of the stored file would be longer than 2048 characters. |
invalid-request | The request has no file part. |
locale-not-found | The template does not have the locale. |
template-not-found | No template with the given code exists for the current company. |
too-many-attachments | The language already has 20 attachments. |