Basically, you need three things to be able to use the web services in Episerver Campaign:
- A functional SOAP 1.1 client environment
- A valid Episerver Campaign account that has the permission to access the SOAP API (provided by Episerver)
- A client ID (provided by Episerver)
Validity of a session
A session is always valid for 20 minutes, i.e., after this time the so-called sessionId becomes invalid and you must request a new one. To do so, use the login method.
Web service endpoints
Currently, all web services are deployed RPC-encoded only. Each web service is deployed under a URL of the form. We recommend always using an encrypted SSL connection using the HTTPS protocol:
Note: The term [WebserviceName] has to be replaced by the name of the actual web service without the term webservice. For example, the SessionWebservice is deployed under the URL http://api.campaign.episerver.net/soap11/RpcSession.
Coupon system web services
The WSDLs for the CouponBlock and CouponCode web service of the coupon system can be found under the following links:
Note: These web services are not part of the standard distribution of our SOAP API. They must be activated separately. To do this, you need the Episerver Campaign add-on coupon system. Contact customer support if you want to use this function.
Throughout the whole API, errors are reported as exceptions (SOAP faults). So you should implement some kind of error handling on the client side.
Here is a short example (written in pseudo Java syntax) that illustrates the process flow of a web service session:
// Login to the client 1234 // The session ID obtained by this call is needed to call any other webservice's method. // A session is valid for 20 minutes. String sessionID = SessionWebservice.login(1234, "myusername", "mypassword"); // Call some methods. In this example we retrieve the ids of all regular mailings available. long mailingIds = MailingWebservice.getIds(sessionId, "regular"); // Now do something with the mailingIds ... // Finally logout SessionWebservice.logout (sessionId);
Last updated: Apr 25, 2018