POST /api/onlinetrade/products
Price: 1 credit
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.
The numeric id resolves on its own — the slug in a product URL is decorative, so a bare «Код товара» is enough and the URL form is only a convenience. Pass the id search returns as `item_id`; the other number onlinetrade prints, the one in its basket and compare links, belongs to a different id space and is answered with 412 rather than with a neighbouring product. `city` changes price, stock and delivery dates, and the record echoes the city it was priced in. `specs` is the full sheet and `highlights` the short list the site shows beside the price; read `specs` for anything the flat fields do not carry. `modifications` are the sibling colour and capacity variants, each with its own `item_id` to fetch.
access-token string requiredtimeout integer — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)item_id string required — Product id — the number onlinetrade prints as «Код товара», the number at the end of a product URL, or the product URL itself (examples: "5461220", "https://www.onlinetrade.ru/catalogue/smartfony-c13/huawei/smartfon_huawei_pura_90s_pro_12_256gb_belyy_51098yxm-5461220.html"; minLength: 1)city string — City the price, availability and delivery dates belong to, as a city name or as the numeric city id onlinetrade uses in its own ?c= parameter. The record echoes the city it was priced in (default: "Москва"; examples: "Москва", "Новосибирск", "60"; minLength: 1)@type string (default: "OnlinetradeProduct")item_id string requiredmodel_id string nullablename string nullableurl string nullablebrand string nullablempn string nullableprice integer nullableold_price integer nullablecurrency string nullablediscount_percent integer nullablebadges array (default: [])price_valid_until string nullablebonus integer nullableavailability string nullableavailability_note string nullablecondition string nullablewarranty string nullablerating number nullablerating_count integer nullableimage string nullableimages array (default: [])highlights array (default: [])@type string (default: "OnlinetradeSpec")label string requiredvalue string requiredspecs array (default: [])@type string (default: "OnlinetradeSpec")label string requiredvalue string requireddescription string nullablecategory_id integer nullablebreadcrumbs array (default: [])@type string (default: "OnlinetradeCategoryRef")name string requiredid integer nullableurl string nullablemodifications array (default: [])@type string (default: "OnlinetradeModification")item_id string requiredlabel string requiredselected boolean (default: false)delivery_options array (default: [])@type string (default: "OnlinetradeDeliveryOption")name string requireddate string nullablecost integer nullablepickup_points array (default: [])@type string (default: "OnlinetradePickupPoint")name string requiredaddress string nullableurl string nullabledate string nullablecost integer nullabletop_review string nullablelisted_at string nullablecity string nullablecity_id string nullable422 — The city is not one onlinetrade prices in, or item_id is neither a numeric id nor a product URL Check the fields against this schema. A URN with the wrong prefix is the most common cause.408 — The request ran past its time limit Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.412 — No onlinetrade product resolves from this id Retrying will not help: either the entity does not exist, or the input points at a different one.429 — Too many requests: a rate limit or a usage window is exhausted When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.500 — onlinetrade's anti-bot wall never served the product page within the retry and session-mint budget; the id is unrelated, retry the call Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.529 — Rate limit reached, or the endpoint is overloaded Wait at least 30 seconds, then retry.X-Error — Error message text (present only on error)X-Request-ID — Unique request identifierX-Execution-Time — Execution time in secondsX-Result-Count — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.X-Total-Available-Results — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.X-Warning — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.X-Retry-After — Seconds to wait before retrying. Present only on 429.