SRI Integration API
This API allows integration with the Internal Revenue Service (SRI) of Ecuador. It provides endpoints for:
- Verify credentials (RUC, additional identification, and password).
- Start extraction of electronic vouchers in the SRI.
- Check the extraction status of electronic vouchers.
Endpoints
1. Verify credentials in SRI
Summary
Verifies the credentials (RUC, additional identification, and password) in the SRI.
Description
Sends the RUC, additional identification (optional), and password to be used to access the SRI.
Input Parameters
| Parameter | Description | Type | Required | Example |
|---|---|---|---|---|
| ruc | Unique Taxpayer Registry | String | Yes | "0000000000000" |
| additionalIdentification | Additional identification (e.g., taxpayer's ID) | String | No | "0000000000" |
| password | Password to access the SRI | String | Yes | "S3cr3tP4ss!" |
Request Example
Responses
| Code | Description |
|---|---|
| 201 | Credentials successfully registered |
| 401 | Incorrect credentials or insufficient permissions |
In case of error (401), the response will include a JSON object with the descriptive message, for example:
or
2. Start voucher extraction in the SRI
Summary
Starts the extraction of electronic vouchers in the SRI, querying by RUC.
Description
Receives data to start the extraction of electronic vouchers in the SRI from a given RUC and date.
Input Parameters
| Parameter | Description | Type | Required | Example |
|---|---|---|---|---|
| ruc | Unique Taxpayer Registry | String | Yes | "9999999999001" |
| dateToAnalyze | Date to analyze (format YYYY-MM-DD) | String | Yes | "2024-01-01" |
| daysOfTolerance | Number of tolerance days for extraction (e.g., 15) | Integer | No | 15 |
Request Example
Responses
| Code | Description |
|---|---|
| 200 | Extraction started successfully |
If the data is already extracted, the response will be:
2. Check voucher extraction in the SRI
Summary Checks the extraction status of electronic vouchers in the SRI, querying by RUC.
Description Receives data to verify if the information of electronic vouchers in the SRI is being extracted (or has been extracted).
Input Parameters
| Parameter | Description | Type | Required | Example |
|---|---|---|---|---|
| ruc | Unique Taxpayer Registry | String | Yes | "9999999999001" |
| dateToAnalyze | Date to analyze (format YYYY-MM-DD) | String | Yes | "2024-01-01" |
| daysOfTolerance | Number of tolerance days for extraction (e.g., 15) | Integer | No | 15 |
Request Example
Responses
| Code | Description |
|---|---|
| 200 | Successful operation |
The response body will include a JSON object with the extraction status, for example:
Error Handling
In addition to the specific responses for each endpoint, the API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Errors will include a descriptive message in the response body, for example: