The UploadDocument method uploads a new document (or other file) for use in campaigns to a specified folder.
New documents folders can be created using CreateDocumentFolder. Note that multiple documents with the same name can be created, and that on creation document names will be stripped of non-standard characters.
Guidance notes
Supported file types are: .doc, .docx, .dot, .eps, .ical, .ics, .indd, .jpg,
.mp3, .pdf, .pps, .ppsx, .ppt, .pptx, .pub, .rtf, .vcf, .vcs, .xls, .xlsx and .xps
Parameters
| username |
string |
This is the username from your API key. It is in the format of an email address and will look similar to apiuser‑908709770324@apiconnector.com |
required |
| password |
string |
This is the password from your API key. |
required |
| parentFolderId |
integer |
This is the identifier of the parent folder in which this new document should be created. The root folder has the ID of 0 (zero). |
required |
| fileName |
string |
The filename for your new document. |
required |
| bytes |
data |
This is the original document file, encoded in Base64 format. |
required |
Return values
This will return the details for the new document including the filename; a reference should be
made of this filename if you wish to link to it in a campaign, or the ID if you wish to
attach it to a campaign.
| id |
integer |
The identifier for document. |
| name |
string |
The name of the document. |
| fileName |
string |
The filename for the document. |
| fileSize |
int |
The filesize of the document. |
| dateCreated |
dateTime |
The date and time the document was added to the system. |
| dateModified |
dateTime |
The date and time the document was last modified in the system. |