Extractions

Extractions are tasks to retrieve data (e.g. invoices, tax returns, tax status, etc.) from various datasources such as the SAT, Buró de Crédito, etc.

Note

Options containing a period (.) in the name like period.from are a way to denote object paths. For example, period.from should actually be sent as

{
  "options": {
    "period": {
      "from": "2020-01-01",
      "to": "2020-12-31"
    }
  }
}

Extraction extractors

The following extractors are currently available:

invoice

Extracts issued and received Invoices, including the CFDI files.

You can customize the extraction by using the following options:

Option

Description

Type

Default Value

types

Filter by invoice type

array

['I','E','P','N','T']

period.from

Filter by issuing date (greater than)

string

2014-01-01

period.to

Filter by issuing date (less than)

string

now

issued

Include invoices issued by the taxpayer

bool

true

received

Include invoices received by the taxpayer

bool

true

xml

Include the invoice CFDI XML file

bool

true

pdf

Include the invoice CFDI PDF file

bool

true

complement

Filter by complement

int

-

1

annual_tax_return

Extracts Annual Tax Returns, including the PDF files and payment data.

You can customize the extraction by using the following options:

OptionDescriptionTypeDefault Value
period.fromFilter by filing date (greater than)string2014-01-01
period.toFilter by filing date (less than)stringnow

monthly_tax_return

Extracts Provisional Tax Returns, including the PDF files and payment data.

You can customize the extraction by using the following options:

OptionDescriptionTypeDefault Value
period.fromFilter by filing date (greater than)string2014-01-01
period.toFilter by filing date (less than)stringnow

electronic_accounting

Extracts Trial Balance and Account Catalogs.

You can customize the extraction by using the following options:

OptionDescriptionTypeDefault Value
period.fromFilter by filing date (greater than)string2014-01-01
period.toFilter by filing date (less than)stringnow

rif_tax_return

Extracts Tax Incorporation Regime (RIF) Tax Returns which only applies for a person, including the PDF files and payment data.

You can customize the extraction by using the following options:

OptionDescriptionTypeDefault Value
period.fromFilter by filing date (greater than)string2014-01-01
period.toFilter by filing date (less than)stringnow

tax_status

Extracts the Tax Status.

No options available.

tax_compliance

Extracts the Tax Compliance Check.

No options available.

rpc

Extracts the RPC data.

No options available.

tax_retention

Extracts issued and received Tax Retention, including the CFDI files.

You can customize the extraction by using the following options:

Option

Description

Type

Default Value

period.from

Filter by issuing date (greater than)

string

2014-01-01

period.to

Filter by issuing date (less than)

string

now

issued

Include tax retentions issued by the taxpayer

bool

true

received

Include tax retentions received by the taxpayer

bool

true

xml

Include the tax retention CFDI XML file

bool

true

pdf

Include the tax retention CFDI PDF file

bool

true

complement

Filter by complement

int

-

1

buro_de_credito_report

Extracts a report from Buró de Crédito including PDFs.

You can customize the extraction by using the following options:

OptionDescriptionTypeDefault Value
productTypeThe Buró de Crédito product type (e.g. INFORME_BURO, 007, RCO)string007 (person / PDF), INFORME_BURO (company / PM)

bil

Extracts report from Buró de Investigaciones Legales.

No options available.

Extraction status

StatusDescription
pendingThe initial extraction status. The extraction is enqueued and waiting to be processed.
waitingThe extraction does not meet the requirements to begin.
runningThe extraction process started and is currently running. The running time varies depending on the extractor type and the entity's transactional volume. You may find partial data available in our API endpoints during this time.
finishedThe extraction finished successfully. All data is available to be retrieved from our API endpoints.
failedThe extraction couldn't start or failed during the process. Our internal retry policies weren't able to finish the extraction successfully. We may have partial data available in our API endpoints, but new extractions should be created to ensure all the entity's data is available. You can check the extraction error code to understand why it failed and determine whether it can be retried or not.
stoppingThe extraction was requested to be stopped by the user. It is in the process of being stopped.
stoppedThe extraction was stopped by the user after it started running. This extraction is included in billing.
cancelledThe extraction was stopped by the user before it started running. This extraction is not included in billing.

Extraction error codes

CodeDescriptionRetryable
invalid_credentialsThe taxpayer Credential is no longer valid.No
login_failedWe couldn't log in the taxpayer account.Yes
unrecoverableThe extraction process failed many times, and we reached a maximum number of retries.Yes
sat_unavailableWe detected that SAT itself is down or unresponsive.Yes
internal_errorWe detected an internal error in our own infrastructure.Yes
undefinedWe couldn't determine the error cause and our internal team will investigate it.Yes