emfasemfas

Create product

Creates a product. Returns 409 if the identifier already exists.

POST
/products
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Product to create

assets?array<v1.CreateAssetRequest>

Sets the product's complete set of connected assets. On an existing product any asset left out is unlinked.

familyId?integer

ID of the product family to assign (optional)

identifierstring

Unique external identifier for the product

namestring

Human-readable product name

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 under this product

Response Body

curl -X POST "https://api.emfas.ai/v1/products" \  -H "Content-Type: application/json" \  -d '{    "identifier": "my-product-123",    "name": "Blue T-Shirt"  }'
{
  "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"
}
{
  "error": "Internal server error"
}