Please enable JS

Exemplos

Presquisar Categorias de Produtos

Código Fonte

<?php

require_once '../vendor/autoload.php';

use Swagger\Client\Api\ProductApi;
use Swagger\Client\ApiException;

// E2E ACCESS KEYS
$client = new GuzzleHttp\Client([
    'headers' => [
        'api_key' => 'JHSV2V6KyqcbxvMHshRlPfunJymVt7GDfXyoK229o=',
        'company_key' => 'E2ELIVE',
    ]
]);

try {
    
    // SEARCH PRODUCT CATEGORIES
    $api = new ProductApi($client);
    $result = $api->productCategoryList();
    
    header('Content-Type: application/json; charset=utf-8');
    echo $result->__toString();
    
} catch (Exception $e) {
    
    http_response_code($e->getCode());
    
    $msg = $e instanceof ApiException ? $e->getResponseBody() : $e->getMessage();
    
    if (!empty($msg)) {
        echo $msg;
    }
}