API reference

Get a product

GET
/v1/storefront/products/{id}

One product with its versions, selling units, prices, extras and stock.

Authorization

publishableKey
headerAuthorizationBearer <pk_live_…>

The shop’s publishable key, from Settings, Developers in Cashiar. Safe to use in a browser.

Path Parameters

id*string

Response Body

application/json
  1. response
id*string
name*string
description*string|null
unitName*string
category*string|null
imageUrl*string|null
priceTypes*array<>
versions*array<>
addonGroups*array<>
soldOut*boolean
Example Request
curl -X GET 'https://api.cashiar.app/v1/storefront/products/string'
Example Response200
{
  "id": "string",
  "name": "string",
  "description": "string",
  "unitName": "string",
  "category": "string",
  "imageUrl": "string",
  "priceTypes": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "versions": [
    {
      "variantId": "string",
      "name": "string",
      "imageUrl": "string",
      "sellingPrice": 0,
      "prices": [
        {
          "priceListId": "string",
          "sellingPrice": 0
        }
      ],
      "inStock": true,
      "sellingUnits": [
        {
          "id": "string",
          "name": "string",
          "sellingPrice": 0,
          "prices": [
            {
              "priceListId": "string",
              "sellingPrice": 0
            }
          ]
        }
      ]
    }
  ],
  "addonGroups": [
    {
      "id": "string",
      "name": "string",
      "mode": "one",
      "required": true,
      "options": [
        {
          "id": "string",
          "name": "string",
          "sellingPrice": 0,
          "preselected": true
        }
      ]
    }
  ],
  "soldOut": true
}