Developer reference

PriceSense public API

Drop a bearer token into your stack and pull your tracked products with per-competitor latest snapshots — straight from PriceSense, into whatever your team already runs.

Mint a token
Sign in, open Settings → API tokens, click Generate API token. The raw string is shown once — paste it into your secret manager before dismissing the banner.

Tokens never expire on their own. When rotating, mint a new one and revokethe old row from the same card — soft-revoke keeps the audit trail so a future operator can answer "who had access between these dates".

Open the API-token card →
GET
/api/v1/watched-products

Returns your user's watched products with the latest scrape per competitor. The response is JSON, served without intermediate caches (Cache-Control: no-store).

Request
Bearer token in Authorization. Cookies are ignored — this endpoint is for non-browser clients.
GET https://pricesense.polsia.app/api/v1/watched-products
Authorization: Bearer psn_<43+ base64url chars>
Or from your shellcurl -sS -H "Authorization: Bearer $PRICESENSE_TOKEN" https://pricesense.polsia.app/api/v1/watched-products
Authentication
Authorization: Bearer <token> is the only accepted credential scheme. Anything else is 401.
  • 200 — JSON body matching the shape below.
  • 401— missing or malformed header, unknown hash, or revoked row. The response is intentionally empty so probing can't tell whether a token is wrong versus revoked.
  • Server errors — 5xx is a deploy-side event; retry with backoff. The endpoint never produces business 4xx codes — input validation happens in the dashboard mint UI.

Tokens are stored as a sha256 of the raw string. A leaked DB row by itself does not grant a working bearer — the raw string lives only in your secret manager / clipboard and is never re-served.

Response shape
Top-level items is an array; each entry corresponds to one of your tracked products. competitorSnapshots exposes the latest scrape per sourceHost (one row per competitor tied to that product).
{
  "items": [
    {
      "id": "cklmzt6b40001abc123def456",
      "label": "Wireless Headphones Pro",
      "url": "https://store.example.com/headphones-pro",
      "brand": "Example",
      "lastSeenPrice": "129.99",
      "lastCheckedAt": "2026-08-06T11:24:00.000Z",
      "competitorSnapshots": [
        {
          "sourceHost": "amazon.com",
          "name": "Amazon",
          "latestPrice": "118.50",
          "currency": "USD",
          "status": "ok",
          "latestScrapedAt": "2026-08-06T10:50:00.000Z"
        },
  ...