Перейти к содержимому

Открыть карточку товара

POST
/ex/public.goods.get
curl --request POST \
--url https://api.tride.ru/ex/public.goods.get \
--header 'Content-Type: application/json' \
--data '{ "key": "<ключ клуба>", "id": "000000000000000000000001" }'

Карточка товара: всё из списка плюс описание и все фото. Скрытый клиенту или снятый с витрины — not_found. Отправьте ключ внешней системы клуба в поле key на своём сервере. Порядок подключения.

Media typeapplication/json
object
key
required

Отправьте ключ внешней системы клуба в поле key на своём сервере.

string
club_id

Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)

string
locale

Язык ответа: ru (по умолчанию), en, fr

string
image_size

Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)

string
id
required

Идентификатор товара

string

Example

{
"key": "<ключ клуба>",
"id": "000000000000000000000001"
}

При ошибке сервер возвращает поле error.

Media typeapplication/json
Any of:
object
result
boolean
club

Клуб ответа

object
id
string | null
name
string | null
item
object
id
string | null
name
string | null
short_description
string | null
image

Картинка или null

object
fileid

Идентификатор файла медиа-сервера

string | null
url

Готовая ссылка нужного размера

string | null
category_ids
Array<string>
badges
object
hit
boolean
new
boolean
sale
boolean
bestseller
boolean
price

Цена для клиента (null, если клуб скрывает цены)

string | null
base_price

Цена без акции

string | null
price_kind

Base | sale | member

string | null
member_price_teaser

«Членам клуба — N», если клуб это показывает

string | null
currency
string | null
unit

Pcs | kg | l | …

string | null
has_variants
boolean
variants
Array<object>
object
id
string | null
value
string | null
price
string | null
stock_state
string | null
stock_left
integer | null
stock_state

In_stock | low | out | untracked

string | null
stock_left

Остаток, когда клуб показывает «осталось N»

integer | null
purchasable

Можно купить в приложении

boolean
not_purchasable_reason

Catalog | locked | marked | fractional | free | out_of_stock

string | null
access

Open — доступен всем; locked — с замком и причиной (имена сегментов не раскрываются)

object
state
string | null
reasons
Array<object>
object
type
string | null
text
string | null
url

Прямая ссылка на карточку товара в приложении клуба (club_id переключает клиента на клуб товара)

string | null
description
string | null
images
Array<object>
object
fileid

Идентификатор файла медиа-сервера

string | null
url

Готовая ссылка нужного размера

string | null

Example generated

{
"result": true,
"club": {
"id": "example",
"name": "example"
},
"item": {
"id": "example",
"name": "example",
"short_description": "example",
"image": {
"fileid": "example",
"url": "example"
},
"category_ids": [
"example"
],
"badges": {
"hit": true,
"new": true,
"sale": true,
"bestseller": true
},
"price": "example",
"base_price": "example",
"price_kind": "example",
"member_price_teaser": "example",
"currency": "example",
"unit": "example",
"has_variants": true,
"variants": [
{
"id": "example",
"value": "example",
"price": "example",
"stock_state": "example",
"stock_left": 1
}
],
"stock_state": "example",
"stock_left": 1,
"purchasable": true,
"not_purchasable_reason": "example",
"access": {
"state": "example",
"reasons": [
{
"type": "example",
"text": "example"
}
]
},
"url": "example",
"description": "example",
"images": [
{
"fileid": "example",
"url": "example"
}
]
}
}

Ограничение частоты запросов. Повторите после указанной задержки.

Media typeapplication/json
object
error
required

Код или текст ошибки.

string
field

Параметр запроса, если сервер указал его.

string
retry_after

Задержка до следующей попытки в секундах.

integer

Example

{
"error": "rate_limited",
"retry_after": 15
}
Retry-After
integer