POST Subscriber/BulkUpdate

Update a list of subscribers in PiSuite. If the required action on a subsciber is deletion, then the subscriber will be deleted only if there are no referenced records (alerts, favourites) for the subscriber. Otherwise mark the subscriber as inactive.

Request Information

URI Parameters

None.

Body Parameters

The list of subscribers to be updated in PiSuite

Collection of Subscriber
NameDescriptionTypeAdditional information
ClientID

Client ID

integer

Required

Status

Subscriber status

SubscriberStatus

None.

FirstName

First name

string

Required

Max length: 256

LastName

Last name

string

Max length: 256

DateOfBirth

Date of birth

date

None.

Gender

Subscriber gender

Gender

None.

EmailAddress

Email address

string

Required

Max length: 256

UserName

Username

string

Required

Max length: 256

EmailNotificationEnabled

True if email notifications are enabled for the customer. Otherwise, false.

boolean

None.

Action

Action to be done on the customer.

Action

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "ClientID": 1,
    "Status": 0,
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "DateOfBirth": "2024-12-23T10:54:15.8418397-08:00",
    "Gender": 0,
    "EmailAddress": "sample string 4",
    "UserName": "sample string 5",
    "EmailNotificationEnabled": true,
    "Action": 1
  },
  {
    "ClientID": 1,
    "Status": 0,
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "DateOfBirth": "2024-12-23T10:54:15.8418397-08:00",
    "Gender": 0,
    "EmailAddress": "sample string 4",
    "UserName": "sample string 5",
    "EmailNotificationEnabled": true,
    "Action": 1
  }
]

application/xml, text/xml

Sample:
<ArrayOfSubscriber xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PiSuite.DataModels.Api4Client">
  <Subscriber>
    <Action>Update</Action>
    <ClientID>1</ClientID>
    <DateOfBirth>2024-12-23T10:54:15.8418397-08:00</DateOfBirth>
    <EmailAddress>sample string 4</EmailAddress>
    <EmailNotificationEnabled>true</EmailNotificationEnabled>
    <FirstName>sample string 2</FirstName>
    <Gender>Female</Gender>
    <LastName>sample string 3</LastName>
    <Status>Inactive</Status>
    <UserName>sample string 5</UserName>
  </Subscriber>
  <Subscriber>
    <Action>Update</Action>
    <ClientID>1</ClientID>
    <DateOfBirth>2024-12-23T10:54:15.8418397-08:00</DateOfBirth>
    <EmailAddress>sample string 4</EmailAddress>
    <EmailNotificationEnabled>true</EmailNotificationEnabled>
    <FirstName>sample string 2</FirstName>
    <Gender>Female</Gender>
    <LastName>sample string 3</LastName>
    <Status>Inactive</Status>
    <UserName>sample string 5</UserName>
  </Subscriber>
</ArrayOfSubscriber>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The status of update for each subscriber

Collection of SubscriberUpdate
NameDescriptionTypeAdditional information
UserID

UserID is a Guid assigned to the Subscriber in PiSuite.

globally unique identifier

None.

UserName

Username as passed to PiSuite

string

None.

Result

Was the update successful?

SubscriberUpdateStatus

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "UserID": "4a7b128f-1221-4720-b71f-395b50aa9bd8",
    "UserName": "sample string 2",
    "Result": 1
  },
  {
    "UserID": "4a7b128f-1221-4720-b71f-395b50aa9bd8",
    "UserName": "sample string 2",
    "Result": 1
  }
]

application/xml, text/xml

Sample:
<ArrayOfSubscriberUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PiSuite.DataModels.Api4Client">
  <SubscriberUpdate>
    <Result>Updated</Result>
    <UserID>4a7b128f-1221-4720-b71f-395b50aa9bd8</UserID>
    <UserName>sample string 2</UserName>
  </SubscriberUpdate>
  <SubscriberUpdate>
    <Result>Updated</Result>
    <UserID>4a7b128f-1221-4720-b71f-395b50aa9bd8</UserID>
    <UserName>sample string 2</UserName>
  </SubscriberUpdate>
</ArrayOfSubscriberUpdate>