The OpenAPI Specification
The OpenAPI specification for store-to-Market requests is available on GitHub. You can use it to simplify and speed up integration development.
How to generate a Yandex.Market API client for sellers
The specification will help you generate client files in any language or framework that the OpenAPI generator supports. This can greatly simplify integration with Yandex.Market via the API.
Get the specification via git
There are two ways:
- Run the command
git clone https://github.com/yandex-market/yandex-market-partner-api.git
- Download the archive from the repository via GitHub web-ui: click the green button in the upper-right corner
Code
and in the drop-down list, selectDownload ZIP
.
Installing the OpenAPI generator via package managers
Generator Documentation: https://openapi-generator.tech/docs/installation
For npm (any OS)
npm install @openapitools/openapi-generator-cli -g
For Homebrew (macOS)
brew install openapi-generator
For Scoop (Windows)
scoop install openapi-generator-cli
Customer Generation
For npm (any OS)
npx @openapitools/openapi-generator-cli generate -i <path_to_openapi.yaml> -g <lang> -o <output_path>
For other package managers
openapi-generator generate -i <path_to_openapi.yaml> -g <lang> -o <output_path>
The values of the query parts:
<lang>
— generator parameter for the selected language or framework.
<output_path>
— the output directory where the generated client code will be placed.
<path_to_openapi.yaml>
— the path to the openapi.yaml file of this specification.
Examples of generators:
- go
- java
- javascript
- kotlin
- php
- python
- ruby
The full list of generators is available at the link: https://openapi-generator.tech/docs/generators