API para empresas
Su cliente concede acceso a su empresa y en su aplicación aparece un botón Abrir. Ninguna llave circula por chats y cada apertura lleva el nombre del empleado que la pulsó.
Cómo funciona
- En su interfaz el cliente indica que hay que entrar. Antes comprueba dos cosas: la barrera se abre con una llamada desde su número y su teléfono sigue en línea. Si la barrera tiene un controlador Entrixy, el teléfono no hace falta.
- Usted crea una solicitud y muestra su código QR. El cliente lo escanea, instala la aplicación, añade la barrera y concede el acceso: su empresa ya espera en la lista.
- Usted abre por API nombrando al empleado. El cliente ve la apertura en el registro con ese nombre y retira el acceso con un toque cuando quiera.
Autenticación
There are two ways in, and the difference is what the client sees.
Signature bound to your domain
You publish a public key on your own domain and sign every call with the private one. We take the key from the domain itself, so the right to call and the right to be shown under that domain are the same thing: the file disappears, the domain moves or changes hands — the calls stop within a day. There is no one-off "verified" tick to outlive reality.
https://<your domain>/.well-known/entrixy.json
{ "key": "<Ed25519 public key, 32 bytes, base64>" }
Then each request carries four headers:
X-Entrixy-Org: your-domain.com X-Entrixy-Ts: 1750000000 // unix seconds, ±300 s X-Entrixy-Nonce: 0011…ff // 32 hex, used once X-Entrixy-Sig: <base64> // Ed25519 over the base string base = "<domain>.<ts>.<nonce>." + sha256(raw request body)
A repeated nonce is refused, and so is a body that does not match the signature. This is the mode where the client sees your domain and your logo.
A domain written in national characters goes into the header and into the base string in its punycode form — xn--… — the same form it takes in the address of the key file. The client is still shown the readable spelling.
A secret, if you have no domain
Register, issue a secret in the cabinet and put it in the body. Your calls work the same, but the client is shown only the name you wrote for yourself, with a note that the domain is not confirmed — no logo, no domain. A company that has set a domain can no longer use a secret: otherwise a leaked secret would speak in the name of a confirmed one.
POST https://entrixy.com/api/company.php?a=<action>
Content-Type: application/json
{ "org_id": 17, "secret": "…", … }
Crear una solicitud
POST /api/company.php?a=request
{ "org_id": 17, "secret": "…", "ref": "order-517", "ttl_hours": 72 }
→ { "code": "rrGzNweV31rkHV6Q",
"url": "https://entrixy.com/c/rrGzNweV31rkHV6Q",
"expires_in_hours": 72 }
ref es su propio número de pedido, vuelve en el estado. Ponga url en un código QR y muéstrelo al cliente.
Estado de la solicitud
POST /api/company.php?a=status
{ "org_id": 17, "secret": "…", "code": "rrGzNweV31rkHV6Q" }
→ { "state": "issued", "key_ref": 4821, "ref": "order-517",
"claimed_at": "2026-09-09 12:20:11", "issued_at": "2026-09-09 12:24:03" }
| Estado | Meaning |
|---|---|
new | el código QR está creado, el cliente aún no ha llegado |
claimed | el cliente abrió la aplicación: está en camino |
issued | acceso concedido; key_ref con eso abre |
revoked | el cliente retiró el acceso |
expired | la solicitud caducó antes de que llegara el cliente |
Apertura
POST /api/company.php?a=open
{ "org_id": 17, "secret": "…", "key_ref": 4821,
"number_id": 93, "actor": "Ivan P., shift 12" }
→ { "ok": 1 }
actor es obligatorio: es lo que el cliente ve en el registro. Sirve cualquier cosa que identifique al empleado — nombre, número de ficha, turno. Sin él la llamada se rechaza.
| Respuesta | Meaning |
|---|---|
403 forbidden | la llave no es suya o el objeto no está en ella |
403 revoked | el cliente retiró el acceso |
403 expired | la vida de la llave ha terminado |
400 actor_required | no se ha nombrado al empleado |
429 rate_limit | demasiadas aperturas con una llave por minuto |
Su ficha en la aplicación
Al registrar la empresa, envíenos el nombre y un logotipo cuadrado. El cliente los ve en la página que escanea, en la pantalla de consentimiento y junto a cada línea del registro, así sabe a quién deja entrar. El logotipo lo servimos nosotros; no traemos imágenes de otros servidores.
Primeros pasos
Registre la empresa en su cuenta: la solicitud y luego el secreto, la dirección de respuesta, el logotipo y la lista de solicitudes, todo en el panel de la empresa. Revisamos las solicitudes a mano: el cliente confía en la empresa que dejamos entrar en la lista.