Retreive purchase price

It´s possible to receive the purchase price for you, as a client of your Tyrenet wholesaler, into your own application.

The purchase prices which are receivable can contain prices from both tyres and rims.

With your API-key, a TIC ID (or client ID) and an EAN-number (or an array of EAN-numbers) you can receive the purchase price.

You receive a XML-message then from the API in return with the gross price, the purchase price (excluding VAT and other prices), the stock information of the sameday-delivery-stock and the stock information of the 24/48h delivery. In the XML tab you can find the XML-structure.

DOC

getPricePurchase

string/xml getPricePurchase (
int TicID,
int ClientID,
int/intArray EAN
)

Receive the price and stock for a customer for one or multiple articles

int TicID
Use TicID or ClientID

int ClientID
Use TicID or ClientID

int/intArray EAN
EAN or Array with EAN´s (tyres and rims are allowed)

Return value string/xml: Purchase price and stock of requested EAN´s

XSD
  • <wsdl:operation name="getPricePurchase" parameterOrder="TicID ClientID EAN">
    • <wsdl:input message="tns:getPricePurchaseSoapIn"/>
    • <wsdl:output message="tns:getPricePurchaseSoapOut"/>
  • </wsdl:operation>
  • <wsdl:message name="getPricePurchaseSoapIn">
    • <wsdl:part name="TicID" type="s:int"/>
    • <wsdl:part name="ClientID" type="s:int"/>
    • <wsdl:part name="EAN" type="tns:int/intArray"/>
  • </wsdl:message>
  • <wsdl:message name="getPricePurchaseSoapOut">
    • <wsdl:part name="return" type="tns:string/xml"/>
  • </wsdl:message>
XML

Request:

  • <AuthHeader>
    • <API_KEY>************************************</API_KEY>
  • </AuthHeader>
  • <getPricePurchase>
    • <TicID>****</TicID>
    • <ClientID>*</ClientID>
    • <EAN>***************</EAN>
  • </getPricePurchase>

Response:

  • <?xml version="1.0" ?>
  • <ResponseCode>
    • <Response>
      • <Header>
        • <Started>XX:XX:XX</Started>
        • <Ended>XX:XX:XX</Ended>
        • <Company>
          • <CompanyID>XXXX</CompanyID>
          • <CompanyName>XXXXXXXXXXXX</CompanyName>
        • </Company>
      • </Header>
      • <Body>
        • <Articles>
          • <Article sequence="X">
            • <SKU>
              • <EAN>XXXXXXXXXXXXX</EAN>
              • <ArticleCodeManufacturer></ArticleCodeManufacturer>
              • <ArticleCodeCustomer></ArticleCodeCustomer>
              • <ArticleCodeVaco>XXXXXXXXXXXXXXXXX</ArticleCodeVaco>
            • </SKU>
            • <Properties>
              • <Description>XXXXXXXXXXXXXXXXXX</Description>
              • <Category>
                • <Type>X</Type>
                • <TypeDescription lang="nl">XXXXXX</TypeDescription>
              • </Category>
              • <Application>
                • <Type>X</Type>
                • <TypeDescription lang="nl">XXXXXX</TypeDescription>
              • </Application>
              • <Season>
                • <Type>X</Type>
                • <TypeDescription lang="nl">XXXXXX</TypeDescription>
              • </Season>
            • </Properties>
            • <Price>
              • <PriceGross unit="euro">XXX.XX</PriceGross>
              • <PricePurchase unit="euro">XX.XX</PricePurchase>
            • </Price>
            • <Stocks>
              • <Stock sequence="1">
                • <Delivery lang="en">Sameday</Delivery>
                • <Quantity>XX</Quantity>
              • </Stock>
              • <Stock sequence="2">
                • <Delivery lang="en">24/48H</Delivery>
                • <Quantity>XX</Quantity>
              • </Stock>
            • </Stocks>
          • </Article>
        • </Articles>
      • </Body>
    • </Response>
  • </ResponseCode>
PHP
  • <?php
  • $TicID = 0000;
  • $ClientID = 0;
  • $EAN = array(0000000000000);

  • $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);

  • $xml = $client->getPricePurchase($TicID,$ClientID,$EAN);
  • echo $xml;
  • ?>