marketplace
PATCH /v1/marketplace/listings/{listing_id}
Edit a Zinn®, or publish it.
Аутентификация
Передайте API-ключ в качестве маркера носителя (bearer token). Эта конечная точка не указывает конкретное разрешение в спецификации, поэтому предоставьте своему ключу минимум необходимых прав и проверьте ответ, вместо того чтобы делать предположения.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X PATCH https://api.zinndigital.com/v1/marketplace/listings/{listing_id} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
`publish: true` validates every value against the stamped schema version, requires at least one package, recomputes the price cache and takes the listing live — in one transaction, because a listing that went live with a stale price sorts wrongly on every storefront page and quotes a price nobody agreed to, and nothing raises. ⛔ A live Zinn®'s `slug` is permanent: it is the public URL, and changing it breaks every link to it and loses the ranking that link earned. ⛔ A `domain` value is stored in the reveal table, never in `field_values` — the storefront's read path cannot leak what it cannot see (docs/83 §3).
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
listing_id (path) | string | Да | — |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
inclusion_items | object[] | Нет | The handover checklist a buyer confirms receipt of, for an asset-transfer listing (a website, a domain, a Shopify store). The seller composes it; the listing type's `handover_te… |
title | string | Нет | — |
summary | string | Нет | — |
slug | string | Нет | — |
field_values | object | Нет | Plain `{key: value}` — the envelope is added by the engine. |
publish | boolean | Нет | Validate against the stamped schema, require a package, recompute the price cache and go live — in one transaction. |
state | string<live, paused, archived> | Нет | Take a Zinn® off sale, put it back, or retire it. Applied AFTER any value edit in the same request, so the storefront projection is rebuilt once from the state the listing actua… |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | string | Да | — |
vendor_id | string | Да | — |
marketplace_id | string | Да | — |
marketplace_key | string | Да | — |
category_id | string | Нет | — |
listing_type_id | string | Да | — |
listing_type_key | string | Да | — |
schema_version | integer | Да | The version this listing's values were authored against. Stamped once, never moved — a later schema must not reinterpret an older listing. |
title | string | Да | — |
slug | string | Да | Permanent once live. It is the public URL. |
summary | string | Да | — |
field_values | object | Да | "`{key: {v, ver}}`" — uniform two keys, `ver: null` for a seller-declared value, so no consumer branches on key presence. ⛔ A `domain` value is NOT here — it is in the reveal ta… |
field_schema | MarketplaceFieldDefinition[] | Нет | Present on the detail read; the schema THIS listing is authored against. |
state | MarketplaceListingState | Да | ⛔ `archived`, never deleted. A listing that sold has public URLs, backlinks and an order behind it, and a 404 costs rankings that do not come back. |
price_minor | integer | Да | — |
price_max_minor | integer | Да | — |
currency | string | Да | — |
published_at | string | Нет | — |
packages | MarketplacePackage[] | Да | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 404 · 422