curl --request POST 'https://api.syntage.com/extractions' --header 'Content-Type: application/json' --header 'X-API-Key: YOUR_API_KEY' --data '{"entity":"/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d","extractor":"invoice","options":{"period":{"from":"2024-01-01","to":"2024-12-31"},"types":["I","E","P"],"issued":true,"received":true,"pdf":true,"xml":true}}'{
"@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"
}{
"@context": "/contexts/ConstraintViolation",
"@type": "ConstraintViolation",
"hydra:title": "An error occurred",
"hydra:description": "exampleField: This value should not be blank.",
"violations": [
{
"propertyPath": "exampleField",
"message": "This value should not be blank.",
"code": "rfc_valid_no_name_on_file"
}
]
}{
"message": "<string>"
}{
"conflictingExtractors": [
"invoice"
]
}Create an extraction
Create an extraction for a specific entity, extractor, and options.
If an equivalent extraction is already pending or running for the same entity, extractor, and options, the API returns 409 Conflict instead of starting a duplicate. Retrieve the in-progress extraction to track its status rather than retrying the request.
curl --request POST 'https://api.syntage.com/extractions' --header 'Content-Type: application/json' --header 'X-API-Key: YOUR_API_KEY' --data '{"entity":"/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d","extractor":"invoice","options":{"period":{"from":"2024-01-01","to":"2024-12-31"},"types":["I","E","P"],"issued":true,"received":true,"pdf":true,"xml":true}}'{
"@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"
}{
"@context": "/contexts/ConstraintViolation",
"@type": "ConstraintViolation",
"hydra:title": "An error occurred",
"hydra:description": "exampleField: This value should not be blank.",
"violations": [
{
"propertyPath": "exampleField",
"message": "This value should not be blank.",
"code": "rfc_valid_no_name_on_file"
}
]
}{
"message": "<string>"
}{
"conflictingExtractors": [
"invoice"
]
}Authorizations
Your API key is available in the Production and Sandbox dashboards.
Body
- Invoice extraction
- Tax retention extraction
- Annual tax return extraction
- Monthly tax return extraction
- RIF tax return extraction
- Electronic accounting extraction
- RPC extraction
- Buró de Crédito report extraction
- Tax status extraction
- Tax compliance extraction
- SAT certificates extraction
- BIL extraction
- RUG extraction
- Background Check extraction
- Infonavit extraction
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?