Correct, R18 allows you to attach file(s) at the time you post your InvoiceDetailRequest cxml. Before R18, you would attach through a 2 part post via a Coupa API key. Starting with R18, there's no API key and you use the header . Below is how you do it. I'll monitor this page in case you have further clarifying questions.
1--You must indicate MIME multipart media type in your Content-ID header. This will trigger our parser to retrieve the attachment.
example:
Content-type: multipart/related
2--You must pass the attribute in the element. Attachment data can be a url or a content id (cid) to a file on your server. If doing cid, the file must reside on the same folder structure on your server as your InvoiceDetailRequest doc. In the below example, we're attaching 2 files, a file and a url.
example:
<Comments>
<Attachment><URL>cid:test.pdf</URL></Attachment>
<Attachment><URL>url</URL></Attachment>
</Comments>
</InvoiceDetailRequestHeader>
For more details, see pages 51 & 69 on cxml.org.