GET https://{entorno}.ticketbaiws.eus/tbai-xml/
Este método descargarse los ficheros XML generados en la solicitud y la respuesta a la diputación correspondiente
PARÁMETROS
serie string obligatorio Serie de la factura | A |
numero string obligatorio Número de factura | 2021000123 |
$ curl --request GET \
--url https://api-test.ticketbaiws.eus/tbai-xml/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Token: xxx' \
--header 'Nif: 00000014Z'
--data '{"serie":"A","numero":"2021000123"}'
$ composer require guzzlehttp/guzzle
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api-test.ticketbaiws.eus/tbai-xml/', [
'body' => '{"serie":"A","numero":"2021000123"}',
'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-xml/"
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-xml/");
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-xml/?serie=A&numero=2021000123")
.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": {
"xml_request" : "<?xml version='1.0' encoding='UTF-8'?><T:TicketBai xmlns:T='urn:tick. ...",
"xml_response" : "<?xml version='1.0' encoding='UTF-8' standalone ..."
},
"msg": null
}