Querying a customer betting account

After you have logged in the customer, you will be able to get a TGT and then you can query their account and retrieve data such as:

  • The customer's name
  • The customer's address
  • Whether the protection of customer fund's flag is set to yes or not.
  • Other personal details

Procedure

  1. To query the account, execute the following request:
     
    GET /v1/accounts/me HTTP/1.1
    Host: sandbox.whapi.com
    Accept: application/xml
    who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
    who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
    who-ticket: TGT-499-yv2cRDgYvAvFFdFZC5RTvtbrbXiSDbm3UeDb5jIju5tc4qb1uP-brsxxxx
  2. Get the details you need from the response:
     
    <whoAccounts>
       <status>A</status>
       <accountNum>14652314</accountNum>
       <accountId>18164</accountId>
       <customerId>48</customerId>
       <currencyCode>GBP</currencyCode>
       <countryCode>GB</countryCode>
       <title>Mr</title>
       <firstName>Joe</firstName>
       <lastName>Bloggs</lastName>
       <street1>10 Rillington Place</street1>
       <street2>Old Basing</street2>
       <street3>Lychpit</street3>
       <city>Basingstoke</city>
       <county>Hampshire</county>
       <postcode>RG248YQ</postcode>
       <country>United Kingdom</country>
       <email>jbloggs@email.com</email>
       <mobile>09876543210</mobile>
       <partnerContactable>N</partnerContactable>
       <contactable>Y</contactable>
       <flags>
          <flag>
             <pocf>N</pocf>
          </flag>
       </flags>
    </whoAccounts>