emfasemfas

Update product

Creates or updates a product (upsert). Returns 201 if created, 200 if updated.

PATCH
/products/{identifier}
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Path Parameters

identifierstring

Product identifier

Product data

assets?array<v1.CreateAssetRequest>

Replaces the product's complete set of connected assets; any asset left out is unlinked. Omit to leave existing links untouched. To add without replacing, use POST /products/{identifier}/assets.

familyId?integer

ID of the product family to assign (optional)

name?string

Human-readable product name (optional, only updates if provided)

values?object

Attribute values keyed by attribute key (without entity prefix). Use formats like "123.45 SEK" for prices and "5.5 kg" for weights.

Empty Object

variants?array<v1.CreateVariantRequest>

Variants to create or update under this product

Response Body

curl -X PATCH "https://api.emfas.ai/v1/products/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "result": {
    "identifier": "my-product-123",
    "name": "Blue T-Shirt",
    "selfUpdatedAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}
{
  "result": {
    "identifier": "my-product-123",
    "name": "Blue T-Shirt",
    "selfUpdatedAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}