<?php
$url = 'https://pos.cloudware.pt/ws/v1.1/receipts/';
$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://pos.cloudware.pt/ws/v1.1/receipts/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'GET';
$params = array(
'status' => 'active',
);
$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 |
---|---|---|---|
status | string active, inactive | Status |
Name | Type | Example | Description |
---|---|---|---|
id | int | Receipt ID | |
title | string | Documento A4 | Title |
type | string layouta4, receipt | Type |
<?php
$url = 'https://pos.cloudware.pt/ws/v1.1/receipts/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://pos.cloudware.pt/ws/v1.1/receipts/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 | Receipt ID | |||||||||||||||||||||||||
type | string layouta4, receipt | Type | |||||||||||||||||||||||||
title | string | Documento A4 | Title | ||||||||||||||||||||||||
comercial_name | string | Comercial Name | |||||||||||||||||||||||||
phone | string | 210192930 | Phone | ||||||||||||||||||||||||
phone_cost | string none, phone, mobile, other | Phone Cost | |||||||||||||||||||||||||
phone_cost_other | string | Custom Phone Cost | |||||||||||||||||||||||||
mobile | string | 918 876 546 | Cellphone | ||||||||||||||||||||||||
mobile_cost | string none, phone, mobile, other | Mobile Cost | |||||||||||||||||||||||||
mobile_cost_other | string | Custom Mobile Cost | |||||||||||||||||||||||||
fax | string | 210 192 930 | Fax | ||||||||||||||||||||||||
alberto.lopes@dominio.pt | |||||||||||||||||||||||||||
site | url | https://www.dominio.pt | Site url | ||||||||||||||||||||||||
nib | string | 1234 4321 12345678901 72 | |||||||||||||||||||||||||
iban | string | PT50 1234 4321 12345678901 72 | |||||||||||||||||||||||||
swift | string | CGDIPTPL | Swift | ||||||||||||||||||||||||
header | string | Header Text | |||||||||||||||||||||||||
footer | string | Footer Text | |||||||||||||||||||||||||
served | string | Served | |||||||||||||||||||||||||
show_references | string yes, no | Show References | |||||||||||||||||||||||||
show_tax | string yes, no | Show Tax | |||||||||||||||||||||||||
show_operator | string yes, no | Show Operator Name | |||||||||||||||||||||||||
bilingual | string yes, no | Show Bilingual | |||||||||||||||||||||||||
show_address | string yes, no | Show Address | |||||||||||||||||||||||||
nc_signature | string yes, no | NC - Signature | |||||||||||||||||||||||||
qrcode | string no, native, image, image_hd | Qrcode Type | |||||||||||||||||||||||||
layout_id | string | Layout ID | |||||||||||||||||||||||||
colors | immutable | Layout Colors | |||||||||||||||||||||||||
images | array | Images List | |||||||||||||||||||||||||
|
<?php
$url = 'https://pos.cloudware.pt/ws/v1.1/receipts/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'POST';
$params = array(
'title' => 'Documento A4',
'comercial_name' => '',
'type' => 'layouta4',
'phone' => '210192930',
'phone_cost' => 'none',
'phone_cost_other' => '',
'mobile' => '918 876 546',
'mobile_cost' => 'none',
'mobile_cost_other' => '',
'fax' => '210 192 930',
'email' => 'alberto.lopes@dominio.pt',
'site' => 'https://www.dominio.pt',
'nib' => '1234 4321 12345678901 72',
'iban' => 'PT50 1234 4321 12345678901 72',
'swift' => 'CGDIPTPL',
'header' => '',
'footer' => '',
'served' => '',
'show_references' => 'yes',
'show_tax' => 'yes',
'show_operator' => 'yes',
'bilingual' => 'yes',
'show_address' => 'yes',
'nc_signature' => 'yes',
'qrcode' => 'no',
'layout_id' => '',
'colors' => '',
'image' => 'https://www.site.com/img/1.png',
);
$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 | Documento A4 | Title |
comercial_name | string | Comercial Name | |
type | string receipt, layouta4 | Type | |
phone | string | 210192930 | Phone |
phone_cost | string none, phone, mobile, other | Phone Cost | |
phone_cost_other | string | Custom Phone Cost | |
mobile | string | 918 876 546 | Cellphone |
mobile_cost | string none, phone, mobile, other | Mobile Cost | |
mobile_cost_other | string | Custom Mobile Cost | |
fax | string | 210 192 930 | Fax |
alberto.lopes@dominio.pt | |||
site | url | https://www.dominio.pt | Site url |
nib | string | 1234 4321 12345678901 72 | |
iban | string | PT50 1234 4321 12345678901 72 | |
swift | string | CGDIPTPL | Swift |
header | string | Header Text | |
footer | string | Footer Text | |
served | string | Served | |
show_references | string yes, no | Show References | |
show_tax | string yes, no | Show Tax | |
show_operator | string yes, no | Show Operator | |
bilingual | string yes, no | Bilingual | |
show_address | string yes, no | Show Address | |
nc_signature | string yes, no | NC - Signature | |
qrcode | string no, native, image, image_hd | Qrcode Type | |
layout_id | string | Layout ID | |
colors | immutable | Layout Colors | |
image | string | https://www.site.com/img/1.png | Image Either an url or a base64 encoded string |
Name | Type | Example | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | int | Receipt ID | |||||||||||||||||||||||||
type | string layouta4, receipt | Type | |||||||||||||||||||||||||
title | string | Documento A4 | Title | ||||||||||||||||||||||||
comercial_name | string | Comercial Name | |||||||||||||||||||||||||
phone | string | 210192930 | Phone | ||||||||||||||||||||||||
phone_cost | string none, phone, mobile, other | Phone Cost | |||||||||||||||||||||||||
phone_cost_other | string | Custom Phone Cost | |||||||||||||||||||||||||
mobile | string | 918 876 546 | Cellphone | ||||||||||||||||||||||||
mobile_cost | string none, phone, mobile, other | Mobile Cost | |||||||||||||||||||||||||
mobile_cost_other | string | Custom Mobile Cost | |||||||||||||||||||||||||
fax | string | 210 192 930 | Fax | ||||||||||||||||||||||||
alberto.lopes@dominio.pt | |||||||||||||||||||||||||||
site | url | https://www.dominio.pt | Site url | ||||||||||||||||||||||||
nib | string | 1234 4321 12345678901 72 | |||||||||||||||||||||||||
iban | string | PT50 1234 4321 12345678901 72 | |||||||||||||||||||||||||
swift | string | CGDIPTPL | Swift | ||||||||||||||||||||||||
header | string | Header Text | |||||||||||||||||||||||||
footer | string | Footer Text | |||||||||||||||||||||||||
served | string | Served | |||||||||||||||||||||||||
show_references | string yes, no | Show References | |||||||||||||||||||||||||
show_tax | string yes, no | Show Tax | |||||||||||||||||||||||||
show_operator | string yes, no | Show Operator Name | |||||||||||||||||||||||||
bilingual | string yes, no | Show Bilingual | |||||||||||||||||||||||||
show_address | string yes, no | Show Address | |||||||||||||||||||||||||
nc_signature | string yes, no | NC - Signature | |||||||||||||||||||||||||
qrcode | string no, native, image, image_hd | Qrcode Type | |||||||||||||||||||||||||
layout_id | string | Layout ID | |||||||||||||||||||||||||
colors | immutable | Layout Colors | |||||||||||||||||||||||||
images | array | Images List | |||||||||||||||||||||||||
|
<?php
$url = 'https://pos.cloudware.pt/ws/v1.1/receipts/12345/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'PATCH';
$params = array(
'title' => 'Documento A4',
'comercial_name' => '',
'type' => 'layouta4',
'phone' => '210192930',
'phone_cost' => 'none',
'phone_cost_other' => '',
'mobile' => '918 876 546',
'mobile_cost' => 'none',
'mobile_cost_other' => '',
'fax' => '210 192 930',
'email' => 'alberto.lopes@dominio.pt',
'site' => 'https://www.dominio.pt',
'nib' => '1234 4321 12345678901 72',
'iban' => 'PT50 1234 4321 12345678901 72',
'swift' => 'CGDIPTPL',
'header' => '',
'footer' => '',
'served' => '',
'show_references' => 'yes',
'show_tax' => 'yes',
'show_operator' => 'yes',
'bilingual' => 'yes',
'show_address' => 'yes',
'nc_signature' => 'yes',
'qrcode' => 'no',
'layout_id' => '',
'colors' => '',
'image' => 'https://www.site.com/img/1.png',
);
$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 | Documento A4 | Title |
comercial_name | string | Comercial Name | |
type | string receipt, layouta4 | Type | |
phone | string | 210192930 | Phone |
phone_cost | string none, phone, mobile, other | Phone Cost | |
phone_cost_other | string | Custom Phone Cost | |
mobile | string | 918 876 546 | Cellphone |
mobile_cost | string none, phone, mobile, other | Mobile Cost | |
mobile_cost_other | string | Custom Mobile Cost | |
fax | string | 210 192 930 | Fax |
alberto.lopes@dominio.pt | |||
site | url | https://www.dominio.pt | Site url |
nib | string | 1234 4321 12345678901 72 | |
iban | string | PT50 1234 4321 12345678901 72 | |
swift | string | CGDIPTPL | Swift |
header | string | Header Text | |
footer | string | Footer Text | |
served | string | Served | |
show_references | string yes, no | Show References | |
show_tax | string yes, no | Show Tax | |
show_operator | string yes, no | Show Operator | |
bilingual | string yes, no | Bilingual | |
show_address | string yes, no | Show Address | |
nc_signature | string yes, no | NC - Signature | |
qrcode | string no, native, image, image_hd | Qrcode Type | |
layout_id | string | Layout ID | |
colors | immutable | Layout Colors | |
image | string | https://www.site.com/img/1.png | Image Either an url or a base64 encoded string |
Name | Type | Example | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | int | Receipt ID | |||||||||||||||||||||||||
type | string layouta4, receipt | Type | |||||||||||||||||||||||||
title | string | Documento A4 | Title | ||||||||||||||||||||||||
comercial_name | string | Comercial Name | |||||||||||||||||||||||||
phone | string | 210192930 | Phone | ||||||||||||||||||||||||
phone_cost | string none, phone, mobile, other | Phone Cost | |||||||||||||||||||||||||
phone_cost_other | string | Custom Phone Cost | |||||||||||||||||||||||||
mobile | string | 918 876 546 | Cellphone | ||||||||||||||||||||||||
mobile_cost | string none, phone, mobile, other | Mobile Cost | |||||||||||||||||||||||||
mobile_cost_other | string | Custom Mobile Cost | |||||||||||||||||||||||||
fax | string | 210 192 930 | Fax | ||||||||||||||||||||||||
alberto.lopes@dominio.pt | |||||||||||||||||||||||||||
site | url | https://www.dominio.pt | Site url | ||||||||||||||||||||||||
nib | string | 1234 4321 12345678901 72 | |||||||||||||||||||||||||
iban | string | PT50 1234 4321 12345678901 72 | |||||||||||||||||||||||||
swift | string | CGDIPTPL | Swift | ||||||||||||||||||||||||
header | string | Header Text | |||||||||||||||||||||||||
footer | string | Footer Text | |||||||||||||||||||||||||
served | string | Served | |||||||||||||||||||||||||
show_references | string yes, no | Show References | |||||||||||||||||||||||||
show_tax | string yes, no | Show Tax | |||||||||||||||||||||||||
show_operator | string yes, no | Show Operator Name | |||||||||||||||||||||||||
bilingual | string yes, no | Show Bilingual | |||||||||||||||||||||||||
show_address | string yes, no | Show Address | |||||||||||||||||||||||||
nc_signature | string yes, no | NC - Signature | |||||||||||||||||||||||||
qrcode | string no, native, image, image_hd | Qrcode Type | |||||||||||||||||||||||||
layout_id | string | Layout ID | |||||||||||||||||||||||||
colors | immutable | Layout Colors | |||||||||||||||||||||||||
images | array | Images List | |||||||||||||||||||||||||
|