POST https://{entorno}.ticketbaiws.eus/lroe-critcaja-cobros/
ATENCIÓN: Este método únicamente es válido para BATUZ Bizkaia. Permite enviar al LROE de Batuz los cobros realizados. 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 POST \
--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": "30/12/2023",
"serie":"A",
"num_factura":"2023000699",
"importe_cobrado": 100.00,
"iva_devengado": 21.00,
"forma_pago":"01",
"descripcion_fpago":"Transferencia"
},
{
"fecha_factura": "29/11/2023",
"fecha_cobro": "01/12/2023",
"serie":"A",
"num_factura":"2023000699",
"importe_cobrado": 50,
"iva_devengado": 10.50,
"forma_pago":"04",
"descripcion_fpago":"Otros medios de cobro o de pago"
}
]
}'
$ composer require guzzlehttp/guzzle
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-test.ticketbaiws.eus/lroe-critcaja-cobros/', [
'body' => '{"ejercicio": 2023,"cobros":[{"fecha_factura": "29/11/2023","fecha_cobro": "30/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 100.00,"iva_devengado": 21.00,"forma_pago":"01","descripcion_fpago":"Transferencia"},{"fecha_factura": "29/11/2023","fecha_cobro": "01/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 50,"iva_devengado": 10.50,"forma_pago":"04","descripcion_fpago":"Otros medios de cobro o de pago"}]}',
'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": "30/12/2023",
"serie":"A",
"num_factura":"2023000699",
"importe_cobrado": 100.00,
"iva_devengado": 21.00,
"forma_pago":"01",
"descripcion_fpago":"Transferencia"
},
{
"fecha_factura": "29/11/2023",
"fecha_cobro": "01/12/2023",
"serie":"A",
"num_factura":"2023000699",
"importe_cobrado": 50,
"iva_devengado": 10.50,
"forma_pago":"04",
"descripcion_fpago":"Otros medios de cobro o de pago"
}
]
}
headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
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_POSTFIELDS, '{"ejercicio": 2023,"cobros":[{"fecha_factura": "29/11/2023","fecha_cobro": "30/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 100.00,"iva_devengado": 21.00,"forma_pago":"01","descripcion_fpago":"Transferencia"},{"fecha_factura": "29/11/2023","fecha_cobro": "01/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 50,"iva_devengado": 10.50,"forma_pago":"04","descripcion_fpago":"Otros medios de cobro o de pago"}]}');
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": "30/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 100.00,"iva_devengado": 21.00,"forma_pago":"01","descripcion_fpago":"Transferencia"},{"fecha_factura": "29/11/2023","fecha_cobro": "01/12/2023","serie":"A","num_factura":"2023000699","importe_cobrado": 50,"iva_devengado": 10.50,"forma_pago":"04","descripcion_fpago":"Otros medios de cobro o de pago"}]}');
Request request = new Request.Builder()
.url("https://api-test.ticketbaiws.eus/lroe-critcaja-cobros/")
.post(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"
},
{
"fecha_factura": "29-11-2023",
"fecha_cobro": "05-12-2023",
"serie": "A",
"num_factura": "2023000699",
"estado": "Correcto"
}
],
"status": "OK"
},
"msg": null
}