GET https://{entorno}.ticketbaiws.eus/ticketbai-list/
Este método devuelve el listado de facturas TicketBAI generadas entre dos fechas.
PARÁMETROS
| fecha_inicio string obligatorio Fecha inicio desde la cual realizar la consulta en formato DD/MM/YYYY | 01/10/2021 |
| fecha_fin string obligatorio Fecha fin hasta la cual realizar la consulta en formato DD/MM/YYYY | 31/12/2021 |
$ curl --request GET \
--url https://api-test.ticketbaiws.eus/tbai-list/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Token: xxx' \
--header 'Nif: 00000014Z'
--data '{"fecha_inicio": "01\/10\/2021","fecha_fin": "31\/12\/2021","pagina":1}'
$ composer require guzzlehttp/guzzle
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api-test.ticketbaiws.eus/tbai-list/', [
'body' => '{"fecha_inicio": "01\/10\/2021","fecha_fin": "31\/12\/2021","pagina":1}',
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
'Token' => 'xxx',
'Nif' => '00000014Z'
],
]);
echo $response->getBody();
$ python -m pip install requests
import requests
url = "https://api-test.ticketbaiws.eus/tbai-list/?fecha_inicio=01/01/2022&fecha_fin=31/12/2022&pagina=1"
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-test.ticketbaiws.eus/tbai-list/?fecha_inicio=01/01/2022&fecha_fin=31/12/2022&pagina=1");
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-test.ticketbaiws.eus/tbai-list/?fecha_inicio=01/01/2022&fecha_fin=31/12/2022&pagina=1")
.get()
.addHeader("Accept", "application/json")
.addHeader("Token", "xxx")
.addHeader("Nif", "00000014Z")
.build();
Response response = client.newCall(request).execute();
HTTP/1.1 200 OK
{
"result": "OK",
"return": [
{
"status" : "OK",
"serie" : "A",
"numero" : "2021000123",
"fecha" : "01\/10\/2021",
"fecha_factura" : "01\/10\/2021",
"nif" : "B01000012",
"importe" : 132.10,
"zuzendu" : false
},
{
"status" : "OK",
"serie" : "A",
"numero" : "2021000123",
"fecha" : "01\/10\/2021",
"fecha_factura" : "01\/10\/2021",
"nif" : "B01000012",
"importe" : 132.10,
"zuzendu" : false
},
{
"status" : "OK",
"serie" : "A",
"numero" : "2021000123",
"fecha" : "01\/10\/2021",
"fecha_factura" : "01\/10\/2021",
"nif" : "B01000012",
"importe" : 132.10,
"zuzendu" : false
},
{
"status" : "OK",
"serie" : "A",
"numero" : "2021000123",
"fecha" : "01\/10\/2021",
"fecha_factura" : "01\/10\/2021",
"nif" : "B01000012",
"importe" : 132.10,
"zuzendu" : false
}
],
"msg": "Showing 1 to 250 of 292",
"count": "292"
}