Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

Endpoints

We'll have two endpoints:

  • REST (GET/POST): /services/rest/user/creditBalance?username=[]&password=[]
  • SOAP: /services/ws/user?wsdl (method: creditBalance)

 

   <soapenv:Header/>
   <soapenv:Body>
      <ser:creditBalance>
         <username>?</username>
         <password>?</password>
      </ser:creditBalance>
   </soapenv:Body>
</soapenv:Envelope>

 

What information to return?

For the REST endpoint (JSON)

If query is ok:

{
    "creditBalance": "100",
    "status": "0",
}

 

If query invalid:

{
 "status": <errorStatusCode>,
}

E.g.  for invalid login/password it will return status: 3 meaning "Authentication failed"

For the SOAP endpoint (XML):

for valid request:

 

   <soap:Body>
         <return>            
            <creditBalance>100</creditBalance>
            <status>0</status>         
         </return>
   </soap:Body>
</soap:Envelope>

 

and for invalid request:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns1:creditBalanceResponse xmlns:ns1="http://server.submission.mc5.smspl.com/">
         <return>            
            <status>3</status>         <!-- 3 is an example value, it might have different value -->
         </return>
      </ns1:creditBalanceResponse>
   </soap:Body>
</soap:Envelope>
  • No labels