SwiftGoma.SwiftGoma

Search endpoints

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

Stock

Get stock history

GET/api/v1/products/variants/:variantId/stock/history

Lists every stock movement recorded for a variant, most recent first.

Requires Authorization
SELLER only
Session

Path parameters

variantIdstringrequired
Must belong to one of the seller's shops.

Query parameters

pagenumber
Defaults to 1.
limitnumber
Max 100. Defaults to 20.
Request
curl --request GET \
  --url https://api.swiftgoma.com/api/v1/products/variants/:variantId/stock/history \
  --header 'Authorization: Bearer <access_token>'
200Example response
{
  "success": true,
  "data": {
    "movements": [
      {
        "id": "mv_1a2b3c",
        "variantId": "var_4d5e6f",
        "type": "RESTOCK",
        "amount": 20,
        "reason": "Réapprovisionnement fournisseur",
        "stockBefore": 20,
        "stockAfter": 40,
        "createdAt": "2026-02-10T14:00:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 1,
      "totalPages": 1
    }
  }
}