Skip to main content
GET
/
api
/
products
/
{id}
Get product by ID with sales and stock analytics
curl --request GET \
  --url https://app.solya.app/api/products/{id} \
  --header 'Authorization: Bearer <token>'
{
  "averagePrice": 122.6,
  "avgGrossMarginPct": 55,
  "avgSellingPrice": 122.65,
  "brandName": "Sézane",
  "family": "Robes",
  "id": "product-uuid-1",
  "imageUrl": "https://cdn.example.com/products/robe-angele.jpg",
  "monthlySales": 23,
  "name": "Robe Angèle",
  "shopCount": 6,
  "sizesAvailable": [
    "XS",
    "S",
    "M",
    "L"
  ],
  "stockValue": 2473.49,
  "tags": [
    "Overstock - +30 jours"
  ],
  "totalCogs": 1269.38,
  "totalDiscount": 0,
  "totalGrossMargin": 1551.52,
  "totalGrossSales": 2820.9,
  "totalNetSales": 2820.9,
  "totalQuantity": 217,
  "totalTransactions": 17,
  "totalUnitsSold": 23,
  "variantCount": 4
}

Authorizations

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Path Parameters

id
string
required

Unique identifier of the resource (UUID)

Response

Successful response

data
object
required
success
enum<boolean>
required
Available options:
true