API > Get licenses
Get licenses
GET https://api.ticketbaiws.eus/licencias/
This method returns the list of subscribed licenses
GET methods accept the parameters either in the body as a JSON payload or as a query string in the URL, as shown in the cURL example.
PARAMETERS
| id_licencia integer optional If omitted, all licenses are returned | 999 |
GET https://api.ticketbaiws.eus/licencias/
$ curl --request GET \
--url https://api.ticketbaiws.eus/licencias/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Token: xxx' \
--header 'Nif: 00000014Z'
--data '{"id_licencia": "999"}'
$ composer require ticketbaiws/ticketbaiws-php
<?php
// Installation: composer require ticketbaiws/ticketbaiws-php
require 'vendor/autoload.php';
$cuenta = new \TicketbaiWS\Cuenta('xxx', '00000014Z'); // token de desarrollador y NIF de la cuenta
$r = $cuenta->listarLicencias(999);
if ($r->isError()) {
echo $r->getMessageText();
} else {
print_r($r->getData());
}
$ python -m pip install requests
import requests
url = "https://api.ticketbaiws.eus/licencias/"
headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("GET", url, headers=headers)
print(response.text)
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.ticketbaiws.eus/licencias/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ticketbaiws.eus/licencias/")
.get()
.addHeader("Accept", "application/json")
.addHeader("Token", "xxx")
.addHeader("Nif", "00000014Z")
.build();
Response response = client.newCall(request).execute();
{ } Response JSON
HTTP/1.1 200 OK
{
"result": "OK",
"return": [
{
"id": "1",
"id_plan": "3",
"fecha_alta": "1648120433",
"fecha_fin": "1679656433",
"renovacion_auto": "1",
"anual": "1",
"nombre_es": "Plan básico",
"nombre_eu": "Oinarrizko plana",
"precio_mensual": "5.99",
"precio_anual": "59.88",
"max_tickets_mes": "30",
"max_empresas": "1",
"max_facturacion": "6000",
"n_empresas": "1"
},
{
"id": "24",
"id_plan": "1",
"fecha_alta": "1648120433",
"fecha_fin": "1679656433",
"renovacion_auto": "1",
"anual": "1",
"nombre_es": "NIF adicional",
"nombre_eu": "IFZ Gehigarria",
"precio_mensual": "4.99",
"precio_anual": "59.88",
"max_tickets_mes": "0",
"max_empresas": "1",
"max_facturacion": "0",
"n_empresas": "1"
}
],
"msg": null
}
