Skip to main content
GET
/
api
/
inventory
/
variants
/
{productId}
Get product variant stock by shop and size
curl --request GET \
  --url https://app.solya.app/api/inventory/variants/{productId} \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "shopId": "shop-uuid-paris-opera",
      "shopName": "Paris Opéra",
      "size": "41",
      "sizeId": "sz-uuid-41",
      "stock": 3,
      "variant": "White / Black",
      "variantId": "var-uuid-nike-air-wb"
    },
    {
      "shopId": "shop-uuid-paris-opera",
      "shopName": "Paris Opéra",
      "size": "42",
      "sizeId": "sz-uuid-42",
      "stock": 8,
      "variant": "White / Black",
      "variantId": "var-uuid-nike-air-wb"
    },
    {
      "shopId": "shop-uuid-lyon-bellecour",
      "shopName": "Lyon Bellecour",
      "size": "42",
      "sizeId": "sz-uuid-42",
      "stock": 2,
      "variant": "White / Black",
      "variantId": "var-uuid-nike-air-wb"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

productId
string
required

Product identifier for which to retrieve variant and stock data

Minimum string length: 1

Response

Successful response

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