GET
/
extractions
/
{id}
Retrieve an extraction
curl --request GET \
  --url https://api.syntage.com/extractions/{id} \
  --header 'X-API-Key: <api-key>'
{
  "@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": {
    "types": [
      "I",
      "E",
      "P"
    ],
    "period": {
      "from": "2020-01-01T00:00:00.000Z",
      "to": "2020-03-31T23:59:59.000Z"
    }
  },
  "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"
}

Authorizations

X-API-Key
string
header
required

Your API key is available in the Production and Sandbox dashboards.

Path Parameters

id
string<uuid>
required

Response

Extraction resource response

@context
string
default:/contexts/Extraction
@id
string<iri-reference>

Extraction IRI reference

Example:

"/extractions/91106968-1abd-4d64-85c1-4e73d96fb997"

@type
string
default:Extraction
id
string<uuid>
Example:

"91106968-1abd-4d64-85c1-4e73d96fb997"

taxpayer
object
extractor
enum<string>

The extractor to be executed. Extracts various resources from the corresponding datasources.

Available options:
invoice,
monthly_tax_return,
annual_tax_return,
rif_tax_return,
tax_status,
tax_retention,
tax_compliance,
electronic_accounting,
rpc,
buro_de_credito_report,
bil,
rug
options
object

The extractor options. Check the available options for each extractor in Extractions.

Example:
{
"types": ["I", "E", "P"],
"period": {
"from": "2020-01-01T00:00:00.000Z",
"to": "2020-03-31T23:59:59.000Z"
}
}
status
enum<string>
Available options:
pending,
running,
finished,
failed,
stopping,
stopped
startedAt
string<date-time> | null

Time when the status changed from pending to running

finishedAt
string<date-time> | null

Time when the status changed from running to finished or failed

rateLimitedAt
string<date-time>

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

Example:

"2019-01-03T21:10:40.000Z"

errorCode
enum<string> | null
Available options:
invalid_credentials,
login_failed,
unrecoverable,
sat_unavailable,
internal_error,
undefined
Example:

null

createdDataPoints
integer

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.

Example:

3

updatedDataPoints
integer

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.

Example:

2

createdAt
string

Date and time the resource was created

Example:

"2020-01-01T12:15:00.000Z"

updatedAt
string

Date and time the resource was last updated

Example:

"2020-01-01T12:15:00.000Z"