Articles (purchase price and stock)

PAGE REST GET ARTICLES

DOC

Products

GET /products (
string ApiKey,
int TicID,
string TicUID,
string/stringArray S
)

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

string ApiKey
?apikey=x

int TicID
&ticid=[0000]

string TicUID
&ticuid=x

string/stringArray S
&s=x

S query parameter:

  • Size (width): s=195
  • Size (width + diameter): s=19515
  • Size (full - width + aspect ratio + diameter): s=1956515
  • Size full with speed-indicator: s=1956515h
  • Brand code with size full: s=mi1956515
  • Brand code with size full and speed-indicator: s=mi1956515h
  • EAN: s=3528700587517
  • Multiple EAN-numbers: s=3528700587517,5452001082908,8714692312878

Optional (not possible when EAN-code(s) is/are used):

string load
&load=[71-121]

string speed
&speed=[t/h/v/w/y/zr]

string season
&season=[s/w/a]

int rft
&rft=[0/1]

string category
&category=[p-v/b/s/r/t]

string fuel
&fuel=[a-b-c-d-e-f-g]

string grip
&grip=[a-b-c-d-e-f-g]

int noise
&noise=[64-78]

int noiseclass
&noiseclass=[1/2/3]

string classification
&classification=[a/b/c]

Return value string/json: Articles including descriptions, purchase price, selling price and stock

JSON

Request:

    https://api.tyrenet.nl/rest/products?apikey= ************************************ &ticid=0000&ticuid=**************************&s=*******

Response:

  • {
    • "responsetime": {
      • "start": "HH:MM:SS",
      • "end": "HH:MM:SS"
      },
    • "qty": 1,
    • "response": {"tyres": [{
      • "EAN": 3528700587517,
      • "BAC": "MI .205.55.016.T .AL5.00",
      • "Brand": "Michelin",
      • "Type": "Alpin 5",
      • "ExtraInfo": "M+S",
      • "Width": 205,
      • "Height": 55,
      • "Inch": 16,
      • "Load": "91",
      • "Speed": "T",
      • "Season": "Winterbanden",
      • "ROF": false,
      • "Fuel": "E",
      • "Grip": "B",
      • "Noise": 68,
      • "NoiseClass": 1,
      • "Classification": "A-merk",
      • "Category": "Personenwagen",
      • "DEMO": false,
      • "DOT": false,
      • "IMG": "https://tic.tyrenet.nl/images/fotos/MichelinAlpin5.jpg",
      • "PriceGross": "XXX.XX",
      • "PricePurchase": "XX.XX",
      • "PriceSelling": "XXX.XX",
      • "StockSameday": XX,
      • "Stock24_48H": XX
      }]}
    }
PHP
  • <?php
  • $ApiKey = '************************************';
  • $TicID = 0000;
  • $TicUID = '**************************';
  • $S = '1956515';

  • function convert_object_to_array($data) {
    • if (is_object($data))
      • $data = get_object_vars($data);

    • if (is_array($data))
      • return array_map(__FUNCTION__, $data);
    • else
      • return $data;
    }

  • $json = file_get_contents('https://api.tyrenet.nl/rest/products?apikey='.$ApiKey.'&ticid='.$TicID.'&ticuid='.$TicUID.'&s='.$S);
  • $obj = json_decode($json);
  • echo '<pre>';print_r(convert_object_to_array($obj));
  • ?>