DEL https://{entorno}.ticketbaiws.eus/lroe-critcaja-cobros/
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. Este método es para empresas o personas autónomas acogidas al régimen especial del criterio de caja
PARÁMETROS
ejercicio integer obligatorio Año fiscal del ejercicio del bloque de cobros en formato yyyy | 2023 | ||||||||||||||||
cobros object array obligatorio (máx 1000) registros
|
$ curl --request DELETE \
--url https://api-test.ticketbaiws.eus/lroe-critcaja-cobros/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Token: xxx' \
--header 'Nif: 00000014Z'
--data '
{
"ejercicio":2023,
"cobros":[
{
"fecha_factura": "29/11/2023",
"fecha_cobro": "04/12/2023",
"serie":"A",
"num_factura":"2023000699",
"importe_cobrado": 100.00
}
]
}'
$ composer require guzzlehttp/guzzle
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://api-test.ticketbaiws.eus/lroe-critcaja-cobros/', [
'body' => '{"ejercicio":2023,"cobros":[{"fecha_factura": "29/11/2023","fecha_cobro": "04/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 100.00}]}',
'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-critcaja-cobros/"
payload = {
"ejercicio":2023,
"cobros":[
{
"fecha_factura": "29/11/2023",
"fecha_cobro": "04/12/2023",
"serie":"A",
"num_factura":"2023000699",
"importe_cobrado": 100.00
}
]
}
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-critcaja-cobros/");
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,"cobros":[{"fecha_factura": "29/11/2023","fecha_cobro": "04/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 100.00}]}');
CURLcode ret = curl_easy_perform(hnd);
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{"ejercicio":2023,"cobros":[{"fecha_factura": "29/11/2023","fecha_cobro": "04/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 100.00}]}');
Request request = new Request.Builder()
.url("https://api-test.ticketbaiws.eus/lroe-critcaja-cobros/")
.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_factura": "29-11-2023",
"fecha_cobro": "04-12-2023",
"serie": "A",
"num_factura": "2023000699",
"estado": "Correcto"
}
],
"status": "OK"
},
"msg": null
}