Encrypt / Decrypt API
Last revision: april 05th 2021
An Access Token is required to authorize all API requests, as explained at the following link:
Encrypt / Decrypt request
Encrypt / Decrypt the request bytes with RSA using client or group certificate.
REST service specs:
Method: POST
URL: {viafirma_fortress_url}/api/v1/encrypt
Security:
Authorization: Bearer {access_token}
Where:
viafirma_fortress_url
: URL of the Fortress implementation, for example https://sandbox.viafirma.com/fortress or https://fortress.viafirma.com/fortress
Sample Request
Method: POST
URL: {viafirma_fortress_url}/api/v1/encrypt
Security Header: Authorization: Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
Request Params
The request body contains the encryption / decryption request information application/json
format is used:
{
"certificateCode": "580fe337eba1483683290cbbf94982a3",
"mode": "ENCRYPT",
"bytesB64": "dGVzdA=="
}
Where:
Param | Type | Desc |
---|---|---|
certificateCode | string | Used to specify which client or group certificate will be chosen to encrypt / decrypt. Certificate public key will be used to encrypt and private key to decrypt. |
mode | string | Select encrypt or decrypt mode. The allowed values are ENCRYPT , DECRYPT . |
bytesB64 | string | Content to encrypt / decrypt |
Response
Response in application/json
format:
{
"bytesB64": "ggj5mRTVh3FKAz4wf2EmaX7Zfr...=="
}
Where:
Param | Type | Desc |
---|---|---|
bytesB64 | string | Encryption / decryption certificateRequestEntity (Base 64) |
API Errors
Errors are returned using application/json
format:
{
"error": "error_code",
"error_description": "error_description"
}
Where:
Param | Type | Desc |
---|---|---|
error | string | Error code |
error_description | string | Error description |
Errors:
Error code | Error desc |
---|---|
invalid_request | Bad request. Incorrect of insufficient request params. (HTTP Status: 400) |
invalid_token | Invalid access_token (HTTP Status: 401) |
certificate_not_found | Incorrect or inactive certificate code (HTTP Status: 404) |
results matching ""
No results matching ""