Workspace API

Produkty Downloads

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

3 min czytaniaOstatnia aktualizacja: 26 lip 2026

Zawartość produktów typu Downloads, adresowana przez id produktu: opis w Markdownie i lista plików do pobrania. Najpierw wgraj plik przez POST /media, potem podepnij jego URL jako plik. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.

Zawartość produktu Downloads

GET/products/{productId}/downloads

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

productId*string

Product id

Response Body

application/json

application/json

curl -X GET "https://example.com/products/string/downloads"
{  "editorContent": "string",  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Aktualizuj opis produktu Downloads

PATCH/products/{productId}/downloads

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

productId*string

Product 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/products/string/downloads" \  -H "Content-Type: application/json" \  -d '{    "editorContent": "string"  }'
{  "updated": true}
{  "error": "string"}

Dodaj pliki do pobrania

POST/products/{productId}/downloads/files

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

productId*string

Product 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/products/string/downloads/files" \  -H "Content-Type: application/json" \  -d '{    "files": [      {        "url": "string",        "name": "string"      }    ]  }'
{  "added": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ],  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Usuń plik do pobrania

DELETE/products/{productId}/downloads/files/{uid}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

productId*string

Product id

uid*string

Download file uid

Response Body

application/json

application/json

curl -X DELETE "https://example.com/products/string/downloads/files/string"
{  "removed": {    "url": "string",    "name": "string",    "uid": "string",    "mediaId": "string",    "size": 0  },  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Zmień kolejność plików

POST/products/{productId}/downloads/files/reorder

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

productId*string

Product id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Complete new order — must be a permutation of the current file uids.

Response Body

application/json

application/json

curl -X POST "https://example.com/products/string/downloads/files/reorder" \  -H "Content-Type: application/json" \  -d '{    "uids": [      "string"    ]  }'
{  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Czy ten artykuł był pomocny?

Powiązane artykuły

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