Ir al contenido

Firmar FHIR en lote (zip)

POST
/firma/fhir/lote
curl --request POST \
--url https://ponspre.medicinainteligente.ai/firma/fhir/lote \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "items": [ { "tipo": "atencion", "id": "1058" }, { "tipo": "ips", "documento": "41234567" } ] }'

Un zip fhir-firmados.zip con un Bundle firmado por ítem (hasta 50) y un manifiesto.txt. Un ítem con error no frena el lote; si no sale ninguno, 422. Con el servicio no disponible, 503: se reintenta.

Media typeapplication/json
LoteFhirIn
object
items
required
Items
Array<object>
>= 1 items <= 50 items
ItemFhirIn

Atencion/informe se identifican por id; ips por documento (CI).

object
tipo
required
Tipo
string
Allowed values: atencion informe ips
id
Any of:
string
>= 1 characters
documento
Any of:
string
>= 1 characters

Examples

Examplecapturado

Pedido real

{
"items": [
{
"tipo": "atencion",
"id": "1058"
},
{
"tipo": "ips",
"documento": "41234567"
}
]
}

Éxito. Binario application/zip.

Media typeapplication/zip
string format: binary

Falta la API key, no es válida o fue revocada.

Media typeapplication/json

Examples

Examplecapturado

Respuesta real

{
"detail": "Falta la API key, no es válida o fue revocada (header X-API-Key o Authorization: Bearer)"
}

La key no tiene el alcance que pide esta operación.

Media typeapplication/json

Examples

Examplecapturado

Respuesta real

{
"detail": "La API key no tiene el alcance 'entrada'"
}

Error de validación

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}