Example with all allowed parameters
<?php
$url = 'https://www.vendus.pt/ws/v1.1/registers/12345/movements/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'POST';
$params = array(
'operation' => 'open',
'type' => 'NU',
'amount' => 23.15,
'obs' => 'Took out money to pay our supplier',
'email' => '1234@gmail.com',
'return' => 'summary',
'output' => 'html',
);
$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);
?>
Request
Name | Type | Example | Description |
---|
operation | string
in - Entrada
out - Saída
open - Abertura
close - Fecho
point - Ponto de Caixa
| Operation |
type | string
NU - Numerário
CC - Cartão de Crédito
CD - Cartão de Débito
CO - Cartão Oferta
CS - Compensação de Saldos C/C
DE - Cartão de Pontos
TR - Ticket Restaurante
MB - Referência MB
OU - Outro
CH - Cheque Bancário
LC - Letra Comercial
TB - Transferência Bancária
PR - Permuta de Bens
MBWAY - MB WAY
ZARPH - Zarph
ALICE - Alice
CASHMATIC - Cashmatic
CASHLOGY - Cashlogy
ITHINKIOT - iThink IoT
MYPOS - MyPOS
TPASIBS - TPA SIBS
VENDUSPAY - Vendus Pay
| Official type |
amount | currency | 23.15 | Amount |
obs | text | Took out money to pay our supplier | Some text explaining the movement |
email | email | 1234@gmail.com | email |
return | string summary, list | What to return |
output | string pdf, escpos, html, email | Printable Output |
Response
Name | Type | Example | Description |
---|
operation | string | open | Operation |
type | string | NU | Official type |
amount | currency | 23.15 | Amount |
obs | text | Took out money to pay our supplier | Observations |
output | text | Base64 Encoded | Printable output |