API INTEGRATION INFORMATION
RO | EN
Cardapp Cloud API is a flexible interface compatible with the most commonly used programming languages. This API interface allows the integration of the Cardapp Cloud platform with other online applications.

All communications with the Cardapp Cloud API are encrypted using the HTTPS or SSL protocol. Any unsecured call (HTTP only) is automatically rejected.

Features accessible through API methods

Checking card types;
Issuing new loyalty cards;
Adding bonus points and recording payments;
Refund/ cancel an order;
Using / querying / spending points from the card;
Checking the number of points accumulated on the card;
API CONNECTION DETAILS
Username
emailul_dvs@Domeniu_Dvs.ro

API KEY
TEST-123121313132fsdfdsfdsf4546464645

Access link for querying the Cardapp platform via cURL POST / GET
https://Subdomeniu.Domeniu_Dvs.ro/api/response.php

Queries can be performed using CURLOPT_POST (recommended) or GET.

WARNING! Make sure to enter your API credentials correctly. Otherwise, access to the API application will be automatically blocked after 3 consecutive failed queries!
EXEMPLU COD PHP METODA CURL POST

<?php
if (isset($_POST['submit'])) {

$apikey = $_POST['apikey'];
$telefon = $_POST['telefon'];
$email = $_POST['email'];
$nume = $_POST['nume'];
$prenume = $_POST['prenume'];
$action = 'creare';
$send_card = $_POST['send_card'];

$url='https://Subdomeniu.Domeniu_Dvs.ro/api/response.php';
$order_data_a = array(
"apikey=".$apikey,
"telefon=".$telefon,
"email=".$email,
"prenume=".$prenume,
"nume=".$nume,
"action=".$action,
"send_card=".$send_card
);
$order_data = implode("&", $order_data_a);

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POSTFIELDS, $order_data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$response = curl_exec($ch);

$result = json_decode($response, true);
$cod = $result['status'];

if( $cod=='success' ) {
$nr_card = $result['nr_card'];

echo "Card Creat!<br>";
echo "NUMAR CARD: $nr_card";

}
if( $cod=='error_mail' ) {

$mess=$result['mess'];
echo "Cod: $cod ";
echo "Mesaj: $mess";

}
if( $cod=='error_api' ) {

$mess=$result['mess'];
echo "Cod: $cod ";
echo "Mesaj: $mess";
}

}
?>