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"
}
}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.
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"
}
}Autorizaciones
Parámetros de ruta
Unique identifier for the invoice to retrieve.
Parámetros de consulta
Access token of the fiscal link that holds the invoice, returned when the link is created.
"link_6n12zLmai3lLE9Dq_token_gvEJi8FrBge4fb3cz7Wp856W"
Respuesta
The invoice.
Unique identifier of the invoice.
"inv_9qXbVNDzgrXyq2Oa"
Type of the object. Always invoice.
Three-letter ISO 4217 currency code of the document amounts, in uppercase. null when the fiscal authority does not report it.
"CLP"
ISO 8601 timestamp of the document date. For grouped summary entries, corresponds to the last day of the tax period each entry covers.
"2021-05-12T00:00:00.000Z"
Identifier of the fiscal authority that reported the invoice. One of cl_fiscal_sii (Chilean tax authority, SII) or mx_fiscal_sat (Mexican tax authority, SAT).
cl_fiscal_sii, mx_fiscal_sat "cl_fiscal_sii"
Detail specific to the fiscal authority that reported the invoice: a sii_invoice for SII invoices or a sat_invoice for SAT invoices.
- Option 1
- Option 2
Show child attributes
Show child attributes
Whether the account holder issued or received the document. One of issued (sales documents) or received (purchase documents).
issued, received "received"
Party that issued the document. null when the account holder issued the document or when the entry is a grouped summary.
Show child attributes
Show child attributes
Net amount of the document, in the smallest unit of currency (for example, 1000 for $1000 CLP, since CLP has no minor unit, or 1000 for $10.00 MXN).
100000
Number of the document in the fiscal authority's registry, for example the folio of an SII document. null when the registry does not report a number.
"2611"
Party that received the document. null when the account holder received the document or when the entry is a grouped summary.
Show child attributes
Show child attributes
Tax period the document belongs to, in MM/YYYY format.
"05/2021"
Total amount of the document, including taxes, in the smallest unit of currency (for example, 1000 for $1000 CLP, since CLP has no minor unit, or 1000 for $10.00 MXN).
119000
¿Esta página le ayudó?