The first step in every conversation with Luminate Online Web Services is to authenticate as a Luminate Online administrator with appropriate permissions. See Site Configuration for information on setting up API Administrator accounts. The middleware does this by sending a Login message:
<?xml version="1.0" encoding="UTF-8" ?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Login xmlns="urn:soap.convio.com"> <UserName>user</UserName> <Password>password</Password> </Login> </soap:Body> </soap:Envelope>
Luminate Online Web Services responds to valid login requests with a session token:
<?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <LoginResponse xmlns="urn:soap.convio.com"> <Result> <SessionId>e96ce3db61a80642510225a783540f6dcb6e702d:JSESSIONID=abcMZ5dmWgZeidZtyWZ3r:10000100:2008-12-01T18:13:45.691Z</SessionId> </Result> </LoginResponse> </soap:Body> </soap:Envelope>
The caller must include this session token in all subsequent requests. The token is valid for 30 minutes, after which the middleware must establish a new session and obtain a new session token.
Once the caller has successfully authenticated, it can start a synchronization session by making a StartSynchronization request:
<?xml version="1.0" encoding="UTF-8" ?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <Session xmlns="urn:soap.convio.com"> <SessionId>80c3bf74d37e7bdd8d5b25cf320bbfb2065dd798:0</SessionId> </Session> </soap:Header> <soap:Body> <StartSynchronization xmlns="urn:soap.convio.com"> <PartitionId>123</PartitionId> </StartSynchronization> </soap:Body> </soap:Envelope>
Luminate Online Web Services responds with the time window that will be used to select records for subsequent synchronization calls. By default, the time window is between the last synchronization session request and the current one:
<?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <StartSynchronizationResponse xmlns="urn:soap.convio.com"> <Result> <PartitionId>123</PartitionId> <Start>2008-12-01T18:13:44Z</Start> <End>2008-12-01T18:13:44Z</End> <SyncId>118</SyncId> </Result> </StartSynchronizationResponse> </soap:Body> </soap:Envelope>
The last call to the StartSynchronization method determines the active synchronization window for a particular administrator and partition. Only one synchronization session may be active for an administrator and partition combination at any time. By default, the session limit is set to 1 sync session at a time per site.
The SyncId is a unique ID for each synchronization session. You can use it later to retrieve a log of records updated or downloaded as part of this synchronization.