Invoice API Attach PDF

Stonewareinc2
Contributor
Contributor

Trying to attach a PDF copy of an order to an invoice created with the API.   It appears to work, however, the attachment isn't on the invoice.  Below is the JSON I use to  add it to the invoice during invoice creation as well as the results from postman when I query the invoice after.   The URL use to create the invoice  does work. you can copy and paste it into the browser and get the file.  I can also query the invoice after its created and it looks like the attachment should be there.   That attachment url does not work if you copy and paste it into the browser.  I get no errors while posting.

 

Anyone have any idea how to attach a pdf to an invoice in V2 API?

 

attachments":[{"id":"2","content_type":"application/pdf","reference_url":"https://websitewhere image is located/import/three.pdf"}]

 

Here is what is returned when I query the invoice.  As you can see, it appears to have worked.  But the file is not present and it causes the invoice to error out when you look at it.

 

"attachments": [
            {
                "id""2",
            }
        ]
 
 
Login to Me Too
2 REPLIES 2

sg1valsag
Contributor
Contributor

I have the same problem as you.  Did you find a solution?

Login to Me Too

olthom
Contributor
Contributor

Any Updates? Facing the same Problem

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.