Peoplevox

API Authentication

Calls to the API take the form of an HTTP POST request followed by the relevant HTTP Headers (content type and content length), and the SOAP envelope in the body of the message.

The API supports requests for both SOAP 1.1 and SOAP 1.2.

An example of a call to the Authenticate API method using SOAP 1.1 is described below.

Authenticate

Parameters:

  • string: clientid

  • string: username

  • string: password – this need to be encoded in base64 encoding.

Return value:

IntegrationResponse:

  • ResponseId, 0 if call has succeeded, -1 if failed

  • TotalCount: contains 1 if the authentication has succeeded otherwise 0.

  • Detail: contains the session id if the call is successful, otherwise it contains the error detail.

Placeholders string and int need to be replaced by actual values:

https://gist.github.com/harrypeek1/1e24f23ec2b96e68f3f640820db9d7c6.pibb?scroll=true

The WMS will send back a response as follows:

POST /clientid/Resources/IntegrationServicev4.asmx HTTP/1.1         
Host: string                                                        
Content-Type: text/xml; charset=utf-8
                               
SOAPAction: "http://www.peoplevox.net/Authenticate"   
<?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>                                                    
  <Authenticate xmlns="http://www.peoplevox.net/">           
   <clientId>string</clientId>                            
   <username>string</username>                            
   <password>string</password>                            
  </Authenticate>                                            
</soap:Body>                                                   
</soap:Envelope> 

The Authenticate call is used to start a session with the WMS. If a valid clientid, username, and password combination are provided, then the WMS will return a session id on the response. The response to the Authenticate request includes a Detail field, which contains the client id, followed by a comma, followed by the session id. This session id must be provided on subsequent calls to the API.

The username and password are created in the PVX web application under Users tab of the Setup module. API sessions remain valid for up to 30 minutes after the most recent activity. After 30 minutes of inactivity, the caller will need to re-authenticate to obtain a new session id.

When populating the UserSessionCredentials object, callers must also provide a value for the “UserId” parameter – this is mandatory, but it does not currently influence the result of the call. It is recommended that callers pass a value of 0 in all cases for this parameter.

Each API response includes a ResponseId parameter, which indicates the success or failure of the call.

The IntegrationResponse object contains the following parameters:

  • ResponseId (0 if succeeded, -1 failed),

  • Details (returned value or error details if failed),

  • TotalCount (number of rows returned).


C# Example

HTTP/1.1 200 OK                                                       
Content-Type: text/xml; charset=utf-8
                                 
<?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>                                                       
  <AuthenticateResponse xmlns="http://www.peoplevox.net/">      
   <AuthenticateResult>                                      
    <ResponseId>int</ResponseId>                          
    <TotalCount>int</TotalCount>                          
    <Detail>string</Detail>                               
   </AuthenticateResult>                                     
  </AuthenticateResponse>                                       
</soap:Body>                                                      
</soap:Envelope> 

Back to Top