Get an invoice
curl --request GET \
--url https://api.fintoc.com/v1/invoices/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/invoices/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v1/invoices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/invoices/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fintoc.com/v1/invoices/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "inv_9qXbVNDzgrXyq2Oa",
"object": "invoice",
"currency": "CLP",
"date": "2021-05-12T00:00:00.000Z",
"institution_id": "cl_fiscal_sii",
"institution_invoice": {
"accepted_at": "2021-05-13T11:23:09.000Z",
"common_use_vat": 0,
"confirmation_status": "A",
"construction_company_credit": 0,
"container_deposit_guarantee": 0,
"document_type": 33,
"domestic_ticket_sales": 0,
"exempt_amount": 0,
"exempt_commissions": 0,
"fixed_assets_net_amount": 0,
"fixed_assets_vat_amount": 0,
"free_zone_tax": 0,
"has_note": false,
"international_ticket_sales": 0,
"invoice_status": "registered",
"is_services_invoice": false,
"net_commissions": 0,
"non_credit_tax_amount": 0,
"non_refundable_vat_amount": 0,
"non_refundable_vat_code": 0,
"non_withheld_vat": 0,
"other_taxes": {},
"out_of_time_vat": 0,
"own_vat": 0,
"partial_vat_withheld": 0,
"receipt_reference_number": null,
"received_at": "2021-05-12T09:31:02.000Z",
"reference_number": "1044",
"reference_type_code": 33,
"rejected_at": null,
"services_invoice": null,
"settlement_issuer_id": "55555555-5",
"third_party_vat": 0,
"tobacco": {},
"total_documents": null,
"total_vat_withheld": 0,
"transaction_category": "Del Giro",
"vat_amount": 19000,
"vat_commissions": 0
},
"issue_type": "received",
"issuer": {
"id": "55555555-5",
"name": "Proveedor Test SpA"
},
"net_amount": 100000,
"number": "2611",
"receiver": null,
"tax_period": "05/2021",
"total_amount": 119000
}{
"error": {
"type": "invalid_request_error",
"code": "empty_string",
"param": "link_token",
"message": "Empty string is invalid: link_token",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_link_token",
"param": "link_token",
"message": "Invalid access token for link: link_6n12zLmai3lLE9Dq_token_********************856W",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such invoice: inv_9qXbVNDzgrXyq2Oa",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Facturas fiscales
Get an invoice
Retrieves an invoice by its id, using the link’s link_token to authenticate the request. You can only retrieve invoices that belong to the link’s fiscal account. For links created with the income product, you can only retrieve the fee receipts for professional services the account holder issued.
GET
/
v1
/
invoices
/
{id}
Get an invoice
curl --request GET \
--url https://api.fintoc.com/v1/invoices/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/invoices/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v1/invoices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/invoices/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fintoc.com/v1/invoices/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "inv_9qXbVNDzgrXyq2Oa",
"object": "invoice",
"currency": "CLP",
"date": "2021-05-12T00:00:00.000Z",
"institution_id": "cl_fiscal_sii",
"institution_invoice": {
"accepted_at": "2021-05-13T11:23:09.000Z",
"common_use_vat": 0,
"confirmation_status": "A",
"construction_company_credit": 0,
"container_deposit_guarantee": 0,
"document_type": 33,
"domestic_ticket_sales": 0,
"exempt_amount": 0,
"exempt_commissions": 0,
"fixed_assets_net_amount": 0,
"fixed_assets_vat_amount": 0,
"free_zone_tax": 0,
"has_note": false,
"international_ticket_sales": 0,
"invoice_status": "registered",
"is_services_invoice": false,
"net_commissions": 0,
"non_credit_tax_amount": 0,
"non_refundable_vat_amount": 0,
"non_refundable_vat_code": 0,
"non_withheld_vat": 0,
"other_taxes": {},
"out_of_time_vat": 0,
"own_vat": 0,
"partial_vat_withheld": 0,
"receipt_reference_number": null,
"received_at": "2021-05-12T09:31:02.000Z",
"reference_number": "1044",
"reference_type_code": 33,
"rejected_at": null,
"services_invoice": null,
"settlement_issuer_id": "55555555-5",
"third_party_vat": 0,
"tobacco": {},
"total_documents": null,
"total_vat_withheld": 0,
"transaction_category": "Del Giro",
"vat_amount": 19000,
"vat_commissions": 0
},
"issue_type": "received",
"issuer": {
"id": "55555555-5",
"name": "Proveedor Test SpA"
},
"net_amount": 100000,
"number": "2611",
"receiver": null,
"tax_period": "05/2021",
"total_amount": 119000
}{
"error": {
"type": "invalid_request_error",
"code": "empty_string",
"param": "link_token",
"message": "Empty string is invalid: link_token",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_link_token",
"param": "link_token",
"message": "Invalid access token for link: link_6n12zLmai3lLE9Dq_token_********************856W",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such invoice: inv_9qXbVNDzgrXyq2Oa",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Parámetros de consulta
Respuesta
The invoice.
¿Esta página le ayudó?