Upload a PDF file to be attached to an Invoice.
Requests to this endpoint must be encoded as content type multipart/form-data.
Parameters
| required | name | format | description |
|---|---|---|---|
| * | file |
Binary, multipart/form-data encoded. Max 5MB. PDF Only |
File to upload |
Example Request
curl https://api.payjunction.com/invoices/files \
-u "YOUR_USER:YOUR_PASSWORD" \
-H "Accept:application/json" \
-H "X-PJ-Application-Key: ${YOUR_PRODUCTION_APP_KEY}" \
-F file=@attachment.pdf
Example Response - Success
{
"fileId" : "522ce622-5638-4628-bb1a-beb5b16a1cd6"
}
Example Response - Error
{
"errors" : [ {
"message" : "File must be smaller than 5 MB.",
"parameter" : "file",
"type" : "invalid"
}, {
"message" : "File must be a PDF.",
"parameter" : "file",
"type" : "invalid"
} ]
}