brandlive/vtex-api

Package for integration projects, API requests to Vtex.

1.0.2 2024-08-15 15:41 UTC

This package is auto-updated.

Last update: 2024-10-15 15:57:26 UTC


README

Install SDK

composer require brandlive/vtex-api

Create a Catalog Client

$catalogClient = new \Vtex\Catalog\CatalogClient([
    'credentials' => [
        'accountName' => "account name",
        'environment' => "environment",
        'appKey' => 'app key',
        'appToken' => 'app token',
    ]
]);

try {
    /**
     * Argument Options:
     * pathParams
     * queryParams
     * body
    */
    $catalogClient->getAttachment([
        'pathParams' => [
            'attachmentid' => 1
        ]
    ]);
} catch (\Vtex\Exception\VtexException $vtexException) {
    echo $vtexException->getMessage();
}