Accounting API
Invoices
Mark Paid
this api endpoint (post) (post) marks an existing invoice as paid if the request succeeds, it returns the id of the invoice that was updated otherwise, it will return an error permissions invoices edit webhook event invoice events docid\ npa6n9frki q1e1yzvdbs upon a successful api request, we will start finalising the invoice and initiate any post payment processing activities keep in mind that this is not instant, so it is advisable to listen for the invoice events docid\ npa6n9frki q1e1yzvdbs webhook event before triggering any additional processes in your systems the webhook triggers when the full invoice is marked as paid or when there are no more items that can be marked as paid path parameters id the id of the invoice to update body parameters products array of objects an array of objects each representing a product or invoice item that you wish to mark as paid leave empty if you are marking the full invoice as paid "products" \[ { "id" "9e51f934 8ff7 459e b5a6 a9ebc9bb2e1f" }, { "invoice item id" "b0249cb8 397a 4e2f 89db fe176f06e8b7" }, { "variation id" "zsad123 2bdc 47c0 abc0 1b5dfbd33ef1" } ] require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/invoices/mark paid/c834d061 2bdc 47c0 abc0 1b5dfbd33ef1") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/invoices/mark paid/c834d061 2bdc 47c0 abc0 1b5dfbd33ef1' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'post', headers myheaders }; fetch("https //api tamio com/v2/invoices/mark paid/c834d061 2bdc 47c0 abc0 1b5dfbd33ef1", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "id" "c834d061 2bdc 47c0 abc0 1b5dfbd33ef1" }