Product Library API
API parameters and examples for products, brands, categories and information templates.
Quick start
All 28 Product Library operations use POST https://open.musedam.cc/api/muse/product-api. Set service to the operation identifier shown below and put all business parameters in a flat JSON body.
- Obtain a MuseDAM API Key.
- Ask a Product Library manager to add the key as an API Key Collaborator in Member settings → Add member and assign the required role.
- Call the API from your server with an
Authorization: Bearer <APIKEY>header.
Permissions follow the key’s settings in "Member Settings" - "Roles & Permissions".
Choose a role for the operations you need:
| Role | Available operations |
|---|---|
view_only | View brands, categories, information templates, and published products; check product ID visibility. |
usable | All view_only operations, plus obtain signed original downloadUrl links when reading products and create product shares (createProductShare). |
editable | All usable operations, plus query library assets (listAssets / getAsset), create and edit products, access drafts, publish, return to draft, and soft-delete products. |
manage | Manage all resources, including creating/updating/deleting brands, categories, and information templates, revoking shares, and viewing share/download history. |
Each role includes the preceding role’s permissions. Replace resource IDs in the examples with actual IDs.
Replace your_api_key with your authorized API Key to query the product list:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listProducts",
"page": 1,
"pageSize": 20
}'A successful response uses HTTP 200 with code: "0", an example message: "OK", result.success: true, products in result.data, and paging information in result.pagination. If the list is empty, check whether the library contains products visible to your role; view_only and usable can only view published products.
Requests and responses
All operations use POST https://open.musedam.cc/api/muse/product-api with Authorization: Bearer <APIKEY> and Content-Type: application/json. Put service and all business parameters at the top level of the JSON body.
Success response example:
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {},
"code": null,
"message": null,
"requestId": "request_123"
},
"traceId": "trace_123"
}Permission-denied gateway response example (HTTP 200; illustrative diagnostic wording):
{
"code": "MB100005",
"message": "product-library HTTP 403: {\"code\":\"0\",\"result\":{\"success\":false,\"data\":null,\"code\":\"forbidden\",\"message\":\"Insufficient permissions\",\"requestId\":\"request_123\"}}",
"result": null,
"traceId": "trace_123"
}| Field | Type | Description |
|---|---|---|
code | String | Public gateway code: "0" on success, "MB100005" for upstream failures, "MO100002" for invalid credentials. |
message | String | Example success wording: "OK". Text is for diagnostics only; do not parse it or branch on it. |
result | Object / null | Business result |
result.success | Boolean | true on success, false on failure. |
result.data | Object / Array | Returned object or array on success. |
result.code | null | null on success. Internal error codes are troubleshooting references. |
result.message | null | Error message |
result.pagination | Object | Pagination information |
result.requestId | String | Request ID |
traceId | String | Trace ID |
List endpoints accept page (default 1) and pageSize (default 20, max 100) and return pagination counts in result.pagination. For continuous product synchronization, use cursor synchronization.
{
"page": 1,
"pageSize": 20,
"totalCount": 42,
"totalPages": 3
}Field formats and conventions
| Field | Usage |
|---|---|
| Numeric resource IDs | Positive integers up to 2147483647. |
| Template, group, field, and version IDs | Strings; preserve as received and do not assume UUID format. |
| Asset IDs | Use the id returned by listAssets / getAsset. |
Category iconAssetId | Dedicated category icon asset ID uploaded in the web UI (returned on existing categories). It is distinct from library asset IDs returned by listAssets and cannot be uploaded or listed via Open API. |
size | Decimal byte-count string or null to avoid precision loss. |
| Dates | RFC 3339 strings or null; preserve all 6 fractional digits in synchronization timestamps. |
| Product SKU | Named spu in the API. |
Omit optional fields on update to keep existing values; do not pass null for optional request parameters (the internal error is 422 validation_failed, wrapped by the public gateway as described above). Only fields explicitly documented as clearable accept "" or [] to clear. See Media links for preview and download URL expiry rules.
Request limits and internal error codes (troubleshooting reference)
The 401, 403, 404, 409, 413, 422, 500, and 503 statuses in this table and later operation descriptions refer to internal Product Library statuses and result.code, not public HTTP statuses or gateway error fields. Use the public error contract above; do not parse internal responses embedded in message.
Request bodies are limited to 1 MiB. Write, history, and synchronization services reject unknown fields; ordinary list and detail reads ignore unknown fields.
| HTTP status | result.code | Description and action |
|---|---|---|
| 401 | invalid_credentials | Invalid or missing API Key; check the Authorization: Bearer header. |
| 401 | key_inactive | The API Key is inactive or expired. |
| 403 | forbidden | Insufficient collaborator role permissions. |
| 404 | not_found | Resource does not exist, was deleted, or is not visible to your role. |
| 409 | sku_in_use | Product spu is already in use (including soft-deleted products). |
| 409 | code_in_use | Resource code conflict; retry or use a different code. |
| 409 | name_in_use | Sibling category name or template name is already in use. |
| 409 | brand_has_dependents | Brand still has live categories or products; remove or move them first. |
| 409 | category_has_products | Category subtree still has live products; remove or move them first. |
| 409 | default_template_replacement_required | Returned when deleting the library default template without replacementForLibraryDefault (if a non-existent, deleted, or self template ID is supplied, 422 validation_failed is returned). |
| 409 | mutation_response_unavailable | The mutation committed (result.mutationOutcome: "committed"), but its response is unavailable; reconcile state and do not repeat it. |
| 413 | payload_too_large | Request body exceeds 1 MiB. |
| 422 | validation_failed | Validation failed; fix the input using the field details in result.message. |
| 503 | authentication_unavailable | Authentication service is temporarily unavailable; retry later. |
| 503 | write_conflict | Write conflict rolled back; wait before retrying. The public gateway does not guarantee forwarding Retry-After. |
| 500 | internal_server_error | Server error; keep traceId and result.requestId and reconcile state before retrying writes. |
Brands
Brand response fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Resource ID. Positive integer ID, maximum 2147483647. |
| name | String | Name |
| code | String | Code |
| description | String | Description. May be null |
| website | String | Website URL. May be null |
| sortOrder | Integer | Sort order |
| isEnabled | Boolean | Whether enabled |
| createdAt | String | RFC 3339 timestamp; preserve full precision. |
| updatedAt | String | RFC 3339 timestamp; preserve full precision. |
List brands
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns public metadata ordered by sortOrder then id. Raw logo URLs are excluded.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be listBrands. |
| page | Integer | No | Positive page number, default 1. |
| pageSize | Integer | No | Positive page size, default 20, capped at 100. |
Response fields: 200; result.data: List<Brand>. field details See Requests and responses for pagination fields.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listBrands",
"page": 1,
"pageSize": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": 10,
"name": "Example brand",
"code": "example-code",
"description": null,
"website": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z"
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"page": 1,
"pageSize": 20,
"totalCount": 1,
"totalPages": 1
}
},
"traceId": "trace_123"
}Create brand
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Creates a brand; duplicate names are allowed and code is generated by the server. Logo URL restrictions are listed in the parameter table below.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be createBrand. |
| name | String | Yes | Trimmed before validation. Minimum length 1 characters; Maximum length 128 characters |
| description | String | No | Maximum length 512 characters |
| logoUrl | String | No | Empty string clears. Only HTTP(S), no credentials, allowlisted MuseDAM CDN or configured storage host; query and fragment removed before storage. No upload; not echoed in reads. Maximum length 512 characters |
Response fields: 200; result.data: Brand. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "createBrand",
"name": "Example brand"
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 10,
"name": "Example brand",
"code": "example-code",
"description": null,
"website": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Read brand
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns the specified brand’s public metadata. Raw logo URLs are excluded.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be getBrand. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: Brand. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "getBrand",
"id": 10
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 10,
"name": "Example brand",
"code": "example-code",
"description": null,
"website": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Update brand
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Updates the provided metadata fields; omitted properties remain unchanged. No file upload or generic asset replacement.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Unknown fields are rejected; at least one field to update (name, description, or logoUrl) must be provided in addition to service and id.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be updateBrand. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
| name | String | No | Trimmed before validation. Minimum length 1 characters; Maximum length 128 characters |
| description | String | No | Maximum length 512 characters |
| logoUrl | String | No | Empty string clears. Only HTTP(S), no credentials, allowlisted MuseDAM CDN or configured storage host; query and fragment removed before storage. No upload; not echoed in reads. Maximum length 512 characters |
Response fields: 200; result.data: Brand. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "updateBrand",
"id": 10,
"description": "Updated by API"
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 10,
"name": "Example brand",
"code": "example-code",
"description": "Updated by API",
"website": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:05:00.000Z"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Delete brand
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Deletes only a brand with no live categories or products. Returns 409 otherwise; never cascades into products.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be deleteBrand. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: DeletedId. Returns result.data.id, the deleted resource ID.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "deleteBrand",
"id": 10
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 10
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Categories
Category trees and deletion
Sibling names must be unique, and parents must belong to the same brand. A brand allows at most 10 levels and 5000 nondeleted nodes. sortOrder is a zero-based sibling position: omission appends new or moved categories and preserves position for same-parent updates. Renaming or moving updates descendant paths.
Creation adds a direct library-default template binding only when that template has no brand bindings or includes this brand. Otherwise creation still succeeds, with ancestor, brand, then library-default resolution. Deletion soft-deletes the entire subtree; any nondeleted product in it causes 409 category_has_products without deleting anything.
Category response fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Resource ID. Positive integer ID, maximum 2147483647. |
| brandId | Integer | Brand ID. Positive integer ID, maximum 2147483647. |
| parentId | Integer | Parent category ID. Positive integer ID, maximum 2147483647; May be null |
| name | String | Name |
| pathKey | String | Category path |
| description | String | Description. May be null |
| iconEmoji | String | Category emoji. May be null |
| iconAssetId | Integer | Category icon ID. Positive integer ID, maximum 2147483647; May be null |
| sortOrder | Integer | Sort order |
| isEnabled | Boolean | Whether enabled |
| createdAt | String | RFC 3339 timestamp; preserve full precision. |
| updatedAt | String | RFC 3339 timestamp; preserve full precision. |
List categories
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns a flat live tree ordered by brandId, parentId, sortOrder and id. Optional brand filter; no implicit subtree expansion.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be listCategorys. |
| page | Integer | No | Positive page number, default 1. |
| pageSize | Integer | No | Positive page size, default 20, capped at 100. |
| brandId | Integer | No | Filter by brand ID within this library. When omitted, returns all categories across all brands in the current library, with pagination, not all categories in a single response. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: List<Category>. field details See Requests and responses for pagination fields.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listCategorys",
"page": 1,
"pageSize": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": 20,
"brandId": 10,
"parentId": null,
"name": "Catalog",
"pathKey": "/Catalog",
"description": null,
"iconEmoji": null,
"iconAssetId": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z"
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"page": 1,
"pageSize": 20,
"totalCount": 1,
"totalPages": 1
}
},
"traceId": "trace_123"
}Create category
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Creates a live node in the specified brand. Parent must be live in the same brand/library. Max depth 10 and max 5000 live nodes per brand. Sibling names must be unique. The library default template is explicitly bound only when it has no brand bindings or includes this brand; otherwise creation succeeds without an explicit binding, preserving ancestor, brand, then library-default template resolution.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be createCategory. |
| brandId | Integer | Yes | Positive integer ID, maximum 2147483647. |
| name | String | Yes | Exact value, not trimmed. Must contain non-whitespace and no slash; unique among live siblings. Minimum length 1 characters; Maximum length 64 characters; Must match ^(?=.*\S)[^/]+$ |
| parentId | Integer | No | Positive integer ID, maximum 2147483647. |
| sortOrder | Integer | No | Sibling insertion index, no greater than destination sibling count. Omitted: append on create/move, preserve for same parent. Minimum: 0; Maximum: 5,000 |
| description | String | No | — |
| iconEmoji | String | No | Maximum length 16 characters |
| iconAssetId | Integer | No | Dedicated category icon asset ID uploaded in the web UI (distinct from library asset IDs returned by listAssets). Positive integer ID, maximum 2147483647. |
| isEnabled | Boolean | No | — |
Response fields: 200; result.data: Category. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "createCategory",
"name": "Catalog",
"brandId": 10
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 20,
"brandId": 10,
"parentId": null,
"name": "Catalog",
"pathKey": "/Catalog",
"description": null,
"iconEmoji": null,
"iconAssetId": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Read category
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns the specified nondeleted category. A missing category or one outside the current library returns 404.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be getCategory. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: Category. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "getCategory",
"id": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 20,
"brandId": 10,
"parentId": null,
"name": "Catalog",
"pathKey": "/Catalog",
"description": null,
"iconEmoji": null,
"iconAssetId": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Update category
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Updates or moves a node within its existing brand; brandId is immutable. Rejects cycles/depth/node limits and invalid sort index. Updates descendant paths atomically.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Unknown fields are rejected; at least one field to update must be provided in addition to service and id.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be updateCategory. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
| name | String | No | Exact value, not trimmed. Must contain non-whitespace and no slash; unique among live siblings. Minimum length 1 characters; Maximum length 64 characters; Must match ^(?=.*\S)[^/]+$ |
| parentId | Integer | No | Positive integer ID, maximum 2147483647. |
| sortOrder | Integer | No | Sibling insertion index, no greater than destination sibling count. Omitted: append on create/move, preserve for same parent. Minimum: 0; Maximum: 5,000 |
| description | String | No | — |
| iconEmoji | String | No | Maximum length 16 characters |
| iconAssetId | Integer | No | Dedicated category icon asset ID uploaded in the web UI (distinct from library asset IDs returned by listAssets). Positive integer ID, maximum 2147483647. |
| isEnabled | Boolean | No | — |
Response fields: 200; result.data: Category. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "updateCategory",
"id": 20,
"description": "Updated by API"
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 20,
"brandId": 10,
"parentId": null,
"name": "Catalog",
"pathKey": "/Catalog",
"description": "Updated by API",
"iconEmoji": null,
"iconAssetId": null,
"sortOrder": 0,
"isEnabled": true,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:05:00.000Z"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Delete category
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Soft-deletes the entire category subtree only if no live products reference any descendant. Does not delete or demote products.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be deleteCategory. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: DeletedId. Returns result.data.id, the deleted resource ID.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "deleteCategory",
"id": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 20
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Information templates
Groups
groups contains 1–200 groups. A template may have at most 200 fields in total.
| Field | Type | Description |
|---|---|---|
id | string | Required for an existing group, 1–128 characters, belonging to this template. Omit for a new group. |
name | string | Required, 1–128 characters. Leading and trailing whitespace is trimmed. |
fields | array | Required. Fields in the group, described below. |
Existing groups keep their stored order; new groups append in the supplied order. Groups do not accept sortOrder or isDefault. The server assigns the default group, which cannot be deleted.
Fields
New fields require key, name, and type. Existing fields require id. When the type is unchanged, omitted properties retain their values, except for sortOrder. Changing type migrates config for the target type; provide new configuration when required.
| Field | Type | Description |
|---|---|---|
id | string | Required for an existing field, 1–128 characters, belonging to this group. Omit for a new field. |
key | string | Required for a new field, 1–64 characters. Leading and trailing whitespace is trimmed; must match ^[a-zA-Z0-9_]+$ and be unique across the template; cannot change for existing fields. |
name | string | Required for a new field, 1–128 characters. |
type | string | Required for a new field. Supported types appear in the configuration table below. |
required | boolean | Optional. Defaults to false for a new field. |
placeholder | string | Optional, up to 255 characters. Omit to preserve an existing value; a new field defaults to null in responses. |
sortOrder | integer | Optional, nonnegative, and unique within the group. If omitted, uses the field's array position. |
config | object | Depends on the field type; see below. Defaults to {} for a new field, but must still meet that type's configuration requirements. |
typeChangeConfirmed | boolean | Optional. Set to true for an allowed type change that requires confirmation. |
Creation seeds three protected system fields (name, sku, and mainImage), leaving room for up to 197 custom fields. Custom fields in the first group follow those three fields: their supplied sortOrder (or array position when omitted) is increased by 3. Replacement definitions (updateTemplate) must keep all existing system fields' IDs, type, required, and config unchanged (system field settings cannot be modified via Open API). Fields cannot move between groups.
New fields must be custom fields and cannot use reserved system keys (name, sku, brand, category, description, mainImage). isSystemField and systemKey cannot create or reassign system identities; preserve existing identity on update. If supplied for an existing system field, systemKey must match its stored system key; omit it for custom fields. Unknown group or field properties are rejected.
Field configuration
config depends on the field's type. For example, text fields use {}, while currency and choice fields need additional configuration.
| Field type | Configuration |
|---|---|
text, textarea, email, phone, url, color, date, dateRange | Use {}. Other configuration properties are not accepted. |
number | Optional unit, a string |
currency | Required code and symbol (nonempty strings), and decimals (an integer from 0 to 4). |
richtext | Required mode, either html or delta. |
select, radio, checkbox | Required, nonempty options array. Entries follow the table below; value must be unique. |
image, file | Optional maxCount (an integer of at least 1), maxSizeMB (a number greater than 0), and accept (an array of strings). |
Each options entry contains:
| Field | Type | Description |
|---|---|---|
value | string | Required, nonempty. The option's unique value. |
label | string | Required, nonempty. The display label. |
sortOrder | integer | Required, nonnegative |
archived | boolean | Optional. Whether the option is archived. |
All system fields must preserve their existing type, required, and config when updating a template (updateTemplate); modifying system field config via Open API is not supported.
Empty and system configurations reject unknown properties. Other configuration and option validators strip unknown properties. Download the OpenAPI JSON for the full machine-readable definition.
Returned template definition
Template details use groups; products use templateDefinition.groups. Both contain groups and fields. Products return the version pinned at creation, unchanged by later template edits or deletion. templateDefinition may be null when no template is assigned.
Each group always returns id, name, fields, and these read-only properties:
| Field | Type | Description |
|---|---|---|
isDefault | boolean | Whether this is the default group |
sortOrder | integer | The group's order |
Each field always returns id, key, name, type, required, placeholder, sortOrder, config, and the following properties. The write-only parameter typeChangeConfirmed is not returned.
| Field | Type | Description |
|---|---|---|
isSystemField | boolean | Whether this is a system field |
systemKey | string or null | System identity: name, sku, brand, category, description, or mainImage. null for custom fields. |
placeholder may be null. Media references in configuration return safe preview information without storage paths or credentials.
Template response fields
| Field | Type | Description |
|---|---|---|
| id | String | Resource ID. Minimum length 1 characters; Maximum length 128 characters |
| name | String | Name |
| description | String | Description. May be null |
| enabled | Boolean | Whether the template is enabled |
| isSystemDefault | Boolean | Whether this is the system default template |
| isLibraryDefault | Boolean | Whether this is the library default template |
| createdAt | String | RFC 3339 timestamp; preserve full precision. |
| updatedAt | String | RFC 3339 timestamp; preserve full precision. |
| boundBrandIds | List<Integer> | Bound brand IDs. Each item: Positive integer ID, maximum 2147483647. |
| boundCategoryIds | List<Integer> | Bound category IDs. Each item: Positive integer ID, maximum 2147483647. |
| groups | List<VersionGroup> | Template groups. Nested fields: Template groups and fields |
List templates
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns live template metadata, bindings and ordered groups/fields, including preview-only configuration. Ordered by createdAt descending then id.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be listTemplates. |
| page | Integer | No | Positive page number, default 1. |
| pageSize | Integer | No | Positive page size, default 20, capped at 100. |
Response fields: 200; result.data: List<Template>. field details See Requests and responses for pagination fields.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listTemplates",
"page": 1,
"pageSize": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": "template_example",
"name": "Example template",
"description": null,
"enabled": true,
"isSystemDefault": false,
"isLibraryDefault": false,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"boundBrandIds": [],
"boundCategoryIds": [],
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"page": 1,
"pageSize": 20,
"totalCount": 1,
"totalPages": 1
}
},
"traceId": "trace_123"
}Create template
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Creates a template and an immutable version. syncStrategy is optional and only newOnly is supported. Allows at most 200 fields and leaves existing products unchanged.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Trim name/description. At most 200 fields across all groups. Bindings must be same-library, replace the provided binding set, and may move a binding from another template. When selected brands are nonempty, selected categories must belong to those brands. Only newOnly is supported; never bulk-repin existing products.
Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be createTemplate. |
| name | String | Yes | Minimum length 1 characters; Maximum length 30 characters |
| description | String | No | Maximum length 50 characters |
| enabled | Boolean | No | — |
| groups | List<TemplateGroupInput> | Yes | Minimum items 1; Maximum items 200 Nested fields: Template group fields |
| boundBrandIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 10,000 |
| boundCategoryIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 10,000 |
| isLibraryDefault | Boolean | No | — |
| syncStrategy | String | No | Allowed values: newOnly; Default: "newOnly" |
Response fields: 200; result.data: Template. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "createTemplate",
"name": "Example template",
"groups": [
{
"name": "Details",
"fields": [
{
"key": "color",
"name": "Color",
"type": "text",
"config": {}
}
]
}
]
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": "template_example",
"name": "Example template",
"description": null,
"enabled": true,
"isSystemDefault": false,
"isLibraryDefault": false,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"boundBrandIds": [],
"boundCategoryIds": [],
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Read template
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns the specified nondeleted template’s metadata, bindings, and groups/fields, including preview-only configuration. Groups and fields are ordered by sortOrder then id, ascending.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be getTemplate. |
| id | String | Yes | Opaque template ID; do not assume UUID syntax. Minimum length 1 characters; Maximum length 128 characters |
Response fields: 200; result.data: Template. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "getTemplate",
"id": "template_example"
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": "template_example",
"name": "Example template",
"description": null,
"enabled": true,
"isSystemDefault": false,
"isLibraryDefault": false,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"boundBrandIds": [],
"boundCategoryIds": [],
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Update template
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Updates template metadata, bindings, or group/field definitions. Omitting groups preserves the existing group and field definitions; supplying groups replaces all groups and fields in full (while preserving all existing system fields' IDs, types, required flags, and configurations). Every update creates a new immutable template version without changing existing products' pinned versions or values; binding and default changes apply to subsequent product creation.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Omitting the groups property preserves the existing definition. Supplying groups replaces it in full: existing custom groups and fields omitted from the array are deleted, while all system fields and the default group must be retained. Retain the IDs of groups and fields you want to keep. Every successful write creates a new immutable version, including metadata-only updates.
Unknown fields are rejected; at least one field to update must be provided in addition to service and id.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be updateTemplate. |
| id | String | Yes | Opaque template ID; do not assume UUID syntax. Minimum length 1 characters; Maximum length 128 characters |
| name | String | No | Minimum length 1 characters; Maximum length 30 characters |
| description | String | No | Maximum length 50 characters |
| enabled | Boolean | No | — |
| groups | List<TemplateGroupInput> | No | Minimum items 1; Maximum items 200 Nested fields: Template group fields |
| boundBrandIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 10,000 |
| boundCategoryIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 10,000 |
| isLibraryDefault | Boolean | No | — |
| syncStrategy | String | No | Allowed values: newOnly; Default: "newOnly" |
Response fields: 200; result.data: Template. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "updateTemplate",
"id": "template_example",
"description": "Updated by API"
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": "template_example",
"name": "Example template",
"description": "Updated by API",
"enabled": true,
"isSystemDefault": false,
"isLibraryDefault": false,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:05:00.000Z",
"boundBrandIds": [],
"boundCategoryIds": [],
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Delete template
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Soft-deletes the live template while retaining immutable versions used by existing products. Deleting the current library default template (isLibraryDefault: true) requires replacementForLibraryDefault set to another live template ID in the same library (omitting it returns 409 default_template_replacement_required; passing null or a non-existent, deleted, or self template ID returns 422 validation_failed). Removes bindings without rewriting existing product pins.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. replacementForLibraryDefault is optional unless deleting the current library default. In that case, provide a different live same-library template ID. The JSON body with service and id is always required. Historical versions remain available to pinned products.
Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be deleteTemplate. |
| id | String | Yes | Opaque template ID; do not assume UUID syntax. Minimum length 1 characters; Maximum length 128 characters |
| replacementForLibraryDefault | String | No | Required when deleting the library default. Minimum length 1 characters; Maximum length 128 characters |
Response fields: 200; result.data: DeletedTemplateId. Returns result.data.id, the deleted resource ID.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "deleteTemplate",
"id": "template_example",
"replacementForLibraryDefault": "template_replacement"
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": "template_example"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Products
Pinned templates and custom fields
Products save a template version at creation. Interpret templateFields using templateDefinition; later template edits or deletion do not change that version. updateProduct cannot change the template. templateFields uses pinned custom field IDs (field.id where isSystemField: false) as keys and shallow-merges on update; omitted values remain unchanged. System fields (name, sku, brand, category, description, mainImage) must be passed via top-level request parameters and are rejected in templateFields.
An explicit templateId takes priority. Otherwise a supplied categoryId resolves the category, ancestors, brand, then library default. Without a category, only the library default is considered, even when a brand is supplied.
| Field type | Input format and validation rules |
|---|---|
text, textarea, phone | String, trimmed when saved. Empty or whitespace-only strings clear to null; no phone regex is required. |
email | Valid email string; an empty string cannot clear it. |
url | Valid http:// or https:// URL string; an empty string cannot clear it. |
color | Hex color string: #RGB, #RRGGBB, or #RRGGBBAA; an empty string cannot clear it. |
number, currency | Finite JSON numbers only, not numeric strings or empty strings. |
date | Valid calendar date YYYY-MM-DD, or a valid date-time string beginning with that date and T; an empty string cannot clear it. |
dateRange | Exactly two valid date strings as above, [start, end], with start <= end; no objects or [] clearing. |
select, radio | String matching an option value in field config.options; empty-string clearing is not guaranteed. |
checkbox | Array of strings matching option values in field config.options; [] clears. |
image, file | Array of asset IDs returned by asset queries; [] clears. |
richtext | Unchanged string in html mode (whitespace is preserved); { "ops": [...] } in delta mode, with an array of objects that may contain internal nulls. |
No custom field accepts a root null input value. Omit a field to preserve its current value.
Drafts may omit required values, but supplied and merged fields must meet type and option rules. Publishing or editing a published product validates the complete product. A write may reference at most 100 media items across all fields (coverAssetId, imageAssetIds, relatedAssetIds, and all custom image/file fields), using existing same-library asset IDs (id returned by listAssets). Omitted media lists stay unchanged; [] clears them. Without coverAssetId, the first imageAssetIds image becomes the cover.
Synchronization and checkpoints
- Start with
"sync": "true", omittingupdatedAfterfor a full scan. For an incremental cycle, use the previous completedresult.pagination.syncedUntil. - Merge by product
idandupdatedAt, retaining the newer version. - Follow
result.pagination.nextCursorwith"sync": "true", "cursor": "<nextCursor>"until null, including whenresult.datais empty. - Save the completed
result.pagination.syncedUntilunchanged, not the last product timestamp.
Cursors bind the key, role, library, filters, and page size; keep them unchanged while paging. Start a new cycle after authorization or filter changes, and scan fully when the scope expands. Preserve all six fractional digits in checkpoints and sync updatedAt; JavaScript Date loses precision. Each cycle reads current state in [updatedAfter, syncedUntil), with the first request’s server time minus 30 seconds as its upper bound. Longer transactions may still affect completeness; this is not an event stream of every change.
Synchronization returns items in result.data and metadata in result.pagination: pageSize, syncedUntil, nextCursor, and hasMore. Copy the returned result.pagination.nextCursor into the next request’s cursor field; do not rename request fields or wrap business input in result.
Removing deleted or invisible products
Sync does not return deletion events. Periodically send local product IDs to Reconcile known product IDs, removing local copies marked not_visible. Visibility does not check business filters such as brand, category, or search. For a filtered replica, periodically reconcile the full filtered result or sync all visible products and filter locally.
Preview and download links
Use previewUrl to display product media. For originals, check downloadUrl; preview access does not establish download permission.
| Link | Availability | Maximum service-issued lifetime |
|---|---|---|
| Derived preview | Appropriate viewing permission | 3600 seconds |
| Original-image preview fallback | Images only; may also be returned to view_only | 300 seconds |
downloadUrl | Resolvable, visible association; usable, editable, or manage role | 300 seconds |
Every service-issued link is also bounded by the API key's expiry. Fetch product data again after a link expires; do not persist signed URLs as asset identifiers.
How do missing links, legacy media, and external previews behave?
- Non-image assets only return derived previews. Original PDFs, archives, and documents never serve as preview fallbacks. Library asset lookup and template configuration contain previews only.
- Missing download permission (
view_onlyrole) or an unresolved association omitsdownloadUrlanddownloadUrlExpiresAt. With permission (usable,editable, ormanagerole) but an unavailable original, those values may be null. - Stored external DAM thumbnails or previews are returned only to API keys without expiry, after excluding known original URLs. The provider controls their lifetime; short expiry and provider-signature validation are not guaranteed.
- For an API key with
expiresAt, an external preview whose expiry cannot be verified is null. Signature-like query parameters are not a trusted expiry source. - Service-issued URLs keep the limits above. Signing failure never falls back to a raw storage URL.
Which fields do covers, images, and related assets return?
cover is one media object, or null when there is no cover. images and relatedAssets are arrays of media objects. Custom image/file values may be arrays or null; unset fields may be omitted.
| Field | Type | Description |
|---|---|---|
id | Integer or null | Asset ID returned by listAssets / getAsset |
name, mimeType | String or null | File name and MIME type |
size | String or null | Decimal byte count, such as "2048"; never a JSON number |
width, height, duration | Number or null | Media dimensions and duration |
previewUrl | URL or null | Preview for display; null when unavailable |
downloadUrl | URL or null; may be omitted | Original file URL; returned only for usable, editable, or manage roles |
downloadUrlExpiresAt | Timestamp or null; may be omitted | Download URL expiry in RFC 3339 format |
ProductSummary response fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Resource ID. Positive integer ID, maximum 2147483647. |
| name | String | Name |
| spu | String | Product SKU. May be null |
| description | String | Description. May be null |
| status | String | Current status. Allowed values: draft, published |
| brandId | Integer | Brand ID. Positive integer ID, maximum 2147483647; May be null |
| categoryId | Integer | Category ID. Positive integer ID, maximum 2147483647; May be null |
| ownerUserId | Integer | Owner user ID. Positive integer ID, maximum 2147483647; May be null |
| publishedAt | String | RFC 3339 timestamp; preserve full precision. null for drafts. |
| createdAt | String | RFC 3339 timestamp; preserve full precision. |
| updatedAt | String | RFC 3339 timestamp; preserve full precision. |
| draftReason | String | Reason for draft status. May be null |
| templateId | String | Template ID. Minimum length 1 characters; Maximum length 128 characters; May be null |
| templateVersionId | String | Pinned template version ID. Minimum length 1 characters; Maximum length 128 characters; May be null |
| templateFields | Object | Values keyed by stable template field IDs. |
| cover | Object | Product cover. Unknown fields are rejected; May be null Nested fields: Cover media fields |
| images | List<PublicAsset> | Product images. Nested fields: Media fields |
| relatedAssets | List<PublicAsset> | Related assets. Nested fields: Media fields |
ProductDetail response fields
Other fields match the product list response fields.
| Field | Type | Description |
|---|---|---|
| templateDefinition | NullableTemplateDefinition | Pinned template definition. Nested fields: Product template definition |
List or synchronize products
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Ordinary pagination orders updatedAt/id descending. sync: "true" uses ascending (updatedAt,id), inclusive lower and exclusive fixed upper bound (server clock minus 30 seconds). A full scan omits updatedAfter; continue every nextCursor, even with an empty data page. Cursor binds key/role/library/filters/pageSize/bounds. Save syncedUntil verbatim only after exhaustion; replay/deduplicate by id and updatedAt. Long-running transactions exceeding the 30-second safety window may cross cycle boundaries. See Cursor synchronization. view_only/usable see only published products.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be listProducts. |
| page | Integer | No | Positive page number, default 1. Not available with sync: "true". |
| pageSize | Integer | No | Positive page size, default 20, capped at 100. |
| search | String | No | Trimmed case-insensitive substring matching product name or spu. |
| brandId | Integer | No | Filter by brand ID within this library. Positive integer ID, maximum 2147483647. |
| categoryId | Integer | No | Filter by exact category ID, not its descendants. Positive integer ID, maximum 2147483647. |
| status | String | No | Requested product status; does not widen role visibility. Allowed values: draft, published |
| sync | String | No | true selects bounded keyset synchronization; false is ordinary pagination. See Cursor synchronization. Allowed values: true, false; Default: "false" |
| updatedAfter | String | No | Only with sync: "true". Inclusive lower bound; RFC3339 Z/offset, 0..6 fractional digits, valid calendar/offset. Save and reuse syncedUntil as a string. Omit for a full scan. Format: date-time |
| cursor | String | No | Opaque continuation token, only with sync: "true" (see Cursor synchronization). Binds key, role, library, bounds, filters and page size. On continuation omit other parameters or repeat equivalent values. Minimum length 1 characters; Maximum length 8,192 characters |
Response fields: 200; result.data: List<ProductSummary>. field details See Requests and responses for pagination fields.
SyncPage (result.pagination fields):
| Field | Type | Description |
|---|---|---|
| pageSize | Integer | Number of items per page. Minimum: 1; Maximum: 100 |
| syncedUntil | String | server clock minus 30 seconds, fixed for the cycle. Save this exact string only after nextCursor is null. Format: date-time; Must match ^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{6}Z$ |
| nextCursor | String | Cursor for the next page; null after the scan is exhausted. Maximum length 8,192 characters; May be null |
| hasMore | Boolean | Whether another synchronization page is available |
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listProducts",
"page": 1,
"pageSize": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": null,
"status": "draft",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": null,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"draftReason": null,
"templateId": "template_example",
"templateVersionId": "version_one",
"templateFields": {
"field_color": "Blue"
},
"cover": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
},
"images": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
}
],
"relatedAssets": []
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"page": 1,
"pageSize": 20,
"totalCount": 1,
"totalPages": 1
}
},
"traceId": "trace_123"
}Response example (Synchronization):
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": null,
"status": "draft",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": null,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.123456Z",
"draftReason": null,
"templateId": "template_example",
"templateVersionId": "version_one",
"templateFields": {
"field_color": "Blue"
},
"cover": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
},
"images": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
}
],
"relatedAssets": []
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"pageSize": 20,
"syncedUntil": "2026-10-08T10:01:00.123456Z",
"nextCursor": null,
"hasMore": false
}
},
"traceId": "trace_123"
}Response example (Empty continuation page):
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"pageSize": 20,
"syncedUntil": "2026-10-08T10:01:00.123456Z",
"nextCursor": "opaque-continuation-token",
"hasMore": true
}
},
"traceId": "trace_123"
}Create a draft product
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Creates a draft product only. Resolves and pins a template version at creation; custom fields validate against that immutable definition. Attach existing same-library asset IDs (id returned by listAssets); direct file upload or remote URL import is not supported.
Required role: editable or manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Always creates a draft product. Explicit templateId must be a live same-library template and takes precedence. When templateId is omitted and a categoryId is supplied, resolution follows category or ancestor binding, then that category's brand binding, then library default. When categoryId is omitted, only the library default is considered, even if brandId is supplied. If no template resolves, the product has no template. Category must match resulting brand; owner must be a same-team member and defaults to null, not key creator. At most 100 total references across cover/images/related/custom media. Image slots require images; custom media must satisfy pinned count/size/type limits.
Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be createProduct. |
| name | String | No | Trimmed; optional/empty for draft. Maximum length 255 characters |
| spu | String | No | Trimmed; blank clears. Unique across all products in the library (including soft-deleted products). Maximum length 64 characters |
| description | String | No | Product description. Pass "" to clear to null. |
| brandId | Integer | No | Positive integer ID, maximum 2147483647. |
| categoryId | Integer | No | Positive integer ID, maximum 2147483647. |
| ownerUserId | Integer | No | Positive integer ID, maximum 2147483647. |
| templateId | String | No | Minimum length 1 characters; Maximum length 128 characters |
| templateFields | Object | No | Keyed by custom field id (isSystemField: false); shallow-merges on update, leaving omitted fields unchanged. System field IDs and unknown field IDs are rejected. Field types and options are validated even for drafts (see Pinned templates and custom fields). image/file values are arrays of asset IDs (id returned by listAssets), not URLs or objects. |
| coverAssetId | Integer | No | Positive integer ID, maximum 2147483647. |
| imageAssetIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 100 |
| relatedAssetIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 100 |
Response fields: 200; result.data: ProductDetail. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "createProduct",
"name": "Example product",
"spu": "EXAMPLE-001",
"brandId": 10,
"categoryId": 20,
"coverAssetId": 30,
"imageAssetIds": [
30
]
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": null,
"status": "draft",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": null,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"draftReason": null,
"templateId": "template_example",
"templateVersionId": "version_one",
"templateFields": {},
"cover": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
},
"images": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
}
],
"relatedAssets": [],
"templateDefinition": {
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
}
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Read a product and its pinned definition
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns an accessible live product with its pinned immutable template definition, even after the live template changes or is deleted. Media preview and download URLs are authorized on every response; downloadUrl requires role usable, editable, or manage. Drafts are invisible to view_only and usable.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be getProduct. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: ProductDetail. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "getProduct",
"id": 40
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": null,
"status": "draft",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": null,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"draftReason": null,
"templateId": "template_example",
"templateVersionId": "version_one",
"templateFields": {
"field_color": "Blue"
},
"cover": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
},
"images": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
}
],
"relatedAssets": [],
"templateDefinition": {
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
}
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Response example (No template or media):
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": null,
"status": "draft",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": null,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"draftReason": null,
"templateId": null,
"templateVersionId": null,
"templateFields": {},
"cover": null,
"images": [],
"relatedAssets": [],
"templateDefinition": null
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Response example (Authorized download):
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": null,
"status": "draft",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": null,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"draftReason": null,
"templateId": "template_example",
"templateVersionId": "version_one",
"templateFields": {
"field_color": "Blue"
},
"cover": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example",
"downloadUrl": "https://media.example.test/original?signature=example",
"downloadUrlExpiresAt": "2026-10-08T10:05:00.000Z"
},
"images": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example",
"downloadUrl": "https://media.example.test/original?signature=example",
"downloadUrlExpiresAt": "2026-10-08T10:05:00.000Z"
}
],
"relatedAssets": [],
"templateDefinition": {
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
}
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Partially update a product
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Merges top-level scalar/custom fields and replaces submitted media lists. Validates against the product's pinned immutable template version, even when the live template is deleted. Updating a published product keeps it published and validates all required fields and media rules against the resulting state atomically. Changing status (status) or switching templates (templateId / templateVersionId) is not supported here.
Required role: editable or manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Omitted fields remain unchanged; at least one field to update must be provided in addition to service and id. Supported empty strings ("") and empty arrays ([]) clear the corresponding fields. templateFields shallow-merges by custom field ID; media arrays replace their slot. If imageAssetIds is provided without coverAssetId, the first image becomes the cover. Updating a published product keeps it published and validates the full resulting state. templateId, templateVersionId, and status are rejected.
Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be updateProduct. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
| name | String | No | Trimmed; optional/empty for draft. Maximum length 255 characters |
| spu | String | No | Trimmed; blank clears. Unique across all products in the library (including soft-deleted products). Maximum length 64 characters |
| description | String | No | Product description. Pass "" to clear to null. |
| brandId | Integer | No | Positive integer ID, maximum 2147483647. |
| categoryId | Integer | No | Positive integer ID, maximum 2147483647. |
| ownerUserId | Integer | No | Positive integer ID, maximum 2147483647. |
| templateFields | Object | No | Keyed by custom field id (isSystemField: false); shallow-merges on update, leaving omitted fields unchanged. System field IDs and unknown field IDs are rejected. Field types and options are validated even for drafts (see Pinned templates and custom fields). image/file values are arrays of asset IDs (id returned by listAssets), not URLs or objects. Validates against the product's pinned template version, even if the live template was deleted. |
| coverAssetId | Integer | No | Positive integer ID, maximum 2147483647. |
| imageAssetIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 100 |
| relatedAssetIds | List<Integer> | No | Each item: Positive integer ID, maximum 2147483647; Maximum items 100 |
Response fields: 200; result.data: ProductDetail. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "updateProduct",
"id": 40,
"description": "Updated by API",
"templateFields": {
"field_color": "Blue"
}
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": "Updated by API",
"status": "draft",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": null,
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"draftReason": null,
"templateId": "template_example",
"templateVersionId": "version_one",
"templateFields": {
"field_color": "Blue"
},
"cover": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
},
"images": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
}
],
"relatedAssets": [],
"templateDefinition": {
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
}
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Soft-delete a product
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Soft-deletes a visible live product in the current library. Leaves historical template version snapshots intact. Repeating a delete on the same product returns 404.
Required role: editable or manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be deleteProduct. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: DeletedId. Returns result.data.id, the deleted resource ID.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "deleteProduct",
"id": 40
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 40
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Publish or return a product to draft
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Publishes a product or returns a published product to draft. Publishing validates all required fields, field types, options, and main image media rules in the product's pinned template version; invalid state returns 422 with field-level details and makes no changes. publishedAt is set on first publication, preserved on repeated publication, and cleared when returning to draft. Status transitions via Open API do not start an approval workflow.
Required role: editable or manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be setProductStatus. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
| status | String | Yes | Allowed values: draft, published |
Response fields: 200; result.data: ProductDetail. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "setProductStatus",
"id": 40,
"status": "published"
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 40,
"name": "Example product",
"spu": "EXAMPLE-001",
"description": null,
"status": "published",
"brandId": 10,
"categoryId": 20,
"ownerUserId": null,
"publishedAt": "2026-10-08T10:00:00.000Z",
"createdAt": "2026-10-08T10:00:00.000Z",
"updatedAt": "2026-10-08T10:00:00.000Z",
"draftReason": null,
"templateId": "template_example",
"templateVersionId": "version_one",
"templateFields": {
"field_color": "Blue"
},
"cover": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
},
"images": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
}
],
"relatedAssets": [],
"templateDefinition": {
"groups": [
{
"id": "group_details",
"name": "Details",
"isDefault": true,
"sortOrder": 0,
"fields": [
{
"id": "field_name",
"key": "name",
"name": "商品名称",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 0,
"isSystemField": true,
"systemKey": "name",
"config": {}
},
{
"id": "field_sku",
"key": "sku",
"name": "SKU",
"type": "text",
"required": true,
"placeholder": null,
"sortOrder": 1,
"isSystemField": true,
"systemKey": "sku",
"config": {}
},
{
"id": "field_main_image",
"key": "mainImage",
"name": "商品主图",
"type": "image",
"required": true,
"placeholder": null,
"sortOrder": 2,
"isSystemField": true,
"systemKey": "mainImage",
"config": {}
},
{
"id": "field_color",
"key": "color",
"name": "Color",
"type": "text",
"required": false,
"placeholder": null,
"sortOrder": 3,
"isSystemField": false,
"systemKey": null,
"config": {}
}
]
}
]
}
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Reconcile known product IDs
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Checks up to 100 known product IDs under the current API Key's visibility. Preserves input order and duplicates, and accepts an empty array []. not_visible does not distinguish deleted, missing, foreign-library, and role-hidden items (such as drafts hidden from view_only / usable roles). Call periodically to remove stale local entries.
Required role: any collaborator role.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. 0..100 IDs. Output preserves input order and duplicates; [] returns [].
Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be checkProductVisibility. |
| ids | List<Integer> | Yes | Each item: Positive integer ID, maximum 2147483647; Maximum items 100 |
Response fields: 200; result.data: List<Visibility>.
Visibility response fields:
| Field | Type | Description |
|---|---|---|
| id | Integer | Resource ID. Positive integer ID, maximum 2147483647. |
| visibility | String | Visibility of the submitted product ID. Allowed values: visible, not_visible |
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "checkProductVisibility",
"ids": [
40,
41
]
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": 40,
"visibility": "visible"
},
{
"id": 41,
"visibility": "not_visible"
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Assets
LibraryAsset response fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Resource ID. Positive integer ID, maximum 2147483647. |
| name | String | Name. May be null |
| mimeType | String | MIME type. May be null |
| size | String | Decimal byte count string; never a JSON number. Must match ^\d+$; May be null |
| width | Number | Width. May be null |
| height | Number | Height. May be null |
| duration | Number | Duration. May be null |
| previewUrl | String | Preview URL. Format: uri; May be null |
Find existing library assets
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Lists live non-folder assets in the current API Key's product library, ordered by id ascending. Returns previews (previewUrl) only, never original file download links. Use the returned asset id only for product covers/images (coverAssetId, imageAssetIds), related assets (relatedAssetIds), and custom image/file fields. Category icons use separate resource IDs; brands have no iconAssetId field. This API queries existing assets and does not support direct file uploads.
Required role: editable or manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be listAssets. |
| page | Integer | No | Positive page number, default 1. |
| pageSize | Integer | No | Positive page size, default 20, capped at 100. |
| search | String | No | Trimmed case-insensitive substring matching library asset name. |
| mimeType | String | No | Trimmed case-insensitive MIME prefix, for example image/ or application/pdf. |
Response fields: 200; result.data: List<LibraryAsset>. field details See Requests and responses for pagination fields.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listAssets",
"page": 1,
"pageSize": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"page": 1,
"pageSize": 20,
"totalCount": 1,
"totalPages": 1
}
},
"traceId": "trace_123"
}Read an existing library asset
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Returns preview and media metadata (without original file download links) for a specified live asset in the current product library.
Required role: editable or manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be getAsset. |
| id | Integer | Yes | Positive signed 32-bit resource ID. Positive integer ID, maximum 2147483647. |
Response fields: 200; result.data: LibraryAsset. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "getAsset",
"id": 30
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": {
"id": 30,
"name": "cover.jpg",
"mimeType": "image/jpeg",
"size": "9007199254740993",
"width": 1200,
"height": 900,
"duration": null,
"previewUrl": "https://media.example.test/preview?signature=example"
},
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111"
},
"traceId": "trace_123"
}Sharing
Which fields are in a record's product snapshots?
The products array in share and download records preserves product details at the time of the operation. Later product edits do not update it.
| Field | Type | Description |
|---|---|---|
id | Positive integer | Product ID |
name | String | Product name at the time of the operation |
spu | String or null | SKU at the time of the operation |
List team share history
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Lists share records created by all members and API Keys in the current product library, newest first by createdAt and id. Optional productId filters shares containing that product (returning the full share record including all product snapshots in that share); omitting productId returns all share records in the library. Unknown fields are rejected.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be listProductShares. |
| productId | Integer | No | Filter matching shares by one product ID. The full share record is returned, including all products in that share. Omit for all records in the current team. Positive integer ID, up to 2147483647. |
| page | Integer | No | Positive page number, default 1. |
| pageSize | Integer | No | Positive page size, default 20, capped at 100. |
Response fields: 200; result.data: List<ProductShare>. field details See Requests and responses for pagination fields.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listProductShares",
"page": 1,
"pageSize": 20
}'Create product share
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Creates a public share link for a fixed selection of 1–100 published products with a required 7, 30, or 90-day lifetime. accessCode is optional and must be a 4-digit number if supplied. Visitors need no login or API Key; products later returned to draft or deleted are automatically hidden from the live share. API Key expiry, deactivation, or collaborator removal does not revoke existing shares.
Required role: usable, editable or manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data. Unknown fields are rejected.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be createProductShare. |
| productIds | List<Integer> | Yes | Minimum items 1; Maximum items 100. Each ID is a positive integer up to 2147483647. |
| expiresInDays | Integer | Yes | Allowed values: 7, 30, 90 |
| accessCode | String | No | Must match ^[0-9]{4}$ |
| allowDownload | Boolean | Yes | Whether visitors are allowed to download product assets from the share page. |
Response fields: 200; result.data: ProductShare. field details
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "createProductShare",
"productIds": [
40
],
"expiresInDays": 7,
"allowDownload": false
}'Revoke product share
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Revokes a share in the current product library. Repeating a revocation idempotently returns the original revokedAt. Unknown or foreign-library share IDs return 404.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be revokeProductShare. |
| id | String | Yes | Opaque share identifier. Minimum length 1 characters; Maximum length 128 characters |
Response fields: 200; result.data: RevokedProductShare.
RevokedProductShare response fields:
| Field | Type | Description |
|---|---|---|
| id | String | Resource ID |
| revokedAt | String | Revocation time. Format: date-time |
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "revokeProductShare",
"id": "share-example"
}'Download history
About download records
History includes browser, member, share and existing API key operations across the team. requested means accepted, not transferred or saved locally. Product reads, previews and direct access to signed downloadUrl links do not create history records. The public product API provides no file-download or export operations; browser, member and share downloads and exports are unchanged.
Which fields are in a download record's file snapshots?
A download record's files array preserves file details when the operation is first accepted.
| Field | Type | Description |
|---|---|---|
id | String | File snapshot identifier |
productId | Positive integer | Associated product ID |
name | String | File name at the time of the operation |
ProductDownloadRecord response fields
| Field | Type | Description |
|---|---|---|
| id | String | Resource ID |
| kind | String | Operation kind. Allowed values: product_export, asset_download |
| status | String | Current status. Allowed values: requested, failed |
| actorType | String | Actor type. Allowed values: member, external, api_key |
| actorId | Integer | Actor ID. May be null |
| apiKeyId | String | API key ID. May be null |
| actorName | String | Actor name |
| shareId | String | Share ID. May be null |
| products | List<ProductLabelSnapshot> | Product snapshots. Nested fields: Product snapshot fields |
| files | List<FileLabelSnapshot> | File snapshots. Nested fields: File snapshot fields |
| createdAt | String | Creation time. Format: date-time |
List team download history
Endpoint: https://open.musedam.cc/api/muse/product-api
Method: POST
Description: Lists download and export records from all members, share visitors, and API Keys in the current product library, newest first by createdAt and id. Optional productId filters records containing that product (returning the complete operation including all product and file snapshots); omitting productId returns all records in the library. Unknown fields are rejected.
Required role: manage.
Request parameters:
The business fields below are siblings of service in the JSON body. Do not wrap them in params or data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | String | Yes | Service identifier; must be listProductDownloads. |
| productId | Integer | No | Filter matching activity by one product ID. The full operation is returned, including other products and files. Omit for all records in the current team. Positive integer ID, up to 2147483647. |
| page | Integer | No | Positive page number, default 1. |
| pageSize | Integer | No | Positive page size, default 20, capped at 100. |
Response fields: 200; result.data: List<ProductDownloadRecord>. field details See Requests and responses for pagination fields.
Request example:
curl --request POST 'https://open.musedam.cc/api/muse/product-api' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "listProductDownloads",
"page": 1,
"pageSize": 20
}'Response example
{
"code": "0",
"message": "OK",
"result": {
"success": true,
"data": [
{
"id": "download-example",
"kind": "product_export",
"status": "requested",
"actorType": "api_key",
"actorId": null,
"apiKeyId": "integration-key-id",
"actorName": "Catalog integration",
"shareId": null,
"products": [
{
"id": 40,
"name": "Example product",
"spu": "SKU-40"
}
],
"files": [
{
"id": "export:xlsx",
"productId": 40,
"name": "products.xlsx"
}
],
"createdAt": "2026-10-09T10:00:00.000Z"
}
],
"code": null,
"message": null,
"requestId": "11111111-1111-4111-8111-111111111111",
"pagination": {
"page": 1,
"pageSize": 20,
"totalCount": 1,
"totalPages": 1
}
},
"traceId": "trace_123"
}