TIC login

It´s possible to login automatically to the Tyrenet TIC from your own application. With this implementation the user only needs the username and password of your application.

Inside your application you need the requested information like the unique TIC-UID´s or the Primary Key TIC-ID´s. A list of these data can be obtained throught the Tyrenet headoffice.

Through your API key and a TIC UID or your API key and a TIC ID is always checked whether the TIC account is allowed to login into the TIC. After a succesful authorisation, a URL with to login will be returned.

Following this URL will ensure that the user is automatically logged in the TIC. This URL is invalid after 20 minutes.

The target parameter can be used to arrive at another page whit the login. Target (int) has the following features:

  1. Homepage;
  2. Catalogue;
  3. Tyrehotel;
  4. Distribution;
  5. Sales corner
  6. Alloy rims;
  7. Steel rims;
  8. Set configurator.

The parameter ExternalSessionID can be used to retrieve this value at your own shopping cart for example.
Pay attention! This has to be discussed with the Tyrenet headquarter.

DOC

ticLogin

string ticLogin (
string TicUID,
int TicID,
int Target,
string ExternalSessionID
)

Receive a login URL to login in TIC automatically

string TicUID
Use TicUID or TicID

int TicID
Use TicUID or TicID

int Target
Target Page (or an empty value)

string ExternalSessionID
SessionID to receive back in the own application (or an empty value)

Return value string: Session with URL

XSD
  • <wsdl:operation name="ticLogin" parameterOrder="TicUID TicID Target ExternalSessionID">
    • <wsdl:input message="tns:ticLoginSoapIn"/>
    • <wsdl:output message="tns:ticLoginSoapOut"/>
  • </wsdl:operation>
  • <wsdl:message name="ticLoginSoapIn">
    • <wsdl:part name="TicUID" type="s:string"/>
    • <wsdl:part name="TicID" type="s:int"/>
    • <wsdl:part name="Target" type="s:int"/>
    • <wsdl:part name="ExternalSessionID" type="s:string"/>
  • </wsdl:message>
  • <wsdl:message name="ticLoginSoapOut">
    • <wsdl:part name="return" type="s:string"/>
  • </wsdl:message>
XML

Request:

  • <AuthHeader>
    • <API_KEY>************************************</API_KEY>
  • </AuthHeader>
  • <ticLogin>
    • <TicUID>************************************</TicUID>
    • <TicID>****</TicID>
    • <Target>*</Target>
    • <ExternalSessionID>***************</ExternalSessionID>
  • </ticLogin>

Response:

  • <?xml version="1.0" encoding="UTF-8" ?>
  • <ResponseCode>
    • <Response>
      • <Header>
        • <Company>
          • <CompanyID>XXXX</CompanyID>
          • <CompanyName>XXXXXXXXXXXXXXXX</CompanyName>
        • </Company>
      • </Header>
      • <Body>
        • <Session>
          • <SessionID>*******************</SessionID>
          • <SessionURL>
            • http://tic.tyrenet.nl/?sessionid=*******************
          • </SessionURL>
        • </Session>
      • </Body>
    • </Response>
PHP
  • <?php
  • $client = new SoapClient(
    • 'http://api.tyrenet.nl/mainservice/ticservices.php?WSDL',
    • array(
      • 'trace' => 0,
      • 'exceptions' => 0
      )
    );

  • $paramHeader = array();

  • $paramHeader['API_KEY'] =
    '************************************';

  • $header = new SoapHeader(
    • 'http://api.tyrenet.nl/',
    • 'AuthHeader',
    • $paramHeader
    );

  • $client->__setSoapHeaders($header);

  • $TicUID = '';
  • $TicID = 0000;
  • $Target = 0;
  • $ExternalSessionID = '';

  • $xmlString = $client->ticLogin('',$TicID,$Target,$ExternalSessionID);
  • $xml = simplexml_load_string($xmlString);

  • if(isset($xml->Response->Body->Error)) :
    • echo $xml->Response->Body->Error->ErrorDescription;
  • else :
    • header('Location: ' . $xml->Response->Body->Session->SessionURL);
  • endif;
  • ?>