Workspace API

Strony

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

4 min czytaniaOstatnia aktualizacja: 26 lip 2026

Własne strony HTML hostowane w domenie Twojego sklepu. Wymaga uprawnień pages:read / pages:write. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.

Lista stron

GET/pages

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/pages"
{  "count": 0,  "pages": [    {      "id": "string",      "slug": "string",      "title": "string",      "status": "draft",      "source": "pasted",      "publishedAt": "string",      "createdAt": "string",      "updatedAt": "string"    }  ]}
{  "error": "string"}

Utwórz stronę

POST/pages

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/pages" \  -H "Content-Type: application/json" \  -d '{    "slug": "string",    "title": "string",    "html": "string"  }'
{  "pageId": "string",  "slug": "string"}
{  "error": "string"}

Szczegóły strony

GET/pages/{pageId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

pageId*string

Page id

Response Body

application/json

application/json

curl -X GET "https://example.com/pages/string"
{  "id": "string",  "slug": "string",  "title": "string",  "status": "draft",  "source": "pasted",  "publishedAt": "string",  "createdAt": "string",  "updatedAt": "string",  "html": "string",  "seo": {    "title": "string",    "description": "string",    "noindex": true  }}
{  "error": "string"}

Aktualizuj stronę

PATCH/pages/{pageId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

pageId*string

Page 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/pages/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "pageId": "string"}
{  "error": "string"}

Usuń stronę

DELETE/pages/{pageId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

pageId*string

Page id

Response Body

application/json

application/json

curl -X DELETE "https://example.com/pages/string"
{  "pageId": "string"}
{  "error": "string"}

Opublikuj lub cofnij publikację strony

POST/pages/{pageId}/publish

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

pageId*string

Page 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/pages/string/publish" \  -H "Content-Type: application/json" \  -d '{    "publish": true  }'
{  "pageId": "string",  "status": "draft"}
{  "error": "string"}

Ustaw lub wyczyść stronę główną sklepu

PUT/pages/main

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.

Set (or clear) the storefront's main page. pageId = a Published page's id to render at the storefront root; null reverts to the product storefront.

Response Body

application/json

application/json

curl -X PUT "https://example.com/pages/main" \  -H "Content-Type: application/json" \  -d '{    "pageId": "string"  }'
{  "mainPageId": "string"}
{  "error": "string"}

Czy ten artykuł był pomocny?

Powiązane artykuły

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