marketplace
POST /v1/marketplace/purchases/{sale_id}/accept
Accept delivery — the act that releases the seller's money.
Аутентификация
Передайте API-ключ в качестве маркера носителя (bearer token). Эта конечная точка не указывает конкретное разрешение в спецификации, поэтому предоставьте своему ключу минимум необходимых прав и проверьте ответ, вместо того чтобы делать предположения.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X POST https://api.zinndigital.com/v1/marketplace/purchases/{sale_id}/accept \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
docs/82 §3. The buyer's **explicit act**, and it is FINAL: it ends the refund window and releases the vendor's payout. The warning belongs on the client, before the button is pressed — an endpoint cannot warn anybody. Answers **200** on a replay as well as on the first call. The buyer's click and the auto-accept timer genuinely race, so acceptance converges rather than raising: a retried request from a client that already succeeded is not an error to that client, and the payable is released exactly once regardless. Scoped to the BUYER's org. A seller reaching for their own sale here gets a 404 — acceptance is the buyer's act alone, and a vendor who could press it would be paying themselves.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
sale_id (path) | string | Да | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
state | MarketplaceSaleState | Да | Where one purchased package is in its life (docs/82 §3). The terminal state is `accepted`, not `delivered`: delivery is the vendor's claim, acceptance is the buyer's act, and it… |
listing_id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
listing_title | string | Да | — |
package_name | string | Да | — |
package_description | string | Нет | — |
vendor_display_name | string | Нет | The seller's public name, never the legal name held for identity checks. |
delivery_days | integer | Нет | — |
revisions_included | integer | Нет | — |
revision_count | integer | Нет | — |
billing_mode | MarketplaceBillingMode | Нет | How an offer is charged (docs/82 §2a). A property of the OFFER, chosen by the seller from what the listing type permits — a $200 one-off audit and $150/month of link building si… |
billing_interval | object | Нет | — |
period_index | integer | Нет | 0 for a one-time sale and a subscription's first period; one per renewal. |
amount_minor | integer | Да | — |
currency | CurrencyCode | Да | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
auto_accepts | boolean | Нет | Read this BEFORE `accept_by`. A null `accept_by` means two completely different things — not delivered yet, or this type never auto-accepts at all (an asset sale releasing on a… |
auto_accept_days | object | Нет | — |
accept_by | object | Нет | When this purchase auto-accepts if the buyer does nothing. |
delivered_at | object | Нет | — |
accepted_at | object | Нет | — |
accepted_automatically | boolean | Нет | Whether the timer accepted this rather than the buyer. It does NOT change the outcome — auto-accept has the same finality as the button, which is why the buyer must be warned be… |
last_revision_reason | string | Нет | — |
last_revision_at | object | Нет | — |
order_id | Uuid | Нет | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
created_at | string | Нет | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 404 · 422