Accounting API
Invoices
Retrieve Invoice
this api endpoint ( get get ) fetches an invoice by id if the request succeeds, it will return an invoice object docid\ ebk zdbyuq96ennwbv l6 permissions invoices view path parameters id the id of the invoice to retrieve require "uri" require "net/http" url = uri("https //api tamio com/v2/invoices/retrieve/64305b0e 92f4 46b9 b2da fa27615c3821") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read body var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api tamio com/v2/invoices/retrieve/64305b0e 92f4 46b9 b2da fa27615c3821", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));curl location request get 'https //api tamio com/v2/invoices/retrieve/64305b0e 92f4 46b9 b2da fa27615c3821' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'{ "status" 200, "invoice" { "version" 2, "id" "64305b0e 92f4 46b9 b2da fa27615c3821", "currency" "eur", "paid" true, "object" "invoice", "type" "checkout", "prefix" "ant", "number" 584, "total" 1002, "payment" "stripe", "date" 1670853930, "status" "new", "subscription" null, "is instalment" false, "merchant" { "address" "awesome street", "city" "frankfurt", "country" "de", "email" "merchant\@example com", "name" "awesome ltd", "postcode" "60123", "state" null, "telephone" "+491234566789", "vat" null }, "locale" "en", "customer information" { "billing information" { "address" "jane doe street", "city" "copenhagen", "country" "dk", "email" "myemail\@example com", "id" "83ce060b 80e3 41d2 87a9 d723e9657a00", "ip" null, "is company" false, "locale" "en", "name" "john doe", "object" "address", "phone" null, "postcode" "abc1234", "representative" null, "shipping address" false, "state" null }, "country" "dk", "email" "myemail\@example com", "id" "a38f68fb 23f8 409d 93d4 86386a0e6441", "last name" "doe", "locale" "en", "name" "john", "stripe customer id" "cus mtqtejhzzql9in" }, "products" \[ { "classification" "ebooks", "currency" "eur", "discount allowed" true, "discounts" \[ { "coupon" null, "discount" 1000, "duration" 0, "id" "842f6ac8 b34e 46e7 a3f1 8fbf4d15aea6", "shipping discount" 0 } ], "ean" null, "has shipping" false, "id" "bb7d96d5 6b43 4b01 9f8c 089b3d37d951", "is moss product" true, "is variant" false, "license list" \[], "name" "my awesome digital product", "pack" null, "quantity" 2, "reservations" \[], "sku" null, "taxes" { "inclusive" false, "shipping tax rates" \[], "tax rates" \[ { "id" null, "inclusive" false, "jurisdiction" "dk", "label" "moms", "moss" true, "rate amount" null, "rate percent" 25, "tax" 200, "vat tax" true } ] }, "totals" { "discount" 1000, "exchange rate" null, "item total" 802, "item total with tax" 1002, "moss tax total" 200, "moss taxable amount" 802, "price conversion" false, "shipping" 0, "shipping discount" 0, "shipping subtotal" 0, "shipping tax" 0, "shipping total" 0, "subtotal" 1802, "tax" 200, "total" 1002, "unit price" 901 }, "type" "digital product", "variation id" null } ], "discounts" \[ { "applies to" \[ "bb7d96d5 6b43 4b01 9f8c 089b3d37d951" ], "coupon" null, "discount" 1000, "duration" 0, "id" "842f6ac8 b34e 46e7 a3f1 8fbf4d15aea6", "shipping discount" 0 } ], "licenses" \[], "start date" null, "end date" null, "totals" { "discount" 1000, "item count" 2, "item total" 802, "item total with tax" 1002, "moss tax total" 200, "moss taxable amount" 802, "price conversion" true, "shipping" 0, "shipping discount" 0, "shipping subtotal" 0, "shipping tax" 0, "shipping total" 0, "subtotal" 1802, "tax" 200, "total" 1002, "trial deductions" 0, "gateway fees" 54, "affiliate revenue" 0, "amount due" 0, "refunded total" 0 }, "taxes" { "has vat" true, "shipping tax rates" \[], "tax rates" \[ { "applies to" \[ "bb7d96d5 6b43 4b01 9f8c 089b3d37d951" ], "id" null, "inclusive" false, "jurisdiction" "dk", "label" "moms", "moss" true, "rate amount" null, "rate percent" 25, "tax" 200, "vat tax" true } ] }, "shipping" null, "affiliate program" null, "affiliate partner" null, "due date" null, "refunds" null, "consents" null, "appendix" null } }