API for electronic invoicing in Ecuador. Generate, sign, and send invoices to SRI.
For more information, please visit https://ecuapi.com.
PHP 8.1 and later.
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}Then run composer install
Download the files and include autoload.php:
<?php
require_once('/path/to/ecuapi-sdk-php/vendor/autoload.php');Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new EcuaapiSdk\Api\CertificatesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
try {
$result = $apiInstance->listCertificates();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CertificatesApi->listCertificates: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to https://api.ecuapi.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CertificatesApi | listCertificates | GET /v1/certificates | List certificates |
| CertificatesApi | uploadCertificate | POST /v1/certificates/upload | Upload P12 certificate |
| HealthApi | getApiInfo | GET /health | Basic health check |
| HealthApi | getApiInfo_0 | GET /v1/health | Basic health check |
| HealthApi | getDetailedHealth | GET /health/health | Detailed health check |
| HealthApi | getDetailedHealth_0 | GET /v1/health/health | Detailed health check |
| InvoicesApi | authorizeInvoice | POST /v1/invoices/{id}/authorize | Authorize invoice |
| InvoicesApi | createInvoice | POST /v1/invoices | Create invoice |
| InvoicesApi | getInvoice | GET /v1/invoices/{id} | Get invoice by ID |
| InvoicesApi | getInvoicePdf | GET /v1/invoices/{id}/pdf | Download RIDE PDF |
| InvoicesApi | getInvoiceXml | GET /v1/invoices/{id}/xml | Download signed XML |
| InvoicesApi | listInvoices | GET /v1/invoices | List invoices |
| InvoicesApi | sendInvoice | POST /v1/invoices/{id}/send | Send invoice to SRI |
| InvoicesApi | voidInvoice | DELETE /v1/invoices/{id} | Void invoice |
- AuthorizeInvoiceResponse
- AuthorizeInvoiceResponseData
- Certificate
- CertificateError
- CertificateErrorError
- CertificateListResponse
- CertificateUploadResponse
- CertificateUploadResponseData
- CertificateUploadResponseMeta
- CreateInvoiceRequest
- CreateInvoiceResponse
- CreateInvoiceResponseData
- Customer
- Error
- ErrorError
- HealthResponse
- HealthResponseChecks
- Invoice
- InvoiceDetailResponse
- InvoiceItem
- InvoiceListResponse
- Meta
- SendInvoiceResponse
- SendInvoiceResponseData
Endpoints do not require authorization.
To run the tests, use:
composer install
vendor/bin/phpunitThis PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0- Generator version:
7.18.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen