curl --request GET \
--url https://api.syntage.com/extractions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.syntage.com/extractions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.syntage.com/extractions/{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.syntage.com/extractions/{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 => [
"X-API-Key: <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.syntage.com/extractions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.syntage.com/extractions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/extractions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"@context": "/contexts/Extraction",
"@id": "/extractions/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "Extraction",
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"taxpayer": {
"@id": "/taxpayers/PEIC211118IS0",
"@type": "Taxpayer",
"id": "PEIC211118IS0",
"personType": "physical",
"registrationDate": "2023-12-25",
"name": "Pedro Infante Cruz"
},
"extractor": "invoice",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": [
"I",
"E",
"P"
],
"issued": true,
"received": true,
"complement": -1,
"pdf": true,
"xml": true
},
"status": "pending",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"rateLimitedAt": "2019-01-03T21:10:40.000Z",
"errorCode": null,
"createdDataPoints": 3,
"updatedDataPoints": 2,
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Retrieve an extraction
Retrieve a single extraction, including its extractor, options, status, timing, error code, and data point counts.
curl --request GET \
--url https://api.syntage.com/extractions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.syntage.com/extractions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.syntage.com/extractions/{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.syntage.com/extractions/{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 => [
"X-API-Key: <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.syntage.com/extractions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.syntage.com/extractions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/extractions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"@context": "/contexts/Extraction",
"@id": "/extractions/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "Extraction",
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"taxpayer": {
"@id": "/taxpayers/PEIC211118IS0",
"@type": "Taxpayer",
"id": "PEIC211118IS0",
"personType": "physical",
"registrationDate": "2023-12-25",
"name": "Pedro Infante Cruz"
},
"extractor": "invoice",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": [
"I",
"E",
"P"
],
"issued": true,
"received": true,
"complement": -1,
"pdf": true,
"xml": true
},
"status": "pending",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"rateLimitedAt": "2019-01-03T21:10:40.000Z",
"errorCode": null,
"createdDataPoints": 3,
"updatedDataPoints": 2,
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your API key is available in the Production and Sandbox dashboards.
Path Parameters
Response
Extraction resource response
Extraction IRI reference
"/extractions/91106968-1abd-4d64-85c1-4e73d96fb997"
JSON-LD resource type
Unique extraction ID
"91106968-1abd-4d64-85c1-4e73d96fb997"
Show child attributes
Show child attributes
Extractor to run, which retrieves resources from the corresponding datasource
invoice, monthly_tax_return, annual_tax_return, rif_tax_return, tax_status, tax_retention, tax_compliance, electronic_accounting, sat_certificates, rpc, buro_de_credito_report, bil, rug, background_check, infonavit Options are specific to the selected extractor. Select the schema matching the extractor; extractors not listed here do not accept options.
- Invoice extraction options
- Tax retention extraction options
- Annual tax return extraction options
- Monthly tax return extraction options
- RIF tax return extraction options
- Electronic accounting extraction options
- RPC extraction options
- Buró de Crédito report extraction options
Show child attributes
Show child attributes
pending, running, finished, failed, stopping, stopped Time when the status changed from pending to running
Time when the status changed from running to finished or failed
This field returns a date when the taxpayer reached the max amount of downloaded CFDI files allowed by SAT in a range of 24hrs. You should retry this extraction 24hrs later. If your taxpayer has not reached the max amount this value should be NULL
"2019-01-03T21:10:40.000Z"
invalid_credentials, login_failed, unrecoverable, sat_unavailable, internal_error, undefined null
This is the number of created resources. For example, if 1 invoice was created with its XML and PDF file this value should be 3. And If you previously extracted all the resources and there are no more resources to create this value is 0.
3
When your taxpayer has resources by a previous extraction and new extraction found changes between our data and Sat data it would update this resource. For example, when a new extraction finds a Canceled invoice which you previously extracted as an Active invoice.
2
Date and time the resource was created
"2020-01-01T12:15:00.000Z"
Date and time the resource was last updated
"2020-01-01T12:15:00.000Z"
Was this page helpful?