Issue link
Creates a single-use link to the page where the customer accepts the document, and returns the URL to redirect them to.
/v1/tyc/issuetyc is a fixed path segment (términos y condiciones) with no meaning for the caller — treat it as opaque.
The link is issued to the client_id the token was obtained with, and only the client_id registered for this flow is accepted. Another set of credentials belonging to the same company answers 403, even though it works elsewhere on the API.
Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Content-Type | string | Yes | Must be application/json |
Not applicable: Path Parameters, Query Parameters.
Body
cuit is conditionalVINCULATION: required. That screen lists the accounts (comitentes) the person already holds, and they are looked up by CUIT.TYC: not asked for. No screen reads it.
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | TYC or VINCULATION. Decides which screen the link leads to — see the two kinds of link. No default: a wrong value here shows the person the wrong consent. |
payload | object | Yes | The person the link is for. |
payload.dni | string | Yes | 7 or 8 digits. Digits only — no dots. |
payload.first_name | string | Yes | Cannot be blank. Shown on the page to greet the person. |
payload.last_name | string | Yes | Cannot be blank. |
payload.cuit | string | Conditional | Required when kind is VINCULATION. Exactly 11 digits — no dashes. |
Any other field you put in payload is stored with the record but never read and never shown to the customer. Send only what is documented here: it is personal data, and it is kept for as long as the record is.
Response
2XX Success
Status: 201 Created
| Field | Type | Description |
|---|---|---|
id | number | Identifier of the record. Quote it when asking Allaria about a specific link. |
url | string | Where to redirect the customer. Use it as returned; do not rebuild it from the token. |
expires_at | string | When the link stops working. ISO 8601, UTC. |
expires_in_seconds | number | How long it stays valid, from the moment it was issued. 30 minutes in production, longer in development — read this field rather than hardcoding the window. |
Issuing a link retires any unused link the same DNI already has. Ask for one at a time: a batch issued ahead of time leaves every customer but the last one with a link that reports itself replaced.
The call is not idempotent and there is no request key to repeat safely.
A retry after a timeout issues a second link and retires the first, so a customer already holding the first one is left with a dead link.
If a call times out, assume it may have succeeded:
- Retry once.
- Redirect the customer to the link the retry returns — never to an earlier one.
Error Codes
| Status | Description |
|---|---|
401 | Unauthorized — {"error": "missing bearer token"} when the Authorization header is absent or not a Bearer one, {"error": "invalid token"} when its signature, issuer or expiry was rejected |
403 | Forbidden — {"error": "client not allowed to issue links"}. The token is valid, but your client_id is not authorized for this endpoint |
422 | Unprocessable Entity — the body did not validate |
500 | Internal Server Error |
Error structure (422):
{
"error": "invalid_payload",
"detail": "payload.dni must be 7 or 8 digits · payload.last_name is required and cannot be blank",
"problems": [
{ "field": "payload.dni", "message": "must be 7 or 8 digits" },
{ "field": "payload.last_name", "message": "is required and cannot be blank" }
]
}
problems carries every field that failed, not just the first, so one request tells you everything there is to fix. detail is the same information as a single sentence.
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X POST "https://b2b.allaria.dev/v1/tyc/issue" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"kind": "TYC",
"payload": {
"dni": "37087294",
"first_name": "JUAN CARLOS",
"last_name": "PEREZ"
}
}'
const response = await fetch('https://b2b.allaria.dev/v1/tyc/issue', {
method: 'POST',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
kind: 'TYC',
payload: {
dni: '37087294',
first_name: 'JUAN CARLOS',
last_name: 'PEREZ'
}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://b2b.allaria.dev/v1/tyc/issue',
headers={
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
json={
'kind': 'TYC',
'payload': {
'dni': '37087294',
'first_name': 'JUAN CARLOS',
'last_name': 'PEREZ'
}
}
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.post('https://b2b.allaria.dev/v1/tyc/issue', {
kind: 'TYC',
payload: {
dni: '37087294',
first_name: 'JUAN CARLOS',
last_name: 'PEREZ'
}
}, {
headers: {
Authorization: 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
}
});
console.log(response.data);
{
"id": 481,
"url": "https://apertura-cuenta.allaria.com.ar/banco-del-sol/kJ3nQ7pXr2vB8sLmT4wYd6ZaE1cH0gNfUiOjRkPq5tM",
"expires_at": "2026-09-11T18:42:07.512034+00:00",
"expires_in_seconds": 1800
}