lamoda/crpt-ismp-api-client

Client for CRPT ISMP system

2.23 2022-04-11 15:50 UTC

README

Build Status Scrutinizer Code Quality Code Coverage Build Status Build Status

Installation

Composer

composer require lamoda/crpt-ismp-api-client

Description

This library implements API client for the Labeling and Traceability Information System (or "Информационная система маркировки и прослеживаемости" in Russian, ISMP) of the CRPT (https://markirovka.crpt.ru)

Library implements V3 and V4 version of ISMP Api's

Currently this client implements just a subset of the ISMP Api methods.

Usage

<?php

use GuzzleHttp\Client;
use Lamoda\IsmpClient\Impl\Serializer\SymfonySerializerAdapterFactory;
use Lamoda\IsmpClient\V3\IsmpApi;

$client = new Client([
    // Uri to your OMS
    'base_uri' => 'http://ismp_uri',
    'timeout'  => 2.0,
]);

$serializer = SymfonySerializerAdapterFactory::create();

$api = new IsmpApi($client, $serializer);

// Call api methods...