v2.0

API Documentation

Everything you need to integrate with OVO

Base URL

https://api.ovo.am/v2/

Authorization

Вы аутентифицируетесь в OVO API, предоставляя один из ваших секретных ключей (Secret Key) в заголовке запроса. Управлять ключами можно в Панели управления.

Передавайте ключ в заголовке Authorization используя схему Bearer:

cURL
curl https://api.ovo.am/v2/products \
-H "Authorization: Bearer sk_live_your_secret_key"
Keep your API keys secret
GET

/v2/products

Get a list of products

Query Parameters

Parameter Description
limit
integer, optional
Results per page 10. Maximum value 100.
category_id
string, optional
Category ID
in_stock
boolean, optional
If true, product is in stock true, Set stock to 1
const ovo = require('@ovo/sdk')('sk_live_...');

const products = await ovo.products.list({
limit: 3,
in_stock: true
});

/* Возвращает:
{
"object": "list",
"data": [
{ "id": "prod_1", "name": "Hoodie", "price": 8900 ... },
...
],
"has_more": true
}
*/
POST

/v2/products

Create a new product

Body Parameters

Parameter Description
name *
string, required
Product name
price *
integer, required
Product price in the smallest currency unit (e.g., cents). 1000 = $10.00.
currency *
string, required
Three-letter ISO currency code (e.g., usd, eur). usd, eur).
stock_quantity
integer, optional
Stock quantity. Default is 0. 0.
const product = await ovo.products.create({
name: 'T-Shirt Base',
price: 2500,
currency: 'usd',
stock_quantity: 100
});