POST https://{entorno}.ticketbaiws.eus/lroe-critcaja-pagos/
ATENCIÓN: Este método únicamente es válido para BATUZ Bizkaia. Permite enviar al LROE de Batuz los pagos 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 | ||||||||||||||||||||||||||||||||||
pagos object array obligatorio (máx 1000) registros
|
$ curl --request POST \
--url https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Token: xxx' \
--header 'Nif: 00000014Z'
--data '
{
"ejercicio": 2023,
"pagos": [
{
"nombre_social": "Berein Internet S.L.",
"nif": "B01489350",
"fecha_factura": "29\/11\/2023",
"fecha_pago": "30\/12\/2023",
"serie": "A",
"num_factura": "2023000699",
"importe_pagado": 100,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
},
{
"nombre_social": "Berein Internet S.L.",
"nif": "B01489350",
"fecha_factura": "29\/11\/2023",
"fecha_pago": "30\/12\/2023",
"serie": "A",
"num_factura": "2023000700",
"importe_pagado": 100,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
}
]
}'
$ 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-pagos/', [
'body' => '{"ejercicio": 2023,"pagos": [{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000699","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"},{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000700","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"}]}',
'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-pagos/"
payload = {
"ejercicio": 2023,
"pagos": [
{
"nombre_social": "Berein Internet S.L.",
"nif": "B01489350",
"fecha_factura": "29\/11\/2023",
"fecha_pago": "30\/12\/2023",
"serie": "A",
"num_factura": "2023000699",
"importe_pagado": 100,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
},
{
"nombre_social": "Berein Internet S.L.",
"nif": "B01489350",
"fecha_factura": "29\/11\/2023",
"fecha_pago": "30\/12\/2023",
"serie": "A",
"num_factura": "2023000700",
"importe_pagado": 100,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
}
]
}
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-pagos/");
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,"pagos": [{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000699","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"},{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000700","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"}]}');
CURLcode ret = curl_easy_perform(hnd);
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{"ejercicio": 2023,"pagos": [{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000699","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"},{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000700","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"}]}');
Request request = new Request.Builder()
.url("https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/")
.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_pago": "04-12-2023",
"serie": "A",
"num_factura": "2023000699",
"estado": "Correcto"
},
{
"fecha_factura": "29-11-2023",
"fecha_pago": "05-12-2023",
"serie": "A",
"num_factura": "2023000699",
"estado": "Correcto"
}
],
"status": "OK"
},
"msg": null
}