POST
/
api
/
service
/
customer
/
search
JavaScript
import Ivy from '@getivy/node-sdk';

const client = new Ivy({
  apiKey: 'My API Key',
});

const response = await client.customers.search();

console.log(response.count);
{
  "items": [
    {
      "id": "<string>",
      "email": "<string>",
      "emailAddress": "<string>",
      "phone": "<string>",
      "fullName": "<string>",
      "dateOfBirth": "<string>",
      "address": {
        "line1": "<string>",
        "line2": "<string>",
        "city": "<string>",
        "region": "02",
        "zipCode": "<string>",
        "country": "AF"
      },
      "bankAccounts": [
        {
          "last4digits": "<string>",
          "bank": {
            "id": "<string>",
            "logo": "<string>",
            "name": "<string>"
          }
        }
      ],
      "deleted": true,
      "deletedAt": "2023-11-07T05:31:56Z",
      "metadata": {}
    }
  ],
  "count": 123,
  "skip": 123,
  "hasNext": true
}

Authorizations

X-Ivy-Api-Key
string
header
required

API key for authentication

Body

application/json
email
string

Search for customers by email

phone
string

Search for customers by phone

limit
number

A limit on the number of objects to be returned.

Required range: x > 0
skip
number

The number of items to skip

Required range: x > 0

Response

200 - application/json

Successful response

items
object[]
required

Array of customer objects matching the search criteria

count
number
required

The total number of items

skip
number
required

The number of items skipped

hasNext
boolean
required

Whether there are more items to retrieve