Warning: Use of undefined constant TXT_PLACE_ORDER - assumed 'TXT_PLACE_ORDER' (this will throw an Error in a future version of PHP) in /var/www/vhosts/tnnds.nl/api.tyrenet.nl/index.php(250) : eval()'d code on line 16
TXT_PLACE_ORDER


Warning: Use of undefined constant PAGE_REST_ADDORDER - assumed 'PAGE_REST_ADDORDER' (this will throw an Error in a future version of PHP) in /var/www/vhosts/tnnds.nl/api.tyrenet.nl/index.php(250) : eval()'d code on line 18
PAGE_REST_ADDORDER
DOC

Orders

POST /orders (
Header
string Content-Type,
string Apikey,
string TicUID,

Body
(optional) string reference,
(optional) string remarks,
array products,
int ean,
int qty,
)

Place an order

string Content-Type
Content-Type=application/json

string ApiKey
Apikey=x

string TicUID
TicUID=XXXXXXXXXXXXXXXXXXXX

array products
products=[Array of products]

int ean
ean=0000000000000

int qty
qty=0

Optional:

string reference
reference=X

string remarks
remarks=X

Return value string/json: Orders

Example response:

  • {
    • "Order": {
      • "OrderStatus": "Confirmed",
      • "OrderNumber": 2020997887,
      • "OrderReference": "",
      • "OrderRemarks": "Dit is een opmerking",
      • "Products": [
        • {
          • "ProductType": 1,
          • "ProductCodes": {
            • "EAN": "4019238572742",
            • "BAC": "CO .195.65.015.T .PR5.00",
            • "ProductCode": "",
            • "OwnProductCode": "BZCOT8572742"
          • },
          • "BrandShort": "CO",
          • "BrandFull": "Continental",
          • "Type": "PremiumContact 5",
          • "Size": {
            • "Width": 195,
            • "Height": 65,
            • "Inch": 15
          • },
          • "LI": "91",
          • "SI": "T",
          • "ExtraInformation": "",
          • "RFT": false,
          • "3PMSF": false,
          • "Demo": false,
          • "Dot": false,
          • "Label": {
            • "Fuel": "C",
            • "Grip": "A",
            • "Noise": 71,
            • "NoiseClass": 2
          • },
          • "InvoiceDescription": "Pr.Cont.5",
          • "Price": {
            • "Gross": "87.50",
            • "Net": "XX.XX"
          • },
          • "QTY": 2
        • },
      • }
JSON

Request:

    https://api.tyrenet.nl/rest/orders

Header

  • Content-Type: application/json
  • Apikey: x
  • TicUID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Body

  • {
    • "reference": "",
    • "remarks": "",
    • "products": [
      • {
        • "ean": 0000000000000,
        • "qty": X
        },
      • {
        • "ean": 0000000000000,
        • "qty": X
        },
      ]
    }

Response:

JSON data

PHP
  • <?php

  • $ApiKey = '************************************';
  • $TicUID = 'XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX';

  • $Url = 'https://api.tyrenet.nl/rest/orders';

  • $headers = array(
    • 'Content-Type: application/json',
    • 'Apikey: ' . $ApiKey,
    • 'TicUID: ' . $TicUID,
  • );

  • $post = array(
    • 'reference' => 'Kenteken XX-XXX-X',
    • 'remarks' => 'Hier kan een opmerking geplaatst worden.',
    • 'products' => array(
      • array(
        • 'ean' => 0000000000000,
        • 'qty' => 0
      • ),
      • array(
        • 'ean' => 0000000000000,
        • 'qty' => 0
      • )
    • )
  • );

  • $curl = curl_init();
  • curl_setopt($curl, CURLOPT_URL, $Url);
  • curl_setopt($curl, CURLOPT_POST, true);
  • curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
  • curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post));
  • curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  • $output = curl_exec($curl);
  • curl_close($curl);

  • header("Content-Type: application/json");
  • echo $output;

  • ?>