Certificates
Digital certificates
Parameters in the HTTP header
- Authorization (characters): API Authorization. Example:
Bearer {token}
Base URL
https://api.saltra.es/api/v4/certificate
Get certificates
Parameters
- clientId (integer): Client identifier (id), optional. Only for retrieving client certificates.
GET /
{
"clientId": 1
}
Response
Response
{
"success": true,
"message": "OK",
"data": {
"data": [
{
"name": "99999999",
"desde": "2023-12-12",
"expired": "2026-12-12",
"dni": "ISSS-999999Q",
"gn": "NAME",
"sn": "NAME",
"type": 1,
"active": 1,
"cert_secret": "2832333333fqh123f8defe269999999e3c17b21"
}
],
"pagination": {
"page": 1,
"lastPage": 1,
"perPage": 50,
"total": 2
}
}
}
Save a certificate
Parameters
- file (file): Certificate in P12 or PFX format.
- password (characters): Certificate password.
- clientId (integer): Client identifier (id), optional. Only for storing client certificate.
POST /
curl -X POST https://api.saltra.es/api/v4/certificate \
-H 'Authorization: bearer *token*' \
-H 'Accept: application/json' \
-F 'password="1234"' \
-F 'type="1"' \
-F 'clientId="1"' \
-F 'file=@"certificado.p12"'
Response
Response
{
"success": true,
"message": "OK",
"data": {
"cert_secret": "code"
}
}
Delete a certificate
Parameters
- cert_secret (characters): Secret key associated with the certificate.
DELETE /{cert_secret}
cert_secret
Response
Response
{
"success": true,
"message": "OK"
}