PAI Health logo

Developers

PAI Health API - Admin

Download OpenAPI specification:Download

PAI Health Admin services

Authentication

jwtAdminAuthorizer

Security scheme type: API Key
Header parameter name: Authorization

Accounts

CORS support

Enable CORS preflight requests

path Parameters
organizationId
required
string <uuid>

Organization Id this resource belongs to.

Responses

200

Default response for CORS method

options /admin/api/v2/organizations/{organizationId}/accounts

North America Server

https://na1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts

Asia Pacific Server

https://apac1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts

Get list of accounts

Returns a paged list of accounts according to filters and sort order.

Authorizations:
path Parameters
organizationId
required
string <uuid>

Organization Id this resource belongs to.

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 20

The number of items to limit the query to. Defaults to 20, maximum is 1000.

offset
integer >= 0
Default: 0

The number of items to skip when querying. Defaults to 0.

fields
Array of strings

Selected fields to be returned. By default all fields will be returned.

  • /resourceUrl?fields=field1,field2
sort
Array of strings

Fields to sort results by. The field name can optionally be prepended with '-' sign to indicate descending ordering. The default is ascending and sort order is applied from left to right.

q
string <= 1000 characters

Advanced filter query, supports more operators [>, >=, !-, <. <=, IN, NOT IN, LIKE] than simple filters.

  • /resourceUrl?q=field1 >= 2017-09-27T22:39:28Z AND (field2=someValue OR field3 IN [1,2,3])

Multiple filters are delimited with the "AND" or "OR" keywords and may be nested with ().

id
string <uuid>

Filter by resource id.

username
string

Filter by username.

email
string <email>

Filter by email.

emailConfirmed
boolean

Filter by emailConfirmed.

phoneNumber
string <phone>

Filter by phoneNumber.

registrationSource
string

Filter by registrationSource.

registeredAt
string <date-time>

Filter by registeredAt.

termsAccepted
boolean

Filter by termsAccepted.

isSubscribed
boolean

Filter by isSubscribed.

role
string
Enum: "Member" "Developer" "Admin" "Owner" "SystemAdmin"

Filter by role.

accountType
string
Enum: "Regular" "Service"

Filter by accountType.

accountStatus
string
Enum: "Pending" "Active" "Locked" "Disabled"

Filter by accountStatus.

provisioningStatus
string
Enum: "Started" "Completed"

Filter by provisioningStatus.

userId
string

Filter by userId.

createdBy
string <uuid>

Filter by createdBy.

createdAt
string <date-time>

Filter by createdAt.

modifiedBy
string <uuid>

Filter by modifiedBy.

modifiedAt
string <date-time>

Filter by modifiedAt.

Responses

200

200 response

304

Not modified

400

Missing or invalid parameters

401

Authorization token is missing or invalid

403

Insufficient privileges to perform this action

500

An unexpected error occurred

get /admin/api/v2/organizations/{organizationId}/accounts

North America Server

https://na1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts

Asia Pacific Server

https://apac1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create a new account

Creates a new account.

Authorizations:
path Parameters
organizationId
required
string <uuid>

Organization Id this resource belongs to.

header Parameters
X-No-Return-Resource
string

If set to any value, resource(s) will not be returned in response

Request Body schema: application/json
firstName
string

First name of the account user for 'Regular' account type.

lastName
string

Last name of the account user for 'Regular' account type.

username
required
string [ 5 .. 100 ] characters ^[0-9]*[a-z][a-z0-9_@.-]+$

Username of the account. Supports lower-case alphanumeric characters and the [@, . , - , _] symbols.

email
required
string <email>

Contact email for the account.

phoneNumber
string <phone> [ 1 .. 25 ] characters

Phone number for the account.

registrationSource
required
string <= 100 characters

Registration source for the account.

registeredAt
required
string <date-time>

Timestamp of the account registration.

termsAccepted
required
boolean

Whether the terms and conditions for the account have been accepted.

isSubscribed
boolean

Whether the account is subscribed for news and marketing updates.

role
string
Default: "Member"
Enum: "Member" "Developer" "Admin" "Owner" "SystemAdmin"

Role assigned to this account.

accountType
string
Default: "Service"
Enum: "Regular" "Service"

Type of account.

provisioningStatus
string
Default: "Started"
Enum: "Started" "Completed"

Provisioning status of the account.

userId
string <uuid>

The user id tied to this account for 'Regular' account type.

Responses

201

Resource created

400

Missing or invalid parameters

401

Authorization token is missing or invalid

403

Insufficient privileges to perform this action

500

An unexpected error occurred

post /admin/api/v2/organizations/{organizationId}/accounts

North America Server

https://na1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts

Asia Pacific Server

https://apac1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "firstName": "string",
  • "lastName": "string",
  • "username": "string",
  • "email": "user@example.com",
  • "phoneNumber": "string",
  • "registrationSource": "string",
  • "registeredAt": "2019-08-14T19:27:27Z",
  • "termsAccepted": true,
  • "isSubscribed": true,
  • "role": "Member",
  • "accountType": "Service",
  • "provisioningStatus": "Started",
  • "userId": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "firstName": "string",
  • "lastName": "string",
  • "username": "string",
  • "email": "user@example.com",
  • "phoneNumber": "string",
  • "registrationSource": "string",
  • "registeredAt": "2019-08-14T19:27:27Z",
  • "termsAccepted": true,
  • "isSubscribed": true,
  • "role": "Member",
  • "accountType": "Service",
  • "provisioningStatus": "Started",
  • "userId": "string"
}

CORS support

Enable CORS preflight requests

path Parameters
organizationId
required
string <uuid>

Organization Id this resource belongs to.

id
required
string

The account id

Responses

200

Default response for CORS method

options /admin/api/v2/organizations/{organizationId}/accounts/{id}

North America Server

https://na1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts/{id}

Asia Pacific Server

https://apac1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts/{id}

Get an account by id

Returns an account based on id.

Authorizations:
path Parameters
organizationId
required
string <uuid>

Organization Id this resource belongs to.

id
required
string

The account id

Responses

200

Resource returned

304

Not modified

400

Missing or invalid parameters

401

Authorization token is missing or invalid

403

Insufficient privileges to perform this action

404

Resource not found

500

An unexpected error occurred

get /admin/api/v2/organizations/{organizationId}/accounts/{id}

North America Server

https://na1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts/{id}

Asia Pacific Server

https://apac1.api.paihealth.com/admin/api/v2/organizations/{organizationId}/accounts/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "accountStatus": "Pending",
  • "emailConfirmed": true,
  • "createdAt": "2019-08-14T19:27:27Z",
  • "createdBy": "string",
  • "modifiedAt": "2019-08-14T19:27:27Z",
  • "modifiedBy": "string",
  • "href": "string",
  • "username": "string",
  • "email": "user@example.com",
  • "phoneNumber": "string",
  • "registrationSource": "string",
  • "registeredAt": "2019-08-14T19:27:27Z",
  • "termsAccepted": true,
  • "isSubscribed": true,
  • "role": "Member",
  • "accountType": "Service",
  • "provisioningStatus": "Started",
  • "userId": "string"
}

Update an account by id

Updates a given account.

Authorizations:
path Parameters
organizationId
required
string <uuid>

Organization Id this resource belongs to.

id
required
string

The account id

header Parameters
X-No-Return-Resource
string

If set to any value, resource(s) will not be returned in response

Request Body schema: application/json
id
string <uuid>

Universally unique identifier for the account.

accountStatus
string
Enum: "Pending" "Active" "Locked" "Disabled"

Current Status of this account.

emailConfirmed
boolean

Whether the account email has been confirmed.

createdAt
string <date-time>

Resource creation timestamp.

createdBy
string <uuid>

Resource created by account id.

modifiedAt
string <date-time>

Resource last modification timestamp.

modifiedBy
string <uuid>

Resource last modified by account id.

href
string <url>

Fully qualified href representing this resource location.

username
required
string [ 5 .. 100 ] characters ^[0-9]*[a-z][a-z0-9_@.-]+$

Username of the account. Supports lower-case alphanumeric characters and the [@, . , - , _] symbols.

email
required
string <email>

Contact email for the account.

phoneNumber
string <phone> [ 1 .. 25 ] characters

Phone number for the account.

registrationSource
required
string <= 100 characters

Registration source for the account.

registeredAt
required
string <date-time>

Timestamp of the account registration.

termsAccepted
required
boolean

Whether the terms and conditions for the account have been accepted.

isSubscribed
boolean

Whether the account is subscribed for news and marketing updates.

role
string
Default: "Member"
Enum: "Member" "Developer" "Admin" "Owner" "SystemAdmin"

Role assigned to this account.

accountType
string
Default: "Service"
Enum: "Regular" "Service"

Type of account.

provisioningStatus
string
Default: "Started"
Enum: "Started" "Completed"

Provisioning status of the account.

userId
string <uuid>

The user id tied to this account for 'Regular' account type.

password
string [ 8 .. 100 ] characters

Password for the account.

Responses

200

Resource updated

400

Missing or invalid parameters