Account User(s)

This action retrieves information about user(s) in your White Swan account. This does not include Referred Clients.

A White Swan for partners account allows you an unlimited amount of account users for free and offers permission control functions to manage your team.

API Method:

Fetch User(s)

POST https://app.whiteswan.io/api/1.1/wf/user

Returns information about users associated with your White Swan account.

Headers

NameTypeDescription

Authorization*

String

Bearer <YOUR API KEY>

Content-Type*

String

application/json

Accept*

String

application/json

user-agent*

String

<YOUR APP>

Request Body

NameTypeDescription

JSON Body*

Object

See specification below

Sample Body Payload
{
"user_email": "jane@gmail.com"
}

Please note that the sample body payload above contains all possible parameters for your reference. In an actual call, you don't need to use all (or any) parameters.

Code Examples - Making the API Call:

curl -X POST "https://app.whiteswan.io/api/1.1/wf/user" \
     -H "Authorization: Bearer <YOUR API KEY>" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -H "User-Agent: <YOUR APP>" \
     -d '{
               "user_email": "jane@gmail.com"
          }'

Code examples are available in cURL, Python, Javascript, Java, PHP, Ruby, and Go, but can be constructed for other languages and tools. Some code examples include dependencies that may need to be installed in your codebase to ensure functionality. Remember to replace any values in the code that looks like <VALUE> and to adapt the parameter values passed.


Body Parameters Specification:

Field LabelField KeyField TypeExample ValueDescription

User Email

user_email

Text

john.doe@example.com

Optionally, you can get a specific user by specifying their email here.


Sample Return Payload
[{
"name": "John Doe",
"email": "john.doe@example.com",
"permission": "Admin",
"clients_referred": [
  {
    "name": "Alice Johnson",
    "email": "alice.johnson@example.com",
    "associated_request_ids": [
      "1234567890x0987654321"
    ],
    "associated_plan_ids": [
      "1234567890x1122334455"
    ]
  }
],
"other_partners_referred": [
  {
    "name": "Sample Bank",
    "count_of_requests": 5,
    "count_of_issued_policies": 2
  }
],
"total_amount_credited": 10000
}]

Returned Parameters Specification:

Field LabelField KeyField TypeExample ValueDescription

User Name

name

Text

John Doe

The name of the account user.

User Email

email

Text

john.doe@example.com

The email address of the account user.

User Permission Level

permission

Text

Admin

The permission level assigned to the account user.

Referred Clients

clients_referred

Object List

-

Details of clients referred by the account user.

-Full Name

name

Text

Alice Johnson

The name of the client referred by the account user.

-Email

email

Text

alice.johnson@example.com

The email address of the client referred by the account user.

-Associated Request(s) ID

associated_request_ids

List

1234567890x0987654321

The ID of the plan request(s) associated with the referred client.

-Associated Plan(s) ID

associated_plan_ids

List

1234567890x1122334455

The ID of the personal plan(s) associated with the referred client.

Referred Partners

other_partners_referred

Object List

-

Details of other partners referred by the account user.

-Partner Name

name

Text

Sample Bank

The name of other partners referred by the account user.

-Count of Requests

count_of_requests

Number

5

The number of requests associated with the other partner referred by the account user.

-Count of Issued Policies

count_of_issued_policies

Number

2

The number of issued policies associated with the other partner referred by the account user.

Total Amount Credited for User Associated Referrals

total_amount_credited

Number

10000

The total amount credited to the account user for their associated end-user and client referrals.

Last updated