<?php
$url = 'https://www.vendus.pt/ws/v1.1/products/categories/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
?><?php
$url = 'https://www.vendus.pt/ws/v1.1/products/categories/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'GET';
$params = array(
'title' => 'book',
'store_id' => 123,
'status' => 'XBD001',
);
$url .= '?' . http_build_query($params);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
$result = curl_exec($curl);
?>| Name | Type | Example | Description |
|---|---|---|---|
| title | string | book | String to be searched on title |
| store_id | int | 123 | Store ID |
| status | string on, off, delete | Status | |
| Name | Type | Example | Description |
|---|---|---|---|
| id | int | 12345 | ID |
| title | string | Books | Name |
| status | string on, off, delete | Status | |
| order | int | 1 | Order |
| all_stores | string no, yes | Description | |
| products_order | string order, title, ukey_id | Order Type Order by the POS | |
| kitchen_request | string yes, no | Description | |
<?php
$url = 'https://www.vendus.pt/ws/v1.1/products/categories/12345/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
?><?php
$url = 'https://www.vendus.pt/ws/v1.1/products/categories/12345/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
?>| Name | Type | Example | Description |
|---|---|---|---|
| id | int | 12345 | ID |
| title | string | Books | Name |
| status | string on, off, delete | Status | |
<?php
$url = 'https://www.vendus.pt/ws/v1.1/products/categories/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'POST';
$params = array(
'title' => 'Fruits and Vegetables',
'status' => 'on',
);
$content = json_encode($params);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
"Content-type: application/json",
"Content-Length: " . strlen($content),
)
);
$result = curl_exec($curl);
?>| Name | Type | Example | Description |
|---|---|---|---|
| title | string | Fruits and Vegetables | Title |
| status | string on, off, delete | Status | |
| Name | Type | Example | Description |
|---|---|---|---|
| id | int | 12345 | ID |
| title | string | Books | Name |
| status | string on, off, delete | Status | |