SOAP API - AddPackageToUserWithOptionalServices

AddPackageToUserWithOptionalServices( username, packageID, chargeCreditCard, IsChildUser, NextBillDate, billNow, xmlOptionalServices, xmlServiceDiscounts ) : Integer

Since: EngageIP v25.2

Assigns a package to a user with optional services set in XML and service discounts, returns the ID of the User Package record or throws exception if the addition of the package fails or if the user or package do not exist.

Note: The User Package will include default Optional Services that might be configured on the Package.

Parameters:

  • username (String) - The username 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 User Package to add to the user.

  • chargeCreditCard (Integer) - When set to true, if the user's default payment is a credit card then a charge for the package will be incurred.

  • IsChildUser (Boolean) - Indicates if the user is a child account.

  • NextBillDate (DateTime) - Specify the date you wish the package to be billed , otherwise use DateTime.MinValue to set as now.

  • billNow (Boolean) - When set to true, the optional service will be invoiced, otherwise this will occur with the regular bill cycle of the user.

  • xmlOptionalServices (String) -

    <OptionalServices> <ServiceID>23</ServiceID> </OptionalServices>
  • xmlServiceDiscounts (String) -

    <ServiceDiscounts> <ServiceName>My Service</ServiceName> <discountType>Fixed</discountType> <discountAmount>10.00</discountAmount> <discountOccur>0</discountOccur> <discountNote>Renewal discount</discountNote> </ServiceDiscounts>
    • For details regarding discount please see Applying Discounts at the Package Level

    • For infinitely recurring discount use 0

Returns:

The ID of the new User Package added.

Possible Exceptions:

  • INVALID USERNAME

  • 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> <AddPackageToUserWithOptionalServices xmlns="Logisense_EngageIP"> <username>string</username> <packageID>int</packageID> <chargeCreditCard>boolean</chargeCreditCard> <IsChildUser>boolean</IsChildUser> <NextBillDate>dateTime</NextBillDate> <billNow>boolean</billNow> <xmlOptionalServices>string</xmlOptionalServices> <xmlServiceDiscounts>string</xmlServiceDiscounts> </AddPackageToUserWithOptionalServices> </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.