PAGE REST GET ARTICLES
PAGE REST GET ARTICLES
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:
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
- <?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));
- ?>