Ustawienia koszyka
Endpointy „Ustawienia koszyka” Zanfia Workspace API — ze schematami i przykładami kodu.
Ustawienia strony koszyka na poziomie całego workspace: teksty prawne (regulamin/polityka prywatności, linkiem lub tekstem), klauzula informacyjna, identyfikatory śledzenia (Google Analytics, GTM, Facebook Pixel, TikTok Pixel), promowanie cen netto i miejsce wariantów cen. To JEDYNA wartość domyślna, z której korzysta każda strona koszyka, chyba że pojedyncza oferta ją nadpisze (zobacz Oferty). Zgody w koszyku (customConsents, checkboxy zaznaczane przez kupujących) mają własne endpointy poniżej, kluczowane nazwą name; endpoint PATCH odrzuca to pole, dzięki czemu identyfikatory produktów/koszyków są zawsze weryfikowane. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.
Pobierz ustawienia koszyka
/checkout-settingsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Query Parameters
"pl"Value in
- "pl"
Response Body
application/json
application/json
curl -X GET "https://example.com/checkout-settings"{ "termsUrl": "string", "privacyPolicyUrl": "string", "claim": "string", "googleAnalyticsId": "string", "facebookPixelId": "string", "customConsents": [ { "id": "string", "currentVersionId": "string", "versions": [ { "id": "string", "version": 0, "name": "string", "label": "string", "url": "string", "required": true, "applyToProducts": [ "string" ], "applyToCheckouts": [ "string" ], "isMarketingOptIn": true, "publishedAt": "string", "migratedFromLegacy": true } ], "archivedAt": "string", "label": "string", "url": "string", "required": true, "name": "string", "applyToProducts": [ "string" ], "applyToCheckouts": [ "string" ], "isMarketingOptIn": true } ], "creator": "string", "embeddedForm": { "variant": "basic", "scheme": "auto", "buttonText": "string", "emailPlaceholder": "string", "headerText": "string", "successMessage": "string", "descriptionText": "string", "color": "string", "background": "string", "claim": "string", "privacyPolicyUrl": "string", "showClaim": true, "showHeader": true, "showDescription": true, "showPrivacyPolicyInfo": true, "showFirstNameInput": true, "firstNameRequired": true, "showPhoneNumberInput": true, "phoneNumberRequired": true, "customDomain": "string", "termsAndPrivacyPolicyConsentRequired": true, "showTermsUrl": true, "termsUrl": "string" }, "checkoutTheme": "indigo", "termsContent": "string", "privacyPolicyContent": "string", "termsSlug": "string", "privacyPolicySlug": "string", "promoteNetPrices": true, "googleAnalyticsGtmId": "string", "tiktokPixelId": "string", "microsoftClarityProjectId": "string", "hotjarSiteId": "string", "cartTheme": { "enabled": true, "selectedTheme": "light", "customColors": { "light": { "accent": "string", "gray": "string", "background": "string" }, "dark": { "accent": "string", "gray": "string", "background": "string" } }, "customCheckoutColors": { "light": { "checkoutLeftBackground": "string", "checkoutRightBackground": "string", "checkoutLeftTextColor": "string", "checkoutLeftPriceColor": "string", "accent": "string" }, "dark": { "checkoutLeftBackground": "string", "checkoutRightBackground": "string", "checkoutLeftTextColor": "string", "checkoutLeftPriceColor": "string", "accent": "string" } }, "theme": "tomato" }, "priceVariantsPlacement": "belowDescription", "language": "pl"}{ "error": "string", "message": "string"}Aktualizuj ustawienia koszyka
/checkout-settingsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PATCH /checkout-settings — partial update of the workspace cart/checkout settings. Every field is optional; an omitted field keeps its stored value (server-side deep merge — sibling fields, including customConsents, are never clobbered by a partial patch). language defaults to 'pl'.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/checkout-settings" \ -H "Content-Type: application/json" \ -d '{}'{ "termsUrl": "string", "privacyPolicyUrl": "string", "claim": "string", "googleAnalyticsId": "string", "facebookPixelId": "string", "customConsents": [ { "id": "string", "currentVersionId": "string", "versions": [ { "id": "string", "version": 0, "name": "string", "label": "string", "url": "string", "required": true, "applyToProducts": [ "string" ], "applyToCheckouts": [ "string" ], "isMarketingOptIn": true, "publishedAt": "string", "migratedFromLegacy": true } ], "archivedAt": "string", "label": "string", "url": "string", "required": true, "name": "string", "applyToProducts": [ "string" ], "applyToCheckouts": [ "string" ], "isMarketingOptIn": true } ], "creator": "string", "embeddedForm": { "variant": "basic", "scheme": "auto", "buttonText": "string", "emailPlaceholder": "string", "headerText": "string", "successMessage": "string", "descriptionText": "string", "color": "string", "background": "string", "claim": "string", "privacyPolicyUrl": "string", "showClaim": true, "showHeader": true, "showDescription": true, "showPrivacyPolicyInfo": true, "showFirstNameInput": true, "firstNameRequired": true, "showPhoneNumberInput": true, "phoneNumberRequired": true, "customDomain": "string", "termsAndPrivacyPolicyConsentRequired": true, "showTermsUrl": true, "termsUrl": "string" }, "checkoutTheme": "indigo", "termsContent": "string", "privacyPolicyContent": "string", "termsSlug": "string", "privacyPolicySlug": "string", "promoteNetPrices": true, "googleAnalyticsGtmId": "string", "tiktokPixelId": "string", "microsoftClarityProjectId": "string", "hotjarSiteId": "string", "cartTheme": { "enabled": true, "selectedTheme": "light", "customColors": { "light": { "accent": "string", "gray": "string", "background": "string" }, "dark": { "accent": "string", "gray": "string", "background": "string" } }, "customCheckoutColors": { "light": { "checkoutLeftBackground": "string", "checkoutRightBackground": "string", "checkoutLeftTextColor": "string", "checkoutLeftPriceColor": "string", "accent": "string" }, "dark": { "checkoutLeftBackground": "string", "checkoutRightBackground": "string", "checkoutLeftTextColor": "string", "checkoutLeftPriceColor": "string", "accent": "string" } }, "theme": "tomato" }, "priceVariantsPlacement": "belowDescription", "language": "pl"}{ "error": "string", "message": "string"}Lista zgód w koszyku
/checkout-settings/consentsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/checkout-settings/consents"{ "consents": [ { "name": "string", "label": "string", "url": "string", "required": true, "appliesTo": "all" } ]}{ "error": "string", "message": "string"}Dodaj lub edytuj zgodę w koszyku
/checkout-settings/consents/{name}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Folder name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PUT /checkout-settings/consents/:name — add or edit ONE consent (the name path segment is the upsert key; an existing name edits in place, a new name appends). Every product/checkout id in applyTo is verified against real documents before writing.
Response Body
application/json
application/json
curl -X PUT "https://example.com/checkout-settings/consents/string" \ -H "Content-Type: application/json" \ -d '{ "label": "string", "required": true, "applyTo": "all" }'{ "created": true, "consent": { "name": "string", "label": "string", "url": "string", "required": true, "appliesTo": "all" }}{ "error": "string", "message": "string"}Czy ten artykuł był pomocny?

