SOAP API – AddUserServiceDiscount

AddUserServiceDiscountNew( userServiceID, discountType, occur, amount, note, skipprorate ) : Void

Since: EngageIP v25.2

Adds a discount component to an existing UserService

Parameters:

  • userServiceID (Integer) - The ID of the user service.  An exception will be thrown if the user service id does not exist.

  • discountType (String) - The name of the discount type - Fixed, Percent or Price. An exception will be thrown if the discount type does not exist.

  • occur (Integer)  - The number of occurrences of the discount. Set to 0 for permanent discount.

  • amount (Double)  - The amount of the discount.

  • note (String)  - Any notes regarding the discount.

  • skipprorate (Boolean)  - Whether to apply discount on full period only.

Returns:

Nothing

Possible Exceptions:

  • INVALID USER SERVICE ID

  • INVALID DISCOUNT TYPE

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 /BOSS/WebService.asmx HTTP/1.1 Host: localhost 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> <AddUserServiceDiscount xmlns="Logisense_EngageIP"> <discountType>string</discountType> <userPackageID>int</userPackageID> <userServiceID>int</userServiceID> <occur>int</occur> <amount>double</amount> <note>string</note> </AddUserServiceDiscount> </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> <AddUserServiceDiscountResponse xmlns="Logisense_EngageIP"> <AddUserServiceDiscountResult>int</AddUserServiceDiscountResult> </AddUserServiceDiscountResponse> </soap12:Body> </soap12:Envelope>

SOAP 1.1

POST /BOSS/WebService.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "Logisense_EngageIP/AddUserServiceDiscount" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <AuthHeader xmlns="Logisense_EngageIP"> <Username>string</Username> <Password>string</Password> </AuthHeader> </soap:Header> <soap:Body> <AddUserServiceDiscount xmlns="Logisense_EngageIP"> <discountType>string</discountType> <userPackageID>int</userPackageID> <userServiceID>int</userServiceID> <occur>int</occur> <amount>double</amount> <note>string</note> </AddUserServiceDiscount> </soap:Body> </soap:Envelope> HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <AddUserServiceDiscountResponse xmlns="Logisense_EngageIP"> <AddUserServiceDiscountResult>int</AddUserServiceDiscountResult> </AddUserServiceDiscountResponse> </soap:Body> </soap:Envelope>