modig/shopware-admin-api-bundle

Shopware Admin API implementation

1.0.0 2022-08-02 13:08 UTC

This package is auto-updated.

Last update: 2025-06-09 15:06:12 UTC


README

A Symfony 5 bundle for Shopware 6 Admin API implementation

Examples

// make a request to get a token for the admin api
$requestMessageFactory = new RequestMessageFactory();
$requestMessage = $requestMessageFactory->createTokenMessage([
    'host' => 'http://example.com',
    'clientId' => 's0pwar3ApiKey',
    'clientSecret' => 'sh0pwar3SecreTKey'
]);

$client = new ShopwareAdminClient();
$responseMessage = $client->send($requestMessage);
// make a request to get the list of sales channels domains
$requestMessageFactory = new RequestMessageFactory();
$requestMessage = $requestMessageFactory->createListMessage([
    'host' => 'http://example.com',
    'token' => 'shopwareSeCretT0keN',
    'entity' => 'sales-channel-domain'
]);

$client = new ShopwareAdminClient();
$responseMessage = $client->send($requestMessage);