SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Products

Create product

POST/api/v1/products

Creates a product as a draft in one of the seller's own shops. Requires an active subscription with enough remaining product and photo quota.

Requires Authorization
SELLER only
Authenticated action

Form fields

shopIdstringrequired
Must belong to the authenticated seller.
subcategoryIdstringrequired
Subcategory the product belongs to.
namestringrequired
2–100 characters.
descriptionstringrequired
20–1000 characters.
brandstring
unitstring
piece, kg, liter, or pack. Defaults to piece.
weightGramsnumber
1–500000.
expiresAtstring
ISO date. Required, and must be in the future, for food & beverage products.
currencystringrequired
USD or CDF.
variantsstringrequired
JSON array of { name?, sku?, price, stock, attributes? }. At least one, max 50.
imagesfile
Up to 10 image files.

Possible errors

409CONFLICTVotre plan (Starter) autorise au maximum 20 produit(s). Passez à un plan supérieur pour en ajouter davantage.

Notes

  • New products are created with status DRAFT — publish them with POST /:id/status.
Request
curl --request POST \
  --url https://api.swiftgoma.com/api/v1/products \
  --header 'Authorization: Bearer <access_token>' \
  --form 'shopId=<shopId>' \
  --form 'subcategoryId=<subcategoryId>' \
  --form 'name=<name>' \
  --form 'description=<description>' \
  --form 'brand=<brand>' \
  --form 'unit=<unit>' \
  --form 'weightGrams=<weightGrams>' \
  --form 'expiresAt=<expiresAt>' \
  --form 'currency=<currency>' \
  --form 'variants=<variants>' \
  --form 'images=@/path/to/file.jpg'
201Example 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"
  }
}