Create a product
Create one product per request, then use its SKU when submitting orders.
Endpoint
POST https://wms.fulfillio.si/api/v1/products
Content-Type: application/json
Include your secret apiKey in every request body. Call this API from your backend; see Authentication.
Minimal example
{
"apiKey": "YOUR_API_KEY",
"product": {
"sku": "T-SHIRT-BLUE-M",
"name": "Blue T-shirt, medium",
"valueInEur": 19.9,
"weightInGrams": 250
}
}
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your API key. |
product | object | Yes | One product object. |
warehouseCode | string | No | Warehouse code. Uses your account default when omitted. |
Product fields
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | Yes | Your SKU, trimmed and converted to uppercase. |
name | string | Yes | Product name. |
valueInEur | number | Yes | Product value in EUR, zero or greater. |
weightInGrams | integer | Yes | Weight in whole grams, zero or greater. |
imageUrl | string | No | Public image or PDF URL. Maximum: 20 MiB for images, 5 MiB for PDFs. |
externalBarcode | string | No | Product barcode as a string. |
customsCode | string | No | Customs tariff code. |
countryOfOrigin | string | No | Two-letter country code, e.g. SI. |
isBundle | boolean | No | Whether the product is a bundle. Defaults to false. |
isPrintableProduct | boolean | No | Set to true and supply a PDF URL for printable products. Defaults to false; cannot be combined with isBundle. |
Send numbers and booleans as JSON values, not strings. Unknown fields are rejected.
- Existing SKUs return the existing product without updating its details.
- Creating a product does not add stock.
- Missing or unavailable images produce warnings. Printable products require a valid PDF; PDF URLs automatically mark products as printable.
Response
Created — 201 Created
{
"productId": 1042,
"message": "Product created successfully",
"existing": false,
"warnings": [],
"eRacuniSync": null
}
An existing SKU returns 200 OK with the existing productId, "message": "Product already exists", and "existing": true.
warnings lists missing or unavailable images. eRacuniSync contains the synchronization result if you use e-Računi, otherwise null.
Errors
| Status | Meaning |
|---|---|
400 | Invalid request, unavailable warehouse, or invalid PDF. Check message and any issues in the response. |
401 | Invalid or inactive API key. |
403 | Account is archived. |
429 | Too many requests. Wait for the seconds specified by Retry-After. |
500 | Unable to create the product. |
Limit: 60 requests per minute per API key, with a shared V1 limit of 300 requests per minute per IP.
Code examples
Node.js (fetch)
const response = await fetch("https://wms.fulfillio.si/api/v1/products", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
apiKey: process.env.FULFILLIO_API_KEY,
product: {
sku: "T-SHIRT-BLUE-M",
name: "Blue T-shirt, medium",
valueInEur: 19.9,
weightInGrams: 250,
},
}),
})
const data = await response.json()
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${JSON.stringify(data)}`)
}
console.log(data.productId, data.warnings)
Python (requests)
import os
import requests
response = requests.post(
"https://wms.fulfillio.si/api/v1/products",
json={
"apiKey": os.environ["FULFILLIO_API_KEY"],
"product": {
"sku": "T-SHIRT-BLUE-M",
"name": "Blue T-shirt, medium",
"valueInEur": 19.9,
"weightInGrams": 250,
},
},
)
response.raise_for_status()
print(response.json())
PHP (cURL)
<?php
$payload = json_encode([
"apiKey" => getenv("FULFILLIO_API_KEY"),
"product" => [
"sku" => "T-SHIRT-BLUE-M",
"name" => "Blue T-shirt, medium",
"valueInEur" => 19.9,
"weightInGrams" => 250,
],
]);
$ch = curl_init("https://wms.fulfillio.si/api/v1/products");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;