API reference

List products

GET
/v1/storefront/products

Products on sale online, a page at a time: search by name, filter by collection, sort by name or newest. Pass nextCursor back as cursor for the next page.

Authorization

publishableKey
headerAuthorizationBearer <pk_live_…>

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

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
q?string
Lengthlength <= 100
collection?string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
sort?string
Value in"name""-name""newest""-newest"

Response Body

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.cashiar.app/v1/storefront/products'
Example Response200
{
  "items": [
    {
      "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
    }
  ],
  "nextCursor": "string"
}