attaching pdf to a bill using REST api

attaching pdf to a bill using REST api

I'm trying to attach a pdf to a bill using REST and curl. The problem is the example in that section in the API reference document does not show how to actually submit the file. It only shows the headers used.

I've been trying many variations of this command with no luck. Always getting an error message saying no attachment is found.

-X POST
"https://books.zoho.com/api/v3/bills/XXXXXXX/attachment?can_send_in_mail=true" 
--H "Authorization: Bearer xxxxxxxxxxxxx"
--H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
--H "X-com-zoho-invoice-organizationid: xxxxxxx"
--F  "attachment=@/Volumes/HardDrive/Users/xxxx/Documents/test.pdf"

I've search around and found a few forum posts trying to show how to do it using PHP. Can't find any examples of how to do it with REST.

I sure would appreciate an example showing the full command.