Example with mandatory parameters
<?php
$url = 'https://pos.cloudware.pt/ws/v1.1/kitchens/';
$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://pos.cloudware.pt/ws/v1.1/kitchens/';
$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 | | Kitchen ID |
title | string | Cozinha AB | Title |
description | string | Cozinha do Piso 2 | Description |
store_id | int | 123 | Store ID |