Workspace API

Oferty i order bumpy

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

10 min czytaniaOstatnia aktualizacja: 26 lip 2026

Oferta to koszyk (checkout) produktu; jeden produkt może mieć ich kilka. Order bumpy to oferty dodatkowe pokazywane w koszyku. Kwoty podawane są w jednostkach mniejszych (1999 = 19,99). Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.

Lista ofert

GET/checkouts

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Query Parameters

productId?string

Response Body

application/json

application/json

curl -X GET "https://example.com/checkouts"
{  "count": 0,  "checkouts": [    {      "id": "string",      "productId": "string",      "name": "string",      "slug": "string",      "title": "string",      "active": true,      "archived": true,      "isFree": true,      "priceCount": 0,      "createdAt": "string"    }  ]}
{  "error": "string"}

Utwórz ofertę

POST/checkouts

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.

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts" \  -H "Content-Type: application/json" \  -d '{    "productId": "string"  }'
{  "id": "string",  "productId": "string",  "name": "string",  "slug": "string",  "title": "string",  "active": true,  "archived": true,  "isFree": true,  "priceCount": 0,  "createdAt": "string"}
{  "error": "string"}

Szczegóły oferty

GET/checkouts/{checkoutId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Response Body

application/json

application/json

curl -X GET "https://example.com/checkouts/string"
{  "id": "string",  "productId": "string",  "name": "string",  "slug": "string",  "title": "string",  "active": true,  "archived": true,  "isFree": true,  "priceCount": 0,  "createdAt": "string",  "description": "string",  "language": "string",  "successUrl": "string",  "prices": [    {      "id": "string",      "productId": "string",      "amountCents": 0,      "currency": "string",      "type": "one_time",      "active": true,      "status": "available",      "gateways": [        "string"      ],      "label": "string",      "hidden": true,      "interval": "string",      "intervalCount": 0,      "trialPeriodDays": 0,      "installments": {        "numberOfCycles": 0,        "allowCancellation": true      },      "saleEndsAt": "string",      "quantityLimit": 0,      "compareAtAmountCents": 0,      "customInvoiceName": "string",      "planId": "string"    }  ],  "orderBumps": [    {      "orderBumpId": "string",      "visibleForPriceIds": [        "string"      ]    }  ]}
{  "error": "string"}

Aktualizuj ustawienia oferty

PATCH/checkouts/{checkoutId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Partial update of an offer — the full checkout-builder settings surface. Omitted fields are unchanged.

Derived from the internal editor DTO with the composition/lifecycle fields removed: active/archived (publish + delete routes), orderBumps (attach/detach routes), and the republishHiddenProducts activation control flag. oto (the checkout's one-time-offer chain attachment) IS included — offer ids for its steps[].otoOfferId come from the /oto-offers routes; the shared Joi validator enforces the chain shape.

description is a public alias for checkoutDescription (kept from the original 5-field surface); when both are present checkoutDescription wins.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/checkouts/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "checkoutId": "string"}
{  "error": "string"}

Usuń ofertę

DELETE/checkouts/{checkoutId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Response Body

application/json

application/json

curl -X DELETE "https://example.com/checkouts/string"
{  "checkoutId": "string",  "deleted": true}
{  "error": "string"}

Aktywuj lub wstrzymaj ofertę

POST/checkouts/{checkoutId}/publish

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts/string/publish" \  -H "Content-Type: application/json" \  -d '{    "active": true  }'
{  "checkoutId": "string",  "active": true}
{  "error": "string"}

Duplikuj ofertę

POST/checkouts/{checkoutId}/duplicate

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts/string/duplicate" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "productId": "string",  "name": "string",  "slug": "string",  "title": "string",  "active": true,  "archived": true,  "isFree": true,  "priceCount": 0,  "createdAt": "string"}
{  "error": "string"}

Ustaw jako domyślny checkout produktu

POST/checkouts/{checkoutId}/set-default

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts/string/set-default"
{  "checkoutId": "string",  "productId": "string"}
{  "error": "string"}

Dodaj wariant ceny

POST/checkouts/{checkoutId}/prices

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts/string/prices" \  -H "Content-Type: application/json" \  -d '{    "type": "one_time",    "amountCents": 0,    "currency": "string"  }'
{  "id": "string",  "productId": "string",  "amountCents": 0,  "currency": "string",  "type": "one_time",  "active": true,  "status": "available",  "gateways": [    "string"  ],  "label": "string",  "hidden": true,  "interval": "string",  "intervalCount": 0,  "trialPeriodDays": 0,  "installments": {    "numberOfCycles": 0,    "allowCancellation": true  },  "saleEndsAt": "string",  "quantityLimit": 0,  "compareAtAmountCents": 0,  "customInvoiceName": "string",  "planId": "string"}
{  "error": "string"}

Zmień kolejność cen

PUT/checkouts/{checkoutId}/prices/order

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/checkouts/string/prices/order" \  -H "Content-Type: application/json" \  -d '{    "priceIds": [      "string"    ]  }'
{  "checkoutId": "string"}
{  "error": "string"}

Zmień cenę

PATCH/checkouts/{checkoutId}/prices/{priceId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

priceId*string

Price id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Point mutation of an existing price. change-amount re-prices in place (fresh gateway price under the same id) keeping label/limits/promo/plan. edit-details changes label/description only; set-plan re-links the price to a product plan; edit applies the partial overrides in edit over the stored price (limits/promo/access/gateways/trial).

Response Body

application/json

application/json

curl -X PATCH "https://example.com/checkouts/string/prices/string" \  -H "Content-Type: application/json" \  -d '{    "operation": "activate"  }'
{  "checkoutId": "string",  "priceId": "string"}
{  "error": "string"}

Archiwizuj lub usuń cenę

DELETE/checkouts/{checkoutId}/prices/{priceId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

priceId*string

Price id

Query Parameters

mode?string
Default"archive"

Value in

  • "archive"
  • "remove"

Response Body

application/json

application/json

curl -X DELETE "https://example.com/checkouts/string/prices/string"
{  "checkoutId": "string",  "priceId": "string",  "mode": "archive"}
{  "error": "string"}

Podgląd e-maila odzyskiwania koszyka

POST/checkouts/{checkoutId}/sessions/{sessionId}/recovery-email/preview

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

sessionId*string

Checkout session id

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts/string/sessions/string/recovery-email/preview"
{  "status": "ok",  "recipientEmail": "string",  "customerName": "string",  "productName": "string",  "checkoutUrl": "string",  "language": "pl"}
{  "error": "string"}

Wyślij e-mail odzyskiwania koszyka

POST/checkouts/{checkoutId}/sessions/{sessionId}/recovery-email

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

sessionId*string

Checkout session id

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts/string/sessions/string/recovery-email"
{  "status": "ok",  "sentAtMs": 0,  "sentCount": 0}
{  "error": "string"}

Dołącz order bump do oferty

POST/checkouts/{checkoutId}/order-bumps

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/checkouts/string/order-bumps" \  -H "Content-Type: application/json" \  -d '{    "orderBumpId": "string"  }'
{  "checkoutId": "string",  "orderBumpId": "string",  "alreadyAttached": true}
{  "error": "string"}

Odłącz order bump od oferty

DELETE/checkouts/{checkoutId}/order-bumps/{orderBumpId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

checkoutId*string

Offer (checkout) id

orderBumpId*string

Order bump id

Response Body

application/json

application/json

curl -X DELETE "https://example.com/checkouts/string/order-bumps/string"
{  "checkoutId": "string",  "orderBumpId": "string"}
{  "error": "string"}

Lista order bumpów

GET/order-bumps

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/order-bumps"
{  "count": 0,  "orderBumps": [    {      "id": "string",      "name": "string",      "description": "string",      "ctaText": "string",      "productId": "string",      "productName": "string",      "priceId": "string",      "price": {        "amountCents": 0,        "currency": "string",        "type": "one_time"      },      "createdAt": "string"    }  ]}
{  "error": "string"}

Utwórz order bump

POST/order-bumps

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.

Response Body

application/json

application/json

curl -X POST "https://example.com/order-bumps" \  -H "Content-Type: application/json" \  -d '{    "productId": "string",    "priceId": "string",    "name": "string"  }'
{  "orderBumpId": "string"}
{  "error": "string"}

Aktualizuj order bump

PATCH/order-bumps/{orderBumpId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

orderBumpId*string

Order bump id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/order-bumps/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "orderBumpId": "string"}
{  "error": "string"}

Usuń order bump

DELETE/order-bumps/{orderBumpId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

orderBumpId*string

Order bump id

Response Body

application/json

application/json

curl -X DELETE "https://example.com/order-bumps/string"
{  "orderBumpId": "string"}
{  "error": "string"}

Czy ten artykuł był pomocny?

Powiązane artykuły

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