Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 819 Bytes

File metadata and controls

36 lines (27 loc) · 819 Bytes

TaricCode client

Client initialization

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

Get list of all CN (Combined Nomenclature) codes

Method returns TaricCodeIterator containing TaricCode entity.

use MpApiClient\Common\Interfaces\TaricCodeClientInterface;

/** @var TaricCodeClientInterface $taricCodeClient */
$taricCodes = $taricCodeClient->list();
echo json_encode($taricCodes, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);

Example above prints out

[
  {
    "id": "43031010"
  },
  {
    "id": "43031090"
  },
  {
    "id": "43039000"
  },
  ...
]

See more examples here