DEL https://{entorno}.ticketbaiws.eus/lroe-recibidas/
ATENCIÓN: Este método únicamente es válido para BATUZ Bizkaia. Permite anular facturas recibidas (compras) que previamente hemos enviado al LROE de Batuz
PARÁMETROS
ejercicio integer obligatorio Año fiscal del ejercicio del bloque de facturas recibicas en formato yyyy | 2023 | ||||||
facturas object array obligatorio (máx 1000) registros
|
$ curl --request DELETE \
--url https://api-test.ticketbaiws.eus/lroe-recibidas/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Token: xxx' \
--header 'Nif: 00000014Z'
--data '
{
"ejercicio": 2023,
"facturas":[
{
"nif": "B01000012",
"num_factura": "2023715273",
}
]
}'
$ composer require guzzlehttp/guzzle
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://api-test.ticketbaiws.eus/lroe-recibidas/', [
'body' => '{"ejercicio": 2023,"facturas":[{"nif": "B01000012","num_factura": "2023715273"}]}',
'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/lroe-recibidas/"
payload = {
"ejercicio": 2023,
"facturas":[
{
"nif": "B01000012",
"num_factura": "2023715273",
}
]
}
headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("DELETE", url, json=payload, headers=headers)
print(response.text)
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-test.ticketbaiws.eus/lroe-recibidas/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_delFIELDS, '{"ejercicio": 2023,"facturas":[{"nif": "B01000012","num_factura": "2023715273"}]}');
CURLcode ret = curl_easy_perform(hnd);
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{"ejercicio": 2023,"facturas":[{"nif": "B01000012","num_factura": "2023715273"}]}');
Request request = new Request.Builder()
.url("https://api-test.ticketbaiws.eus/lroe-recibidas/")
.DELETE(body)
.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": {
"response": [
{
"fecha": "02-09-2023",
"num_factura": "2023/3/075",
"estado": "Correcto",
"nif": "B01489350"
},
{
"fecha": "02-09-2023",
"num_factura": "2023/3/076",
"estado": "Correcto",
"nif": "B01489350"
}
],
"status": "OK"
},
"msg": null
}