curl --request POST \
--url https://api.anysite.io/api/onlinetrade/products \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"item_id": "<string>",
"timeout": 300,
"city": "Москва"
}
'import requests
url = "https://api.anysite.io/api/onlinetrade/products"
payload = {
"item_id": "<string>",
"timeout": 300,
"city": "Москва"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({item_id: '<string>', timeout: 300, city: 'Москва'})
};
fetch('https://api.anysite.io/api/onlinetrade/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/onlinetrade/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'item_id' => '<string>',
'timeout' => 300,
'city' => 'Москва'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/onlinetrade/products"
payload := strings.NewReader("{\n \"item_id\": \"<string>\",\n \"timeout\": 300,\n \"city\": \"Москва\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/onlinetrade/products")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": \"<string>\",\n \"timeout\": 300,\n \"city\": \"Москва\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/onlinetrade/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"item_id\": \"<string>\",\n \"timeout\": 300,\n \"city\": \"Москва\"\n}"
response = http.request(request)
puts response.read_body[
{
"item_id": "<string>",
"@type": "OnlinetradeProduct",
"model_id": "<string>",
"name": "<string>",
"url": "<string>",
"brand": "<string>",
"mpn": "<string>",
"price": 123,
"old_price": 123,
"currency": "<string>",
"discount_percent": 123,
"badges": [],
"price_valid_until": "<string>",
"bonus": 123,
"availability": "<string>",
"availability_note": "<string>",
"condition": "<string>",
"warranty": "<string>",
"rating": 123,
"rating_count": 123,
"image": "<string>",
"images": [],
"highlights": [],
"specs": [],
"category_id": 123,
"breadcrumbs": [],
"modifications": [],
"delivery_options": [],
"pickup_points": [],
"top_review": "<string>",
"listed_at": "<string>",
"city": "<string>",
"city_id": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/onlinetrade/products
Return one ONLINE TRADE.RU (onlinetrade.ru) product for a named Russian city by its numeric product id or product URL: name, brand, manufacturer code, current and pre-discount price in roubles with the discount percentage, the ON-bonus amount, stock state and stock note, warranty term, the full specification sheet, the headline specifications, the marketing description, product images, the category breadcrumb trail with category ids, the colour and memory variants of the same model, and the delivery options with their dates and costs for that city.
Price: 1 credit
⚠️ Common errors: 412: No onlinetrade product resolves from this id, or onlinetrade did not serve the product page, 422: The city is not one onlinetrade prices in, or item_id is neither a numeric id nor a product URL
curl --request POST \
--url https://api.anysite.io/api/onlinetrade/products \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"item_id": "<string>",
"timeout": 300,
"city": "Москва"
}
'import requests
url = "https://api.anysite.io/api/onlinetrade/products"
payload = {
"item_id": "<string>",
"timeout": 300,
"city": "Москва"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({item_id: '<string>', timeout: 300, city: 'Москва'})
};
fetch('https://api.anysite.io/api/onlinetrade/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/onlinetrade/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'item_id' => '<string>',
'timeout' => 300,
'city' => 'Москва'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/onlinetrade/products"
payload := strings.NewReader("{\n \"item_id\": \"<string>\",\n \"timeout\": 300,\n \"city\": \"Москва\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/onlinetrade/products")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": \"<string>\",\n \"timeout\": 300,\n \"city\": \"Москва\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/onlinetrade/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"item_id\": \"<string>\",\n \"timeout\": 300,\n \"city\": \"Москва\"\n}"
response = http.request(request)
puts response.read_body[
{
"item_id": "<string>",
"@type": "OnlinetradeProduct",
"model_id": "<string>",
"name": "<string>",
"url": "<string>",
"brand": "<string>",
"mpn": "<string>",
"price": 123,
"old_price": 123,
"currency": "<string>",
"discount_percent": 123,
"badges": [],
"price_valid_until": "<string>",
"bonus": 123,
"availability": "<string>",
"availability_note": "<string>",
"condition": "<string>",
"warranty": "<string>",
"rating": 123,
"rating_count": 123,
"image": "<string>",
"images": [],
"highlights": [],
"specs": [],
"category_id": 123,
"breadcrumbs": [],
"modifications": [],
"delivery_options": [],
"pickup_points": [],
"top_review": "<string>",
"listed_at": "<string>",
"city": "<string>",
"city_id": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes