Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 974 Bytes

Shop.md

File metadata and controls

43 lines (34 loc) · 974 Bytes

Shop client

Client initialization

To see example of initialization, please look at Implementation part of our README

Get list of all shops

Method returns ShopIterator containing Shop entity.

use MpApiClient\Common\Interfaces\ShopClientInterface;

/** @var ShopClientInterface $shopClient */
$shops = $shopClient->list();
echo json_encode($shops, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);

Example above prints out

[
  {
    "shopId": "SK10MA",
    "countryId": "SK",
    "name": "Mall.sk",
    "currencyIso": "EUR",
    "currencySymbol": "",
    "url": "https:\/\/mpapi.mall.sk"
  },
  {
    "shopId": "CZ10MA",
    "countryId": "CZ",
    "name": "Mall.cz",
    "currencyIso": "CZK",
    "currencySymbol": "",
    "url": "https:\/\/mpapi.mall.cz"
  },
  ...
]

See more examples here