Products API
Create a product
Creates a product. JSON and multipart requests can upload images in a single call. Required scope: products:write.
POST/v1/accounts/{account_id}/products
Authentication
Requires bearer authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
account_id | path | string | Yes | Opaque external account identifier. |
Idempotency-Key | header | string | No | Optional deduplication key for POST and PATCH requests. Cached responses are replayed for 24 hours. |
Request body
This request body is required.
Product creation payload. Use multipart/form-data when uploading files.
application/json
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | Yes | |
description | string | No | |
price | number | Yes | |
original_price | number | No | |
delivery_price | number | No | |
product_type | string | Yes | Allowed: physical, service |
images | array | No |
The example below includes optional fields for context; only fields marked Yes are always required. Conditional requirements are listed in Notes.
{
"title": "Atlas Resistance Band Kit",
"description": "Compact fitness kit for home workouts.",
"price": 149,
"original_price": 199,
"delivery_price": 8,
"product_type": "physical",
"images": [
"https://cdn.demarky.ai/products/atlas-band-front.webp",
"https://cdn.demarky.ai/products/atlas-band-packaging.webp"
]
}
multipart/form-data
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | Yes | |
description | string | No | |
price | string | Yes | Numeric string accepted by the form parser. |
original_price | string | No | |
delivery_price | string | No | |
product_type | string | Yes | Allowed: physical, service |
images | object | No |
The example below includes optional fields for context; only fields marked Yes are always required. Conditional requirements are listed in Notes.
{
"title": "Atlas Resistance Band Kit",
"description": "Compact fitness kit uploaded with multipart/form-data.",
"price": 149,
"product_type": "physical"
}
Response
{
"data": {
"id": "123e4567-e89b-42d3-a456-426614174000",
"title": "Atlas Resistance Band Kit",
"description": "Compact fitness kit for home workouts.",
"price": 149,
"original_price": 199,
"delivery_price": 8,
"preview_image_url": "https://cdn.demarky.ai/products/atlas-band-front.webp",
"created_at": "2026-04-28T09:32:01.000Z",
"product_type": "physical",
"images": [
{
"id": "3afebd17-8522-46fb-8d7c-21318168a14b",
"url": "https://cdn.demarky.ai/products/atlas-band-front.webp",
"media_type": "image/webp",
"display_order": 0,
"created_at": "2026-04-28T09:32:01.000Z"
}
]
}
}
cURL example
curl -X POST https://api.demarky.ai/v1/accounts/acct_0123456789abcdefghjkmnpqrs/products \
-H "Authorization: Bearer dmk_at_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"title": "Atlas Resistance Band Kit",
"description": "Compact fitness kit for home workouts.",
"price": 149,
"original_price": 199,
"delivery_price": 8,
"product_type": "physical",
"images": [
"https://cdn.demarky.ai/products/atlas-band-front.webp",
"https://cdn.demarky.ai/products/atlas-band-packaging.webp"
]
}'
List products
Lists the authenticated account's products with filters, sorting, and cursor pagination. Required scope: products:read.
GET/v1/accounts/{account_id}/products
Authentication
Requires bearer authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
account_id | path | string | Yes | Opaque external account identifier. |
product_type | query | string | No | |
q | query | string | No | |
created_after | query | string | No | |
created_before | query | string | No | |
cursor | query | string | No | Opaque pagination cursor returned by the previous page. |
per_page | query | integer | No | Page size between 1 and 100. |
sort | query | string | No |
Response
{
"data": [
{
"id": "123e4567-e89b-42d3-a456-426614174000",
"title": "Atlas Resistance Band Kit",
"description": "Compact fitness kit for home workouts.",
"price": 149,
"original_price": 199,
"delivery_price": 8,
"preview_image_url": "https://cdn.demarky.ai/products/atlas-band-front.webp",
"created_at": "2026-04-28T09:32:01.000Z",
"product_type": "physical"
}
],
"pagination": {
"next_cursor": null,
"has_more": false
}
}
cURL example
curl -X GET https://api.demarky.ai/v1/accounts/acct_0123456789abcdefghjkmnpqrs/products \
-H "Authorization: Bearer dmk_at_live_xxx"
Get a product
Returns product details, upload metadata, and ordered image assets. Required scope: products:read.
GET/v1/accounts/{account_id}/products/{id}
Authentication
Requires bearer authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
account_id | path | string | Yes | Opaque external account identifier. |
id | path | string | Yes | Product identifier. |
Response
{
"data": {
"id": "123e4567-e89b-42d3-a456-426614174000",
"title": "Atlas Resistance Band Kit",
"description": "Compact fitness kit for home workouts.",
"price": 149,
"original_price": 199,
"delivery_price": 8,
"preview_image_url": "https://cdn.demarky.ai/products/atlas-band-front.webp",
"created_at": "2026-04-28T09:32:01.000Z",
"product_type": "physical",
"images": [
{
"id": "3afebd17-8522-46fb-8d7c-21318168a14b",
"url": "https://cdn.demarky.ai/products/atlas-band-front.webp",
"media_type": "image/webp",
"display_order": 0,
"created_at": "2026-04-28T09:32:01.000Z"
}
]
}
}
cURL example
curl -X GET https://api.demarky.ai/v1/accounts/acct_0123456789abcdefghjkmnpqrs/products/f62fba7d-5af6-4741-b94b-6c362d3317af \
-H "Authorization: Bearer dmk_at_live_xxx"
Update a product
Updates product fields and media ordering. Multipart requests can upload replacement images. Required scope: products:write.
PATCH/v1/accounts/{account_id}/products/{id}
Authentication
Requires bearer authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
account_id | path | string | Yes | Opaque external account identifier. |
id | path | string | Yes | Product identifier. |
Idempotency-Key | header | string | No | Optional deduplication key for POST and PATCH requests. Cached responses are replayed for 24 hours. |
Request body
This request body is required.
Product update payload.
application/json
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | No | |
description | string or null | No | |
price | number | No | |
original_price | number or null | No | |
delivery_price | number or null | No | |
product_type | string | No | Allowed: physical, service |
images | array | No | |
remove_image_ids | array | No | |
reorder_images | array | No | |
reorder_images[].id | string (uuid) | Yes | |
reorder_images[].display_order | integer | Yes |
The example below includes optional fields for context; only fields marked Yes are always required. Conditional requirements are listed in Notes.
{
"price": 139,
"reorder_images": [
{
"id": "3afebd17-8522-46fb-8d7c-21318168a14b",
"display_order": 0
}
]
}
multipart/form-data
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | No | |
description | string | No | Send an empty string to clear the field. |
price | string | No | |
original_price | string | No | |
delivery_price | string | No | |
product_type | string | No | Allowed: physical, service |
images | object | No | |
remove_image_ids | object | No | |
reorder_images | object | No |
The example below includes optional fields for context; only fields marked Yes are always required. Conditional requirements are listed in Notes.
{
"price": 139,
"reorder_images": [
{
"id": "3afebd17-8522-46fb-8d7c-21318168a14b",
"display_order": 0
}
]
}
Response
{
"data": {
"id": "123e4567-e89b-42d3-a456-426614174000",
"title": "Atlas Resistance Band Kit",
"description": "Compact fitness kit for home workouts.",
"price": 149,
"original_price": 199,
"delivery_price": 8,
"preview_image_url": "https://cdn.demarky.ai/products/atlas-band-front.webp",
"created_at": "2026-04-28T09:32:01.000Z",
"product_type": "physical",
"images": [
{
"id": "3afebd17-8522-46fb-8d7c-21318168a14b",
"url": "https://cdn.demarky.ai/products/atlas-band-front.webp",
"media_type": "image/webp",
"display_order": 0,
"created_at": "2026-04-28T09:32:01.000Z"
}
]
}
}
cURL example
curl -X PATCH https://api.demarky.ai/v1/accounts/acct_0123456789abcdefghjkmnpqrs/products/f62fba7d-5af6-4741-b94b-6c362d3317af \
-H "Authorization: Bearer dmk_at_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"price": 139,
"reorder_images": [
{
"id": "3afebd17-8522-46fb-8d7c-21318168a14b",
"display_order": 0
}
]
}'
Delete a product
Soft-deletes a product. Required scope: products:write.
DELETE/v1/accounts/{account_id}/products/{id}
Authentication
Requires bearer authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
account_id | path | string | Yes | Opaque external account identifier. |
id | path | string | Yes | Product identifier. |
cURL example
curl -X DELETE https://api.demarky.ai/v1/accounts/acct_0123456789abcdefghjkmnpqrs/products/f62fba7d-5af6-4741-b94b-6c362d3317af \
-H "Authorization: Bearer dmk_at_live_xxx"