Workspace API

Oferty OTO

Endpointy „Oferty OTO” Zanfia Workspace API — ze schematami i przykładami kodu.

3 min czytaniaOstatnia aktualizacja: 26 lip 2026

Wielokrotnego użytku oferty jednorazowe po zakupie (OTO), pokazywane raz, na pełnym ekranie, między udaną płatnością a podziękowaniem: priceId odwołuje się do istniejącej ceny sprzedawanego produktu (twórcy zwykle dodają dedykowaną, obniżoną cenę dla OTO), a timerMinutes ustawia opcjonalny odliczany czas, liczony od pierwszego wyświetlenia. Te endpointy zarządzają wyłącznie dokumentami oferty — podpięcie jej do łańcucha koszyka odbywa się przez PATCH /checkouts/{checkoutId} (pole oto). Usunięcie oferty jest nieodwracalne; łańcuchy koszyków wciąż się do niej odwołujące zostają z krokiem donikąd, tak samo jak przy order bumpach. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.

Lista ofert OTO

GET/oto-offers

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/oto-offers"
{  "otoOffers": [    {      "id": "string",      "name": "string",      "productId": "string",      "productName": "string",      "priceId": "string",      "headline": "string",      "description": "string",      "acceptCtaText": "string",      "declineText": "string",      "timerMinutes": 0,      "media": [        {          "type": "image",          "url": "string",          "mediaId": "string",          "thumbnailUrl": "string"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ]}
{  "error": "string"}

Utwórz ofertę OTO

POST/oto-offers

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Reusable post-purchase one-time offer (workspaces/{wid}/oto-offers). Field set mirrors exactly what the checkout builder's OTO panel writes — see OtoOfferDocument. checkout.oto (the chain attachment) keeps going through UpdateCheckoutRequestDTO, untouched by this DTO group.

Response Body

application/json

application/json

curl -X POST "https://example.com/oto-offers" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "productId": "string",    "productName": "string",    "priceId": "string",    "headline": "string",    "description": "string",    "acceptCtaText": "string",    "declineText": "string"  }'
{  "otoOfferId": "string"}
{  "error": "string"}

Pobierz ofertę OTO

GET/oto-offers/{otoOfferId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

otoOfferId*string

OTO offer id

Response Body

application/json

application/json

curl -X GET "https://example.com/oto-offers/string"
{  "otoOffer": {    "id": "string",    "name": "string",    "productId": "string",    "productName": "string",    "priceId": "string",    "headline": "string",    "description": "string",    "acceptCtaText": "string",    "declineText": "string",    "timerMinutes": 0,    "media": [      {        "type": "image",        "url": "string",        "mediaId": "string",        "thumbnailUrl": "string"      }    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}
{  "error": "string"}

Edytuj ofertę OTO

PATCH/oto-offers/{otoOfferId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

otoOfferId*string

OTO offer id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Partial OTO-offer update — every content field is patchable.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/oto-offers/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "updated": true}
{  "error": "string"}

Usuń ofertę OTO

DELETE/oto-offers/{otoOfferId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

otoOfferId*string

OTO offer id

Response Body

application/json

application/json

curl -X DELETE "https://example.com/oto-offers/string"
{  "deleted": true}
{  "error": "string"}

Czy ten artykuł był pomocny?

Powiązane artykuły

Coś się nie zgadza? Napisz do nas na support@zanfia.com.