<?php
$url = 'https://www.vendus.pt/ws/v1.0/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.0/categories/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'GET';
$params = array(
'title' => 'book',
'status' => 'on',
);
$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 |
status | string on, off, delete | Status |
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.0/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.0/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.0/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 |
<?php
$url = 'https://www.vendus.pt/ws/v1.0/categories/12345/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'PATCH';
$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 |