Example with mandatory parameters
<?php
$url = 'https://www.vendus.es/ws/v1.1/taxauthority/saft/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'GET';
$params = array(
'year' => 2024,
'month' => 3,
);
$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);
?>
Example with all allowed parameters
<?php
$url = 'https://www.vendus.es/ws/v1.1/taxauthority/saft/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'GET';
$params = array(
'year' => 2024,
'month' => 3,
);
$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 |
---|
year | int | 2024 | Year |
month | int | 3 | Month |
Response
Name | Type | Example | Description |
---|
year | int | 2024 | Year |
month | int | 3 | Month |
xml | string | | Base64 encoded xml |