Certificados X.509
Gestiona certificados digitales para firma y encriptación de mensajes AS2.
POST
/api/v1/certificates
Lista los certificados accesibles dentro del sitio actual.
{
"status": "success",
"total": 1,
"data": [
{
"id": 105,
"email": "as2@example.com",
"commonname": "free.as2expert.com",
"commonName": "free.as2expert.com",
"validitystart": "2026-04-26 12:00:00",
"validityend": "2027-04-26 12:00:00",
"station": "My station",
"station_name": "My station"
}
]
}
POST
/api/v1/certificates/detail
Devuelve metadatos ampliados de un certificado concreto.
| Campo | Tipo | Requerido |
|---|---|---|
| id | integer | Sí |
POST
/api/v1/certificates/create
Crea un certificado X.509 self-signed para tu estación. En la versión actual solo está soportado el modo self_signed.
Request Body
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
| station | integer | Sí | ID de la estación |
| selfSigned | boolean | Sí | Debe ser true en la implementación actual |
| string | Email del sujeto | ||
| commonName | string | Common Name del certificado | |
| countryName | string | País ISO, por ejemplo ES | |
| localityName | string | Localidad | |
| provinceName | string | Provincia o estado | |
| organization | string | Organización | |
| organizationUnitName | string | Unidad organizativa | |
| dias | integer | Validez en días, por defecto 365 | |
| keybits | integer | Tamaño de clave, por defecto 2048 | |
| hash | string | Algoritmo hash, por ejemplo sha256 |
Ejemplo Python
response = requests.post(
f"{BASE_URL}/certificates/create",
headers=headers,
json={
"station": 62,
"selfSigned": True,
"email": "as2@example.com",
"commonName": "free.as2expert.com",
"dias": 730
}
)
Response
{
"status": "success",
"msg": "Certificate created",
"data": {
"id": 129,
"certificate_id": 129,
"station_id": 62,
"commonName": "free.as2expert.com",
"countryName": "ES",
"localityName": "Madrid"
}
}
Uso de Certificados
Los certificados se utilizan automáticamente cuando envías mensajes con encriptar: true o firmar: true.
The canonical response focuses on metadata. The raw backend payload may still include extended fields such as
cert_pem, but integrations should rely on certificate_id and the normalized metadata first.
POST
Visibilidad del lifecycle del certificado
El producto complementa la metadata del certificado con una vista de lifecycle que muestra dónde está activo ahora, dónde está planificado como next y qué socios quedarían afectados por un rollover.
| Superficie | Lectura |
|---|---|
Certificados / Usage / Lifecycle | Contadores current, next e impacto por socio. |
CertificadoLifecycleInfo | Backend que resuelve el uso current y next de un certificado sobre socios reales. |