Shoppers

Batch shopper purchase and browsing history

Changed on

Look up merchant-level purchase and browsing history for authorized shoppers identified by SHA-256 hash of their normalised (lowercase-trimmed) email address. Never send raw email addresses. Up to 20 queries per request. Each result contains a flat items array of merchant interactions, purchases first; unknown shoppers return an empty items array. Use history only within your authorized integration.

post/v1/shoppers/history

Request

  • Base URL
    https://api.openstock.sh
  • URL
    https://api.openstock.sh/v1/shoppers/history
  • Auth
    HTTP bearer

Request body

Example request

{
  "queries": [
    {
      "query_id": "q1",
      "email_sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe04294e576e50e46a7d3f5a4b8"
    }
  ]
}

Response

Per-query shopper history. Each result has a flat items array of merchant interactions. Unknown shoppers return an empty array.

Example response

{
  "results": [
    {
      "query_id": "q1",
      "items": [
        {
          "merchant_id": "01g4s5d0h956te86ff90h6xts4",
          "merchant_name": "Brooklinen",
          "type": "purchased"
        }
      ]
    }
  ]
}

Changes

    • warning

      changed the pattern of the request property // from ^[0-9a-f]{64}$ to ^[0-9a-fA-F]{64}$

    • info

      api operation id getShopperHistory was added

    • info

      removed the non-success response with the status