All URIs are relative to https://api-seguridad.sunat.gob.pe/v1, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| consultarEnvio() | POST /contribuyente/gem/comprobantes/envios/{numTicket} | Permite realizar la consulta del envío realizado |
| enviarCpe() | POST /contribuyente/gem/comprobantes/{filename} | Permite realizar el envio del comprobante |
consultarEnvio()consultarEnvio($num_ticket): \Greenter\Sunat\GRE\Model\StatusResponse
Permite realizar la consulta del envío realizado
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Greenter\Sunat\GRE\Api\CpeApi(
// 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()
);
$num_ticket = 'num_ticket_example'; // string | Número de ticket (UUID) generado por el envío realizado
try {
$result = $apiInstance->consultarEnvio($num_ticket);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CpeApi->consultarEnvio: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| num_ticket | string | Número de ticket (UUID) generado por el envío realizado |
\Greenter\Sunat\GRE\Model\StatusResponse
No authorization required
application/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
enviarCpe()enviarCpe($filename, $cpe_document): \Greenter\Sunat\GRE\Model\CpeResponse
Permite realizar el envio del comprobante
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: sunat_auth
$config = Greenter\Sunat\GRE\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Greenter\Sunat\GRE\Api\CpeApi(
// 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(),
$config
);
$filename = 'filename_example'; // string | Nombre del archivo sin extension
$cpe_document = new \Greenter\Sunat\GRE\Model\CpeDocument(); // \Greenter\Sunat\GRE\Model\CpeDocument
try {
$result = $apiInstance->enviarCpe($filename, $cpe_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CpeApi->enviarCpe: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| filename | string | Nombre del archivo sin extension | |
| cpe_document | \Greenter\Sunat\GRE\Model\CpeDocument | [optional] |
\Greenter\Sunat\GRE\Model\CpeResponse
application/jsonapplication/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
How can I help you explore Laravel packages today?