Example with mandatory parameters
<?php
$url = 'https://www.vendus.co.ao/ws/v1.1/rooms/';
$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);
?>
Example with all allowed parameters
<?php
$url = 'https://www.vendus.co.ao/ws/v1.1/rooms/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'GET';
$params = array(
'store_id' => 1234,
);
$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);
?>
Request
Name | Type | Example | Description |
---|
store_id | int | 1234 | Store ID |
Response
Name | Type | Example | Description |
---|
id | int | | Room ID |
title | string | Sala AB | Title |
description | string | Sala do Piso 2 | Description |
store_id | int | 123 | Store ID |
order | int | 1 | Display order in a list |
people_request | string | yes|no | If table should request the number of people for open it |