Products
Update product
PUT
/api/v1/products/:idUpdates a product's descriptive fields. Doesn't touch images, variants, or status — use the dedicated endpoints for those.
Requires Authorization
SELLER only
Authenticated action
Path parameters
idstringrequired | Must belong to one of the seller's shops. |
Body parameters
namestring | 2–100 characters. |
descriptionstring | 20–1000 characters. |
brandstring | |
unitstring | piece, kg, liter, or pack. |
weightGramsnumber | 1–500000. |
expiresAtstring | ISO date. Re-validated against the food & beverage expiry rule when present. |
Request
curl --request PUT \
--url https://api.swiftgoma.com/api/v1/products/:id \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Aline Mapendo",
"description": "<description>",
"brand": "<brand>",
"unit": "<unit>",
"weightGrams": "<weightGrams>",
"expiresAt": "<expiresAt>"
}'200Example response
{
"success": true,
"data": {
"id": "prod_7c8d9e",
"shopId": "shop_2b3c4d",
"subcategoryId": "sub_1a2b3c",
"name": "Riz parfumé 25kg",
"slug": "riz-parfume-25kg",
"description": "Riz parfumé de qualité supérieure, sac de 25kg, idéal pour la revente ou la consommation familiale.",
"brand": "Uncle Sam",
"unit": "piece",
"weightGrams": 25000,
"currency": "USD",
"status": "PUBLISHED",
"hasVariants": false,
"images": [
{
"id": "img_1",
"url": "https://res.cloudinary.com/dx3wclabo/image/upload/v1/products/riz-1.jpg",
"position": 0
}
],
"variants": [
{
"id": "var_4d5e6f",
"name": null,
"attributes": null,
"sku": null,
"price": "12.50",
"stock": 40,
"isDefault": true
}
],
"createdAt": "2026-01-10T09:00:00.000Z",
"updatedAt": "2026-01-14T10:32:00.000Z"
}
}