Skip to content
Splashify Pro
Docs

Get Users

Fetch the contacts in your Splashify workspace with arbitrary trait-level filters and pagination. Useful for syncing Splashify customers back into your data warehouse, building a custom segment outside the app, or auditing who you've imported.

Endpoint

POST

https://api.splashifypro.com/api/v1/public/apis/users/?offset=0&limit=100

Headers

Query parameters

Request body

The request body is a list of trait filters. Each filter targets a single trait (created_at_utc, email, phone_number, anything you've stored) and applies a comparison operator.

json
{
  "filters": [
    {
      "trait": "created_at_utc",
      "op": "gt",
      "val": "2021-09-08T11:35:47.089Z"
    },
    {
      "trait": "created_at_utc",
      "op": "lt",
      "supr_op": "and",
      "val": "2021-09-08T11:40:47.089Z"
    }
  ]
}

The first filter in the list does not need supr_op; every subsequent filter does.

Example

bash
curl -X POST 'https://api.splashifypro.com/api/v1/public/apis/users/?offset=0&limit=100' \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      {
        "trait": "created_at_utc",
        "op": "gt",
        "val": "2021-09-08T11:35:47.089Z"
      },
      {
        "trait": "created_at_utc",
        "op": "lt",
        "supr_op": "and",
        "val": "2021-09-08T11:40:47.089Z"
      }
    ]
  }'

Successful response — 200 OK

json
{
  "result": true,
  "message": "Customers",
  "data": {
    "total_customers": 1,
    "offset": 0,
    "limit": 100,
    "has_next_page": false,
    "customers": [
      {
        "id": "a537a43e-49b7-4306-9763-6a97417de0bb",
        "created_at_utc": "2021-08-27T08:48:02.970000",
        "modified_at_utc": "2021-08-27T08:48:03.112000",
        "phone_number": "9999999999",
        "country_code": "+376",
        "user_id": "",
        "traits": {
          "name": "John Doe",
          "email": null,
          "whatsapp_opted_in": true,
          "total_orders_count": 1,
          "last_order_id": 3993626378418,
          "last_order_name": "#1025",
          "total_spent": "7080.00",
          "address": {
            "address1": "abc",
            "address2": "test",
            "city": "Pune",
            "state": "Maharashtra",
            "country": "India",
            "zip_code": "411002"
          },
          "created_at": "2021-08-27T08:47:56",
          "currency": "INR",
          "first_name": "John",
          "last_name": "Doe"
        },
        "customer_created_at_source": "Shopify"
      }
    ]
  }
}

Pagination loop

text
let offset = 0;
const pageSize = 100;
while (true) {
  const r = await fetch(
    `https://api.splashifypro.com/api/v1/public/apis/users/?offset=${offset}&limit=${pageSize}`,
    { method: 'POST', headers, body: JSON.stringify({ filters: [] }) }
  ).then(r => r.json());
  for (const c of r.data.customers) await ingest(c);
  if (!r.data.has_next_page) break;
  offset += pageSize;
}