SOAP API - AddPackageToUserWithExtendedAttributes
AddPackageToUserWithExtendedAttributes( username, packageID, chargeCreditCard, IsChildUser, extAttributesXML ) : Integer
Since: EngageIP v25.2
Assigns a package to a user and returns the ID of the UserPackage record or throws an exception if the addition of the package fails or if the user or package does not exist
The User Package will not include any Optional Services that might be configured on the Package. It does however include the extended attributes added to the User Package
When providing a user package's extended attributes (custom fields) you must supply a formatted XML string for the extAttributesXML parameter. This is an XML description of both the field name and the value to update for the specified field.
Example extAttributesXML value:
<?xml version='1.0' standalone='yes'?>
<Extended>
<Attribute Name='DeviceID' Value='12:A3:98'/>
</Extended>
Parameters:
username (String) - The name of the user in which to add the package. An exception will be thrown if the username does not exist
packageID (Integer) - The ID of the package to assign to the user. An exception will be thrown if the package does not exist
chargeCreditCard (Boolean) - Whether or not to charge the user's credit card
IscChildUser (Boolean) - Whether or not this is a child user
extAttributesXML (String) - XML string that represents the extended attributes
Returns:
The new user package ID
Possible Exceptions:
INVALID USER
INVALID PACKAGE
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /adminportal/webservice.asmx HTTP/1.1
Host: demo.logisense.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<AuthHeader xmlns="Logisense_EngageIP">
<Username>string</Username>
<Password>string</Password>
</AuthHeader>
</soap12:Header>
<soap12:Body>
<AddPackageToUserWithExtendedAttributes xmlns="Logisense_EngageIP">
<username>string</username>
<packageID>int</packageID>
<chargeCreditCard>boolean</chargeCreditCard>
<IsChildUser>boolean</IsChildUser>
<extAttributesXML>string</extAttributesXML>
</AddPackageToUserWithExtendedAttributes>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddPackageToUserWithExtendedAttributesResponse xmlns="Logisense_EngageIP">
<AddPackageToUserWithExtendedAttributesResult>int</AddPackageToUserWithExtendedAttributesResult>
</AddPackageToUserWithExtendedAttributesResponse>
</soap12:Body>
</soap12:Envelope>
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.