{"id":46130893,"url":"https://github.com/gam6itko/ozon-seller","last_synced_at":"2026-03-02T03:35:50.319Z","repository":{"id":34863843,"uuid":"162719338","full_name":"gam6itko/ozon-seller","owner":"gam6itko","description":"PHP client for Ozon Seller API","archived":false,"fork":false,"pushed_at":"2025-11-24T10:00:37.000Z","size":456,"stargazers_count":88,"open_issues_count":0,"forks_count":45,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-11-27T14:11:30.782Z","etag":null,"topics":["ozon","ozon-api","ozon-marketplace","ozon-seller","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gam6itko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-21T13:48:32.000Z","updated_at":"2025-11-24T15:45:12.000Z","dependencies_parsed_at":"2024-03-26T10:45:34.491Z","dependency_job_id":"da13cfa2-16a2-4cf5-8b67-3691961a3595","html_url":"https://github.com/gam6itko/ozon-seller","commit_stats":{"total_commits":265,"total_committers":12,"mean_commits":"22.083333333333332","dds":0.07547169811320753,"last_synced_commit":"fde98c6b0ab3f860f1e4ae217209b2ebd1c77153"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"purl":"pkg:github/gam6itko/ozon-seller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gam6itko%2Fozon-seller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gam6itko%2Fozon-seller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gam6itko%2Fozon-seller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gam6itko%2Fozon-seller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gam6itko","download_url":"https://codeload.github.com/gam6itko/ozon-seller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gam6itko%2Fozon-seller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ozon","ozon-api","ozon-marketplace","ozon-seller","php"],"created_at":"2026-03-02T03:35:49.786Z","updated_at":"2026-03-02T03:35:50.314Z","avatar_url":"https://github.com/gam6itko.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ozon-seller API client\n[![tests](https://github.com/gam6itko/ozon-seller/actions/workflows/tests.yaml/badge.svg)](https://github.com/gam6itko/ozon-seller/actions/workflows/tests.yaml)\n[![Coverage Status](https://coveralls.io/repos/github/gam6itko/ozon-seller/badge.svg?branch=master)](https://coveralls.io/github/gam6itko/ozon-seller?branch=master)\n\n[![Latest Stable Version](https://poser.pugx.org/gam6itko/ozon-seller/v)](//packagist.org/packages/gam6itko/ozon-seller) \n[![Total Downloads](https://poser.pugx.org/gam6itko/ozon-seller/downloads)](//packagist.org/packages/gam6itko/ozon-seller) \n[![Latest Unstable Version](https://poser.pugx.org/gam6itko/ozon-seller/v/unstable)](//packagist.org/packages/gam6itko/ozon-seller) \n[![License](https://poser.pugx.org/gam6itko/ozon-seller/license)](//packagist.org/packages/gam6itko/ozon-seller)\n\n## Документация Ozon Api \n\n\u003chttps://docs.ozon.ru/api/seller\u003e \n\n\n## Установка\n\n```shell\ncomposer require gam6itko/ozon-seller\n```\n\nДля взаимодействия библиотеки с Ozon-Api нужно дополнительно установить реализации [PSR-18: HTTP Client](https://packagist.org/providers/psr/http-client-implementation) и [PSR-17: HTTP Factories](https://packagist.org/providers/psr/http-factory-implementation).\n\n### Использование с Symfony\nhttps://symfony.com/doc/current/components/http_client.html#psr-18-and-psr-17\n\n```shell\ncomposer require symfony/http-client\ncomposer require nyholm/psr7\n```\n\n```php\nuse Gam6itko\\OzonSeller\\Service\\V1\\ProductService;\nuse Symfony\\Component\\HttpClient\\Psr18Client;\n\n$config = [$_SERVER['CLIENT_ID'], $_SERVER['API_KEY'], $_SERVER['API_URL']];\n$client = new Psr18Client();\n$svc = new ProductService($config, $client);\n//do stuff\n```\n\n### Использование без Symfony\n\n```shell\ncomposer require php-http/guzzle6-adapter\n```\n\n```php\nuse Gam6itko\\OzonSeller\\Service\\V1\\CategoriesService;\nuse GuzzleHttp\\Client as GuzzleClient;\nuse Http\\Adapter\\Guzzle6\\Client as GuzzleAdapter;\nuse Http\\Factory\\Guzzle\\RequestFactory;\nuse Http\\Factory\\Guzzle\\StreamFactory;\n\n$config = [\n    'clientId' =\u003e '\u003cozon seller client-id\u003e',\n    'apiKey' =\u003e '\u003cozon seller api-key\u003e',\n    'host' =\u003e 'http://cb-api.ozonru.me/'\n];\n$client = new GuzzleAdapter(new GuzzleClient());\n$requestFactory = new RequestFactory();\n$streamFactory = new StreamFactory();\n\n$svc = new CategoriesService($config, $client, $requestFactory, $streamFactory);\n//do stuff\n```\n\n## Реализованные методы\n\nЧтобы узнать какой класс и метод реализуют запрос на нужный URL воспользуйтесь скриптом `bin/is_realized.php`\n\n```shell script\nphp bin/is_realized.php | grep /v2/posting/fbs/get\n```\noutput\n```shell script\n/v2/posting/fbs/get: Gam6itko\\OzonSeller\\Service\\V2\\Posting\\FbsService::get\n/v2/posting/fbs/get-by-barcode: NotRealized\n```\n\nАвтор не всегда успевает добавлять реализации новых методов.\nЕсли нужного вам метода нет в библиотеке, то не стесняйтесь открыть issue или PR.\n\n## Примеры использования\nБольше примеров смотрите в папке `tests/Service/`\n\n### Categories\n\n```php\nuse Gam6itko\\OzonSeller\\Service\\V1\\CategoriesService;\nuse GuzzleHttp\\Client as GuzzleClient;\nuse Http\\Adapter\\Guzzle6\\Client as GuzzleAdapter;\n\n$config = [\n    'clientId' =\u003e '\u003cozon seller client-id\u003e',\n    'apiKey' =\u003e '\u003cozon seller api-key\u003e',\n    'host' =\u003e 'http://cb-api.ozonru.me/' //sandbox\n];\n$adapter = new GuzzleAdapter(new GuzzleClient());\n$svc = new CategoriesService($config, $adapter);\n\n//Server Response example: https://cb-api.ozonru.me/apiref/en/#t-title_categories\n$categoryTree = $svc-\u003etree();\n\n//Server Response example: https://cb-api.ozonru.me/apiref/en/#t-title_get_categories_attributes\n$attributes = $svc-\u003eattributes(17038826);\n```\n\n### Posting Crossborder\n\n#### get info \n\n`/v2/posting/crossborder/get`\n\n```php\nuse Gam6itko\\OzonSeller\\Service\\V2\\Posting\\CrossborderService;\nuse GuzzleHttp\\Client as GuzzleClient;\nuse Http\\Adapter\\Guzzle6\\Client as GuzzleAdapter;\n\n$config = [\n    'clientId' =\u003e '\u003cozon seller client-id\u003e',\n    'apiKey' =\u003e '\u003cozon seller api-key\u003e',\n    'host' =\u003e 'http://cb-api.ozonru.me/'\n];\n$adapter = new GuzzleAdapter(new GuzzleClient());\n$svc = new CrossborderService($config, $adapter);\n\n$postingNumber = '39268230-0002-3';\n$orderArr = $svc-\u003eget($postingNumber);\necho json_encode($orderArr);\n```\n\n```json\n{\n  \"result\": [\n    {\n      \"address\": {\n        \"address_tail\": \"г. Москва, ул. Центральная, 1\",\n        \"addressee\": \"Петров Иван Владимирович\",\n        \"city\": \"Москва\",\n        \"comment\": \"\",\n        \"country\": \"Россия\",\n        \"district\": \"\",\n        \"phone\": \"+7 495 123-45-67\",\n        \"region\": \"Москва\",\n        \"zip_code\": \"101000\"\n      },\n      \"auto_cancel_date\": \"2019-11-18T11:30:11.571Z\",\n      \"cancel_reason_id\": 76,\n      \"created_at\": \"2019-11-18T11:30:11.571Z\",\n      \"customer_email\": \"petrov@email.com\",\n      \"customer_id\": 60006,\n      \"in_process_at\": \"2019-11-18T11:30:11.571Z\",\n      \"order_id\": 77712345,\n      \"order_nr\": \"1111444\",\n      \"posting_number\": \"39268230-0002-3\",\n      \"products\": [\n        {\n          \"name\": \"Фитнес-браслет\",\n          \"offer_id\": \"DEP-1234\",\n          \"price\": \"1900.00\",\n          \"quantity\": 1,\n          \"sku\": 100056\n        }\n      ],\n      \"shipping_provider_id\": 0,\n      \"status\": \"awaiting_approve\",\n      \"tracking_number\": \"\"\n    }\n  ]\n}\n```\n\n### Products\n\n#### import\n\n`/v1/product/import`\n\n```php\nuse Gam6itko\\OzonSeller\\Service\\V1\\ProductService;\nuse GuzzleHttp\\Client as GuzzleClient;\nuse Http\\Adapter\\Guzzle6\\Client as GuzzleAdapter;\n\n$config = [\n    'clientId' =\u003e '\u003cozon seller client-id\u003e',\n    'apiKey' =\u003e '\u003cozon seller api-key\u003e',\n    // use prod host by default\n];\n$adapter = new GuzzleAdapter(new GuzzleClient());\n$svcProduct = new ProductService($config, $adapter);\n$product = [\n    'barcode'        =\u003e '8801643566784',\n    'description'    =\u003e 'Red Samsung Galaxy S9 with 512GB',\n    'category_id'    =\u003e 17030819,\n    'name'           =\u003e 'Samsung Galaxy S9',\n    'offer_id'       =\u003e 'REDSGS9-512',\n    'price'          =\u003e '79990',\n    'old_price'      =\u003e '89990',\n    'premium_price'  =\u003e '75555',\n    'vat'            =\u003e '0',\n    'vendor'         =\u003e 'Samsung',\n    'vendor_code'    =\u003e 'SM-G960UZPAXAA',\n    'height'         =\u003e 77,\n    'depth'          =\u003e 11,\n    'width'          =\u003e 120,\n    'dimension_unit' =\u003e 'mm',\n    'weight'         =\u003e 120,\n    'weight_unit'    =\u003e 'g',\n    'images'         =\u003e [\n        [\n            'file_name' =\u003e 'https://ozon-st.cdn.ngenix.net/multimedia/c1200/1022555115.jpg',\n            'default'   =\u003e true,\n        ],\n        [\n            'file_name' =\u003e 'https://ozon-st.cdn.ngenix.net/multimedia/c1200/1022555110.jpg',\n            'default'   =\u003e false,\n        ],\n        [\n            'file_name' =\u003e 'https://ozon-st.cdn.ngenix.net/multimedia/c1200/1022555111.jpg',\n            'default'   =\u003e false,\n        ],\n    ],\n    'attributes'     =\u003e [\n        [\n            'id'    =\u003e 8229,\n            'value' =\u003e '4747',\n        ],\n        [\n            'id'    =\u003e 9048,\n            'value' =\u003e 'Samsung Galaxy S9',\n        ],\n        [\n            'id'    =\u003e 4742,\n            'value' =\u003e '512 ГБ',\n        ],\n\n        [\n            'id'         =\u003e 4413,\n            'collection' =\u003e ['1', '2', '13'],\n        ],\n        [\n            'id'                 =\u003e 4018,\n            'complex_collection' =\u003e [\n                [\n                    'collection' =\u003e [\n                        [\n                            'id'    =\u003e 4068,\n                            'value' =\u003e 'Additional video',\n                        ],\n                        [\n                            'id'    =\u003e 4074,\n                            'value' =\u003e '5_-NKRVn7IQ',\n                        ],\n                    ],\n                ],\n                [\n                    'collection' =\u003e [\n                        [\n                            'id'    =\u003e 4068,\n                            'value' =\u003e 'Another one video',\n                        ],\n                        [\n                            'id'    =\u003e 4074,\n                            'value' =\u003e '5_-NKRVn7IQ',\n                        ],\n                    ],\n                ],\n            ],\n        ],\n    ],\n];\n\n$svcProduct-\u003eimport($product);\n// or\n$svcProduct-\u003eimport([$product, $product1, $product2, ...]);\n// or\n$res = $svcProduct-\u003eimport(['items' =\u003e [$product, $product1, $product2, ...] ]);\necho $res['task_id']; // save it for checking by `importInfo`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgam6itko%2Fozon-seller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgam6itko%2Fozon-seller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgam6itko%2Fozon-seller/lists"}