Pirkinių krepšelis:
curl -X 'GET' \ 'https://matterhorn-wholesale.com/B2BAPI/ITEMS/?page=1' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'
$curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://matterhorn-wholesale.com/B2BAPI/ITEMS/", CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "accept: application/json", "Authorization: YOUR-API-KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error: " . $err; } else { $assocArray = json_decode($response, true); print_r($assocArray); // YOUR CODE HERE... }
curl -X 'GET' \ 'https://matterhorn-wholesale.com/B2BAPI/DICTIONARIES/BRANDS \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'
curl -X 'GET' \ 'https://matterhorn-wholesale.com/B2BAPI/DICTIONARIES/CATEGORIES' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'
'https://matterhorn-wholesale.com/B2BAPI/ITEMS/?brand_id=428' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'
// GETTING FIRST PAGE (100 products) of Numoco brand (brand_id=428) // you can use limit=numRowsPerPage parameter to change page size. Max page size is1000. // example: https://matterhorn-wholesale.com/B2BAPI/ITEMS/?brand_id=428&page=1&limit=500 $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://matterhorn-wholesale.com/B2BAPI/ITEMS/?brand_id=428&page=1", CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "accept: application/json", "Authorization: YOUR-API-KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error: " . $err; } else { $productsArr = json_decode($response, true); print_r($productsArr); // YOUR CODE HERE }
curl -X 'GET' \ 'https://matterhorn-wholesale.com/B2BAPI/ITEMS/186365' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'
$curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://matterhorn-wholesale.com/B2BAPI/ITEMS/186365", CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "accept: application/json", "Authorization: YOUR-API-KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error: " . $err; } else { $productsInfoArray = json_decode($response, true); print_r($productsInfoArray); // YOUR CODE HERE... }
{ "id": "186365", "active": "true", "name": " Daydress model 186365 Top Secret ", "name_without_number": " Daydress Top Secret ", "description": "This loose-fitting turtleneck dress is a combination of comfort and elegance. The 3/4 sleeves add lightness, and the smooth material makes it perfect for many occasions. The stand-up collar adds character to the dress, and the loose cut ensures comfortable wear. It's a great option for everyday styling.", "creation_date": "2023-09-26 00:00:00", "color": "green", "category_name": "Day Dresses", "category_id": "42", "category_path": "/WOMEN/Women's Clothing/Dresses/Day Dresses", "brand_id": "261", "brand": "Top Secret", "stock_total": 172, "url": "http://matterhorn-wholesale.com/daydress_no_186365_prod_id-186365.htm", "images": [ "http://matterhorn-wholesale.com/db_images/custom900x1200_997785.jpg", "http://matterhorn-wholesale.com/db_images/custom900x1200_997786.jpg", "http://matterhorn-wholesale.com/db_images/custom900x1200_997787.jpg" ], "new_collection": "Y", "variants": [ { "variant_uid": "1090549", "name": "34", "stock": "35", "max_processing_time": "3", "ean": "" }, { "variant_uid": "1090550", "name": "36", "stock": "19", "max_processing_time": "3", "ean": "" }, { "variant_uid": "1090551", "name": "38", "stock": "40", "max_processing_time": "3", "ean": "" }, { "variant_uid": "1090552", "name": "40", "stock": "40", "max_processing_time": "3", "ean": "" }, { "variant_uid": "1090553", "name": "42", "stock": "38", "max_processing_time": "3", "ean": "" } ], "size_table": "\n\t\t\tSpandex 3 % Polyester 97 % \n\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\tSizeTotal lengthChest\n\t\t\t\t\n\t\t\t3491 cm92 cm3691 cm96 cm3893 cm100 cm4093 cm104 cm4295 cm108 cm\n\t\t\n\t\t", "prices": { "EUR": 12.9, "CHF": 15.9, "CZK": 317.9, "USD": 13.9, "RUB": 9154.9, "CAD": 18.9, "AUD": 17.9, "GBP": 10.9, "BGN": 24.9, "DKK": 93.9, "NOK": 110.9, "RON": 57.9, "SEK": 126.9, "HUF": 4572.9 }, "size_table_txt": " \t\t\tSpandex 3 % Polyester 97 % \t\t \t\t\t \t\t\t\t \t\t\t\t\tSizeTotal lengthChest \t\t\t\t \t\t\t3491 cm92 cm3691 cm96 cm3893 cm100 cm4093 cm104 cm4295 cm108 cm \t\t \t\t", "size_table_html": " \t\t\tSpandex 3 % Polyester 97 % \t\t \t\t\t \t\t\t\t \t\t\t\t\tSizeTotal lengthChest \t\t\t\t \t\t\t3491 cm92 cm3691 cm96 cm3893 cm100 cm4093 cm104 cm4295 cm108 cm \t\t \t\t" }
curl -X 'PUT' \ 'https://matterhorn-wholesale.com/B2BAPI/ACCOUNT/ORDERS/' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY' \ -H 'Content-Type: application/json' \ -d '{ "items": [ { "variant_uid": 1090551, "quantity": 4 }, { "variant_uid": 1090552, "quantity": 2 } ], "delivery_to": { "first_name": "John", "second_name": "Smith", "country": "de", "street": "Musterstraße", "house_number": "123", "zip": "10115", "city": "Berlin" }, "currency": "EUR", "delivery_method_id": 160 }'
$curl = curl_init(); $data = [ "items" => [ [ "variant_uid" => 1090551, "quantity" => 4 ], [ "variant_uid" => 1090552, "quantity" => 2 ] ], "delivery_to" => [ "first_name" => "John", "second_name" => "Smith", "country" => "de", "street" => "Musterstraße", "house_number" => "123", "zip" => "10115", "city" => "Berlin" ], "currency" => "EUR", "delivery_method_id" => 160 ]; curl_setopt_array($curl, [ CURLOPT_URL => "https://matterhorn-wholesale.com/B2BAPI/ACCOUNT/ORDERS/", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => [ "accept: application/json", "Authorization: YOUR-API-KEY", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error: " . $err; } else { echo $response; }
curl -X 'GET' \ 'https://matterhorn-wholesale.com/B2BAPI/DICTIONARIES/DELIVERY' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'
$curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://matterhorn-wholesale.com/B2BAPI/DICTIONARIES/DELIVERY", CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "accept: application/json", "Authorization: YOUR-API-KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error: " . $err; } else { echo $response; }
curl -X 'GET' \ 'https://matterhorn-wholesale.com/B2BAPI/ACCOUNT/ORDERS/12345' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'
{ "id": "67062", "order_date": "2023-10-04 09:14:07", "invoice_number": "", "invoice_url": "", "shipping_number": "", "tracking_url": "https://gls-group.eu/PL/en/parcel-tracking?match=", "shipping_service": "GLS", "status": "New order", "completed_rate": 0, "order_currency": "EUR", "total_net": 80.56, "total_gross": 95.86, "tax": 15.3, "payment_url": "https://matterhorn-wholesale.com/rwd_checkout.php?order_ext=67062&step=4&hashed=sdgsdgdsgdsfgdfsgsfgsdfg", "delivery_to": { "recipient": "John Smith", "country": "de", "street": "Musterstraße 123 / ", "city": "Berlin", "zip": "10115", "phone": "" }, "positions": [ { "order_position_id": "13326161", "product_id": "186365", "product_variant": "40", "product_variant_uid": "1090552", "product_name": " Daydress model 186365 Top Secret ", "product_url": "https://matterhorn-wholesale.com/daydress_no_186365_prod_id-186365.htm", "product_image": "https://matterhorn-wholesale.com/db_images/medium158x272_997785.jpg", "quantity": "1", "netprice": 12.9, "grossprice": 15.35, "type": "product", "status": "waiting", "ean": 0 }, { "order_position_id": "13326162", "product_id": "186365", "product_variant": "40", "product_variant_uid": "1090552", "product_name": " Daydress model 186365 Top Secret ", "product_url": "https://matterhorn-wholesale.com/daydress_no_186365_prod_id-186365.htm", "product_image": "https://matterhorn-wholesale.com/db_images/medium158x272_997785.jpg", "quantity": "1", "netprice": 12.9, "grossprice": 15.35, "type": "product", "status": "waiting", "ean": 0 }, { "order_position_id": "13326163", "product_id": "186365", "product_variant": "38", "product_variant_uid": "1090551", "product_name": " Daydress model 186365 Top Secret ", "product_url": "https://matterhorn-wholesale.com/daydress_no_186365_prod_id-186365.htm", "product_image": "https://matterhorn-wholesale.com/db_images/medium158x272_997785.jpg", "quantity": "1", "netprice": 12.9, "grossprice": 15.35, "type": "product", "status": "waiting", "ean": 0 }, { "order_position_id": "13326164", "product_id": "186365", "product_variant": "38", "product_variant_uid": "1090551", "product_name": " Daydress model 186365 Top Secret ", "product_url": "https://matterhorn-wholesale.com/daydress_no_186365_prod_id-186365.htm", "product_image": "https://matterhorn-wholesale.com/db_images/medium158x272_997785.jpg", "quantity": "1", "netprice": 12.9, "grossprice": 15.35, "type": "product", "status": "waiting", "ean": 0 }, { "order_position_id": "13326165", "product_id": "186365", "product_variant": "38", "product_variant_uid": "1090551", "product_name": " Daydress model 186365 Top Secret ", "product_url": "https://matterhorn-wholesale.com/daydress_no_186365_prod_id-186365.htm", "product_image": "https://matterhorn-wholesale.com/db_images/medium158x272_997785.jpg", "quantity": "1", "netprice": 12.9, "grossprice": 15.35, "type": "product", "status": "waiting", "ean": 0 }, { "order_position_id": "13326166", "product_id": "186365", "product_variant": "38", "product_variant_uid": "1090551", "product_name": " Daydress model 186365 Top Secret ", "product_url": "https://matterhorn-wholesale.com/daydress_no_186365_prod_id-186365.htm", "product_image": "https://matterhorn-wholesale.com/db_images/medium158x272_997785.jpg", "quantity": "1", "netprice": 12.9, "grossprice": 15.35, "type": "product", "status": "waiting", "ean": 0 }, { "order_position_id": "13326167", "product_id": "0", "product_variant": null, "product_variant_uid": "0", "product_name": null, "product_url": "https://matterhorn-wholesale.com/", "product_image": "https://matterhorn-wholesale.com/", "quantity": "1", "netprice": -7.74, "grossprice": -9.21, "type": "discount", "status": "ready", "ean": "" }, { "order_position_id": "13326168", "product_id": "0", "product_variant": null, "product_variant_uid": "0", "product_name": null, "product_url": "https://matterhorn-wholesale.com/", "product_image": "https://matterhorn-wholesale.com/", "quantity": "1", "netprice": 10.9, "grossprice": 12.97, "type": "shipping cost", "status": "ready", "ean": "" } ] }
curl -X 'GET' \ 'https://matterhorn-moda.de/B2BAPI/ACCOUNT/ORDERS/12345' \ -H 'accept: application/json' \ -H 'Authorization: YOUR-API-KEY'