Skip to content

josefo727/vtex-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library in development

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();
}