Skip to main content

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​

FieldTypeRequiredDescription
apiKeystringYesYour API key.
productobjectYesOne product object.
warehouseCodestringNoWarehouse code. Uses your account default when omitted.

Product fields​

FieldTypeRequiredDescription
skustringYesYour SKU, trimmed and converted to uppercase.
namestringYesProduct name.
valueInEurnumberYesProduct value in EUR, zero or greater.
weightInGramsintegerYesWeight in whole grams, zero or greater.
imageUrlstringNoPublic image or PDF URL. Maximum: 20 MiB for images, 5 MiB for PDFs.
externalBarcodestringNoProduct barcode as a string.
customsCodestringNoCustoms tariff code.
countryOfOriginstringNoTwo-letter country code, e.g. SI.
isBundlebooleanNoWhether the product is a bundle. Defaults to false.
isPrintableProductbooleanNoSet 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​

StatusMeaning
400Invalid request, unavailable warehouse, or invalid PDF. Check message and any issues in the response.
401Invalid or inactive API key.
403Account is archived.
429Too many requests. Wait for the seconds specified by Retry-After.
500Unable 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;