Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Gre Api Laravel Package

greenter/gre-api

View on GitHub
Deep Wiki
Context7

Greenter\Sunat\GRE\CpeApi

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

Example

<?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;
}

Parameters

Name Type Description Notes
num_ticket string Número de ticket (UUID) generado por el envío realizado

Return type

\Greenter\Sunat\GRE\Model\StatusResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: 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

Example

<?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;
}

Parameters

Name Type Description Notes
filename string Nombre del archivo sin extension
cpe_document \Greenter\Sunat\GRE\Model\CpeDocument [optional]

Return type

\Greenter\Sunat\GRE\Model\CpeResponse

Authorization

sunat_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours