1. Certificates Session (/certificates)
Description
- Initiates user certificates session.
- User does not receive any request in the eParaksts mobile or eID Scan application.
- Having a correct certificate is needed for giving signatures under AdES or QES schemes. The method can be ignored if the signature scheme does not mandate presence of certificate in the document
structure that is to be signed.
Request
To start the operation, make a HTTP POST request containing an application/x-www-form-urlencoded body to an HTTP URL of the following form:
https://{service}/v1/certificates
Authorization
In the Authorization header, include the API key you were given. See [API Authorization] for
more information.
Request parameters
Certain parameters are required in the HTTP request.
| Name | Type | Use | Description |
|---|---|---|---|
| person_identifier | POST | Required | Person identifier according to ETSI Natural Person Sematics Identifier specified in ETSI319412-1. Format PNOLV-XXXXXX-XXXXX |
| certificate_type | POST | Required | Type of the requested certificate ('authentication' or 'signature') |
| certificate_label | POST | Optional | Filter for restricting the query to the certificates of the user to those that contain the specified label. The following labels are supported: mobileid - 'eParakstsmobile' certificates. eidscan - 'eID Scan' certificates. Default value is " mobileid ". |
Request headers
The following Headers must be present in the HTTP request:
-
Content-Type - application/x-www-form-urlencoded content type.
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
-
Authorization - API key
Authorization: Basic <API-key>Request body
The body must be an application/x-www-form-urlencode entity, containing all of the required parameters.
Response
A response with a 200 OK status specifying that the operation was processed correctly will be
returned.
Example
HTTP/1.1 200 OK
Content-Type: application/json
{JSON-DATA}In case of error, the response will indicate a status other than 200 OK.
In such case, the response will contain additional information on the error cause. See [Handling API Errors] for more information.
Example
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"error" : { "value": "unauthorized" }
}Response parameters
The response is a JSON representation with the following parameters.
| Name | Use | Description |
|---|---|---|
| session_id | Required | Unique identifier of the prepared session to be used in the subsequent API operation calls. See [Session Result (/session)] for more information. |
Response headers
The following Headers may be present in the HTTP response:
- Content-Type - JSON format;
> Content-Type: application/jsonUpdated about 1 month ago