Trading Partners
Gestiona los socios comerciales (trading partners) con los que intercambias mensajes AS2.
POST
/api/v1/partners
Obtiene la lista de socios comerciales configurados para tus estaciones.
Request Body (opcional)
| Campo | Tipo | Descripción |
|---|---|---|
| station | integer | Filtrar por estación |
Ejemplo Python
response = requests.post(
f"{BASE_URL}/partners",
headers=headers,
json={"station": 54}
)
POST
/api/v1/partners/detail
Devuelve el detalle ampliado de un socio concreto.
| Campo | Tipo | Requerido |
|---|---|---|
| id | integer | Sí |
POST
/api/v1/partners/create
Crea un nuevo socio comercial para intercambiar mensajes AS2.
Request Body
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
| station | integer | Sí | ID de tu estación |
| as2_id | string | Sí | Identificador AS2 del socio |
| name | string | Sí | Nombre del socio |
| string | Sí | Email de contacto | |
| endpoint_url | string | Endpoint AS2 del socio | |
| mdn | integer | Tipo de MDN | |
| certificate_id | integer | Certificado público asociado al socio | |
| encryption | integer | Algoritmo de encriptación preferido | |
| signature | integer | Algoritmo de firma preferido | |
| auth | boolean | Activa autenticación saliente | |
| auth_user | string | Usuario de autenticación HTTP | |
| auth_password | string | Clave de autenticación HTTP | |
| firewall | boolean | Activa reglas adicionales de firewall |
Ejemplo Python
response = requests.post(
f"{BASE_URL}/partners/create",
headers=headers,
json={
"station": 62,
"as2_id": "AS2:CLIENTE_001",
"name": "Primary Customer",
"endpoint_url": "https://cliente.com/as2",
"email": "as2@cliente.com",
"certificate_id": 129
}
)
Response
{
"status": "success",
"msg": "Partner created",
"data": {
"id": 107,
"partner_id": 107,
"station_id": 62,
"name": "Primary Customer",
"as2_id": "AS2:CLIENTE_001",
"url": "https://cliente.com/as2"
}
}
POST
Trust lifecycle del socio
Crear el socio es solo el primer paso. En producto, cada partner puede llevar además un trust lifecycle gobernado con certificado current, certificado next, ventana de rollover, evidencia TSA y timeline de eventos.
| Superficie operativa | Qué resuelve |
|---|---|
Trust Lifecycle | Definir certificados current y next y mantener coherentes las fechas de rollover. |
CemScheduleRollover | Persistir la ventana de rollover aprobada antes de activarla. |
CemActivate | Promover el certificado next a current con evidencia auditable. |
CemRetire | Retirar el trust material anterior cuando cierra la ventana de solape. |
CemEvents | Leer el timeline del socio como evidencia operativa durante piloto y release review. |