Products
Create, list, retrieve, update, and deactivate products (SKUs).
- Base path:
/api/integrations/v1/products/ - Required scope:
integrations.products.{read|write|delete} - Identifier:
sku
Create product
POST /api/integrations/v1/products/
Body
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | Yes | Unique SKU code |
quantity | integer | No | On-hand quantity (default 0) |
is_active | boolean | No | Default true |
custom_fields | object | No | Arbitrary attribute key/value pairs |
- curl
- Python
- Node.js
curl -X POST https://<your-tenant>.datamingle.ai/api/integrations/v1/products/ \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"sku": "RUG-NEW-001",
"quantity": 100,
"custom_fields": {"color": "blue", "size": "5x7", "collection": "2026 Spring"}
}'
import requests
res = requests.post(
"https://<your-tenant>.datamingle.ai/api/integrations/v1/products/",
headers={"X-API-Key": "sk_live_..."},
json={
"sku": "RUG-NEW-001",
"quantity": 100,
"custom_fields": {"color": "blue", "size": "5x7"},
},
timeout=30,
)
await fetch(
"https://<your-tenant>.datamingle.ai/api/integrations/v1/products/",
{
method: "POST",
headers: {
"X-API-Key": "sk_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
sku: "RUG-NEW-001",
quantity: 100,
custom_fields: { color: "blue", size: "5x7" },
}),
},
);
Response 201 Created
{
"success": true,
"data": {
"id": "...",
"sku": "RUG-NEW-001",
"quantity": 100,
"is_active": true,
"cost": null,
"custom_fields": {"color": "blue", "size": "5x7"}
}
}
Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing sku |
| 422 | MAPPING_ERROR | Mapping engine failed |
| 409 | DUPLICATE | SKU already exists |
List products
GET /api/integrations/v1/products/
Returns a cursor-paginated list of active products, newest-first.
Query parameters: limit (1–200, default 50), cursor (opaque). See Pagination.
curl 'https://<your-tenant>.datamingle.ai/api/integrations/v1/products/?limit=100' \
-H "X-API-Key: sk_live_..."
{
"success": true,
"data": [
{
"id": "...",
"sku": "RUG-5X7-BLU",
"quantity": 150,
"is_active": true,
"cost": "29.99",
"custom_fields": {"color": "blue", "size": "5x7"}
}
],
"pagination": {"limit": 100, "next_cursor": "eyJjIjoi..."}
}
Get product
GET /api/integrations/v1/products/{sku}/
Returns the full product record. 404 NOT_FOUND if the SKU doesn't exist.
curl https://<your-tenant>.datamingle.ai/api/integrations/v1/products/RUG-5X7-BLU/ \
-H "X-API-Key: sk_live_..."
Update product
PUT /api/integrations/v1/products/{sku}/
| Field | Type | Notes |
|---|---|---|
quantity | integer | |
is_active | boolean | |
cost | decimal | String or number |
custom_fields | object | Replaces the full object |
curl -X PUT https://<your-tenant>.datamingle.ai/api/integrations/v1/products/RUG-5X7-BLU/ \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{"quantity": 200, "cost": "32.50", "custom_fields": {"color": "blue", "size": "5x7"}}'
Deactivate product
DELETE /api/integrations/v1/products/{sku}/
Soft delete — is_active = false.
curl -X DELETE https://<your-tenant>.datamingle.ai/api/integrations/v1/products/RUG-5X7-BLU/ \
-H "X-API-Key: sk_live_..."
{
"success": true,
"data": {"id": "...", "sku": "RUG-5X7-BLU", "is_active": false}
}