Add subscriber
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Add a subscriber either to the vendor's organization or to the organization of one of the vendor's customers.

The API caller must have one of the following roles to run the API:

  • CustomerAdministrator
  • VSR

Table 1. API details
Method
Resource address
Input representation
POST
/resource/subscriber

/resource/subscriber?suppressEmail=true

A JavaScript™ Object Notation (JSON) entry that represents a subscriber.

 

NOTE: By default email notification will be sent.suppressEmail flag is used to suppress email notification for addSubscriber using BSS API.

When suppressEmail=true email notification will not be sent

/resource/subscriber?suppressEmail=true

Email notification will be sent for below requests

/resource/subscriber?suppressEmail=false

/resource/subscriber

Input attributes


The input payload must be a well formatted JSON object with the attributes that are listed in the Input attributes table.

For attributes that are not required, you have the option of either sending an empty string as the value for that attribute, or not including that attribute in the payload. If you do not include the attribute, it will not be present in payloads that you retrieve in future operations.

For examples of valid field values, see Common attribute values.

Table 2. Input attributes

Attribute
Required
Description
Attribute Type
Maximum Length
CustomerId
Yes
The ID of the customer with whom the subscriber is associated.
String
-9223372036854775808 to +9223372036854775807
RoleSet
Yes
The list of roles that need to be granted to the user. Valid values include:
  • CustomerAdministrator
  • User
  • VSR
List of Strings
255 characters per string
FamilyName
Yes
Last name of the primary contact person.
String
255 characters
GivenName
Yes
First name of the primary contact person.
String
255 characters
EmailAddress
Yes
Email address of the primary contact person.
String
255 characters
NamePrefix
No
Name prefix, if one exists.
String
10 characters
NameSuffix
No
Name suffix, if one exists.
String
10 characters
EmployeeNumber
No
Employee number of the person.
String
10 characters
LanguagePreference
No
Language preference of the person. Default value is en_US
String
15 characters
WorkPhone
No
Workplace phone number.
String
30 characters
HomePhone
No
Residential phone number.
String
30 characters
MobilePhone
No
Mobile phone number.
String
30 characters
Fax
No
Fax number.
String
30 characters
JobTitle
No
Job title of the person.
String
50 characters
WebSiteAddress
No
Website address of the person, if available.
String
255 characters
TimeZone
No
Time zone information.
String
255 characters
Photo
No
Reference to the location where the photo is stored.
String
255 characters
SecurityRealm
NO
This attribute should have one of the below values
  • FEDERATED
  • MODIFIED_FEDERATED
  • NON_FEDERATED
String
25 characters
 

Sample payload

{

"Subscriber": {

"CustomerId": "20000051",

"Person": {

"RoleSet": [

"CustomerAdministrator"

],

"FamilyName": "Doe",

"GivenName": "John",

"EmailAddress": "jdoe@example.com",

"NamePrefix": "Mr",

"NameSuffix": "",

"EmployeeNumber": "6A7777B",

"LanguagePreference": "EN_US",

"WorkPhone": "111-111-1111",

"MobilePhone": "111-111-1112",

"HomePhone": "111-111-1113",

"Fax": "111-111-1114",

"JobTitle": "Director",

"WebSiteAddress": "www.example.com",

"TimeZone": "America/Central",

"Photo": ""

}

}

}


Output


When the API call is successful, the ID of the subscriber is returned, for example:

{

"Long": 20000001

}


For a list of common HTTP status codes that are returned for API calls, see HTTP status codes.

Parent topic: Subscriber management services

Input
Method URI Description
POST /api/bss/resource/subscriber Add a subscriber either to the vendor's organization or to the organization of one of the vendor's customers.
The API caller must have one of the following roles to run the API:
CustomerAdministrator
User
VSR
POST /api/bss/resource/subscriber?suppressEmail=true suppressEmail=true flag will not send email notification for addSubscriber API call
Content Type: application/json
Sample Request:
{

    "Subscriber": {

        "CustomerId": 20000051,

        "Person": {

            "RoleSet":  [

                "CustomerAdministrator"

            ],

            "FamilyName": "Doe",

            "GivenName": "John",

            "EmailAddress": "jdoe@example.com",

            "NamePrefix": "Mr",

            "NameSuffix": "",

            "EmployeeNumber": "6A7777B",

            "LanguagePreference": "EN_US",

            "WorkPhone": "111-111-1111",

            "MobilePhone": "111-111-1112",

            "HomePhone": "111-111-1113",

            "Fax": "111-111-1114",

            "JobTitle": "Director",

            "WebSiteAddress": "www.example.com",

            "TimeZone": "America/Central",

            "Photo": ""

        }

    }

}

Use the table below that represents the expected fields:
Name Type Optional Description
CustomerId
int No The ID of the customer with whom the subscriber is associated.
RoleSet
enumerated No The list of roles that need to be granted to the user. Valid values include:
CustomerAdministrator
User
VSR
Authorized values:
  • CustomerAdministrator
  • User
  • VSR
FamilyName
string No Last name of the primary contact person.
GivenName
string No First name of the primary contact person.
EmailAdress
string No Email address of the primary contact person.
NamePrefix
string Yes Name prefix, if one exists.
NameSuffix
string Yes Name suffix, if one exists.
EmployeeNumber
string Yes Employee number of the person.
LanguagePreference
string Yes Language preference of the person. Default value is en_US
WorkPhone
string Yes Workplace phone number.
HomePhone
string Yes Residential phone number.
MobilePhone
string Yes Mobile phone number.
Fax
string Yes Fax number.
JobTitle
string Yes Job title of the person.
WebSiteAddress
string Yes Website address of the person, if available.
TimeZone
string Yes Time zone information.
Photo
string Yes Reference to the location where the photo is stored.
Output
Content Type: application/json
Examples
When the API call is successful, the ID of the subscriber is returned
{

    "Subscriber": {

        "CustomerId": 20000051,

        "Person": {

            "RoleSet":  [

                "CustomerAdministrator"

            ],

            "FamilyName": "Doe",

            "GivenName": "John",

            "EmailAddress": "jdoe@example.com",

            "NamePrefix": "Mr",

            "NameSuffix": "",

            "EmployeeNumber": "6A7777B",

            "LanguagePreference": "EN_US",

            "WorkPhone": "111-111-1111",

            "MobilePhone": "111-111-1112",

            "HomePhone": "111-111-1113",

            "Fax": "111-111-1114",

            "JobTitle": "Director",

            "WebSiteAddress": "www.example.com",

            "TimeZone": "America/Central",

            "Photo": ""

        }

    }

}


Response returned by the server
{

    "Long": 20000001

}