Create and validate a SAT credential
Create a SAT credential with Create a credential. After the credential is submitted, use one of these approaches to track validation:- Create a webhook endpoint with Create a webhook endpoint and listen for
credential.updatedevents. - Poll Retrieve a credential until the credential reaches a final status.
| Status | Description |
|---|---|
waiting | Credential validation is temporarily disabled, usually because of an ongoing incident. The credential is validated later. |
pending | Credential validation has been requested and is waiting to be processed. |
valid | The credential was accepted by SAT and can be used for extractions. |
invalid | SAT rejected the credential during validation. |
disabled | SAT reported the credential as disabled or otherwise unrecoverable during validation. |
deactivated | Deprecated. Legacy status retained for existing records. Use disabled for credentials that can no longer be used. |
error | Credential validation failed because of an unexpected error. |
statusReason object with a more specific reason for the status. For example, an error credential can include statusReason.type: "unsupportedPortableEfirma" when SAT requires the portable e.firma dynamic-code flow, which Syntage does not support for credential registration.
When a SAT credential becomes valid, Syntage creates the related entity if it does not already exist.
Extract data
After the entity and credential are available, you can request data extraction. Extractions are jobs that retrieve data from a datasource, such as SAT invoices, tax returns, tax status, tax compliance checks, and other supported records. You can create an extraction directly with Create an extraction. Schedulers can also create recurring or first-time extractions when configured for your organization. All extractions start with apending status while they wait in the queue. When processing starts, the status changes to running. You can retrieve the current status with Retrieve an extraction.
You can create webhook endpoints for extraction events and receive notifications when extractions are created or updated.
After an extraction finishes, use the relevant API reference pages to retrieve the extracted records, reports, insights, or files.