POST to /api/account/ACCOUNT_CODE/bulletins/BULLETIN_ID/files
This method requires a multipart form. XML will not work.
POST /api/account/<ACCOUNT_CODE>/bulletins/<BULLETIN_ID>/files HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/4.1 Host: localhost Content-Length: 498 Content-Type: multipart/form-data; boundary=--vA-rSHlEhJks2YQWyjHExUTT7bC0a_ --vA-rSHlEhJks2YQWyjHExUTT7bC0a_ Content-Disposition: form-data; name="bulletin_file[attachment]"; filename="attachment2.txt" Content-Type: text/plain Content of file attachment two --vA-rSHlEhJks2YQWyjHExUTT7bC0a_ Content-Disposition: form-data; name="bulletin_file[deliver]" true --vA-rSHlEhJks2YQWyjHExUTT7bC0a_--
When using the multipart input form, attachments are included as links to files hosted on our servers by default. If you'd like actually include the attachment as a file with the bulletin, you can use the following attributes.
<?xml version="1.0" encoding="UTF-8"?> <bulletin_file> <to-param>10000</to-param> <deliver type="boolean">true</deliver> <bulletin-file-uri>/api/account/ACCOUNT/bulletins/10000/files/10000.xml</bulletin-file-uri> <link rel="self" href="/api/account/ACME/bulletins/10000/files/10000" /> <public-uri>http://evolution.local//attachments/ACCOUNT/2012/01/19/file_attachments/10000/foo.txt</public-uri> <link rel="public" href="http://evolution.local//attachments/ACME/2012/01/19/file_attachments/10000/foo.txt" /> </bulletin_file>
Reference bulletin error codes
Was this page helpful? Can't find what you need? Let us know