Is there any way through the API to attach a file (e.g. a scanned receipt) to a sales invoice or purchase record? There are documented APIs to create a purchase and an invoice, and to upload an untagged file to the receipt hub, but I can’t find anything to bridge the gap and associate an uploaded file with a particular purchase or sales invoice.
Is there something I’ve missed, and/or is it on the radar for future development?
(Background - I use a cloud-based EPOS system that gives me Z readings as web pages at a stable URL. Currently I manually create a sales invoice from the Z reading and include the URL as a note, I’m considering writing a script to automate this and I figured it would be prudent to attach a copy of the HTML Z reading page directly to the sales invoice in QuickFile in case we ever decide to move to a different EPOS and lose access to the current online records. If this could be scripted it would be handy not only for creating new invoices but also to save me having to go back and manually upload a hundred plus HTML files for the existing invoices).
That does sound helpful. Is there a way to associate the upload with the Purchase? I’m just about to upload 600 purchases via Purchase_Create, if there was a way to associate them with the Receipt_Upload’s that would be most excellent.
The good news however, is we’ve logged this on our planner to re-visit it, get it documented and perhaps add an option to supply a purchase invoice ID.
@ian_roberts - I am aware that the files for sales invoices are handled slightly differently to purchase invoices, so not sure how feasible this is. I have however logged it with our dev team to take a closer look, and will update this thread in due course.
@ricardo81 - As part of the schema, you can specify a file name. Perhaps you could use this as a way of specifying the date and supply name for easy identification? <ReceiptName>Supplier1 - 2016-09-28</ReceiptName>
That’d work for me. As long as I can reference one from the other, problem solved. For completeness in the API, it’d be great if you could upload the file with the Purchase_Create call, maybe a < name > and < data > encoded in base64
This is currently being looked into further and the current method (Receipt_Upload) is used internally by the old iPhone app, which although has been discontinued, is still being used by some users.
However, we are looking into a new method for the API which would broader in terms of it’s functionality compared to the existing method. The existing method only allows image files, whereas a new one will allow more file types.
I’m pleased to announce that there is now a brand new Document_Upload method for handling various document upload scenarios. We haven’t yet documented this method although it is available to test in the API Sandbox. The following diagram will illustrate what is possible, there’s also a sample XML document in the API Sandbox you can use for test purposes.
Fantastic. Now if you could just make it possible to override the VAT amount when creating invoice lines via the API then I could get rid of my horrible screen-scraping script altogether
(Context: I sell a mixture of 0%, 5% and 20% items in my shop, my EPOS calculates VAT on each item individually and tells me the exact net, VAT and gross totals to enter when I’m creating an invoice from the Z report. Currently I enter the net, set VAT to 20%, then override the value in the VAT amount box as per the EPOS report - the API lets you set a VAT percentage but not a specific amount)
Actually I’ve had a go already and it seems to work fine, though I will reiterate a comment I’ve seen before and say that it would be useful to us developers if you could document your response message formats somewhere in a similar way to the request ones.