Link Search Menu Expand Document

Searching Users

curl "-XPOST -v -k \
-H 'Session-User-Id:<your user ID>' \
-H 'Session-Key:<your session key>' \
-H 'Session-Chain-Id:<your chain ID>' \
-d 'chain_id=<your chain ID>’ \
-d 'query=smith’ \
-d 'page=1 \
-d 'count=25 \
-d 'opted_in=1 \


Example response

		"id": 12345678,
		"entity_code": {
			"code": "100002"
		"username": "",
		"firstname": "John",
		"lastname": "Smith",
		"created_date": "2017-10-19T12:46:34Z",
		"gender": "M",
		"birthday": "1982-06-30T00:00:00Z",
		"spaaza_opted_in": true,
		"country_code": "NL",
		"store_id": ""
		"id": 12345679,
		"entity_code": {
			"code": "100003"
		"username": "",
		"firstname": "Jane",
		"lastname": "Smith",
		"created_date": "2017-10-29T13:24:33Z",
		"gender": "M",
		"birthday": "1979-04-29T00:00:00Z",
		"spaaza_opted_in": true,
		"country_code": "UK",
		"store_id": "12"


  • Call name: search
  • Endpoint URL: https://services-[API_ENVIRONMENT]
  • Request methods: HTTP POST
  • Auth required: yes

You can use this API endpoint to search for users in Spaaza.

The API_ENVIRONMENT value varies according to whether the request is being made to Spaaza’s production or staging API:

Environment API_ENVIRONMENT value
Production prod
Staging test01


The following headers are required:

Header Description
Session-User-Id ID of the user obtained from the login endpoint
Session-Key key of the session obtained from the login endpoint
Session-Chain-Id the ID of the Spaaza chain or retailer

The following authentication methods are permitted:

Method Description
admin A session generated by administrative user login.

Query Parameters (application/x-www-form-urlencoded)

This API accepts the following parameters:

Parameter Description
chain_id (integer, required) The ID of the Spaaza chain or retailer
page (integer, required) The page number of desired results
query (string, optional) End-user supplied search term(s)
count (integer, optional) Number of results to return
opted_in (boolean, optional) Filter the search to opted-in users. To search for all users do not pass this parameter.