Share API
Start sharing
Scope
Add access rights to a specific session.
Description
- The session is accompanied by information about the person and the level of his/her access rights;
- If a person who is already attached to the session is subordinate, information is corrected according to the supplied data;
- The session is set to show that it is shared.
Request
The Service provider's application sends the following GET request using TLS:
POST /api-share/v1.0/{sessionId}/persons
Property | Type | Usage | Description |
---|---|---|---|
sessionId | String (64) | Mandatory | File processing session identifier |
Authorization
The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.
Content-type Header
Content-Type: application/json
Body
{
"note": {String},
"persons": [
{
"personId": {String},
"accessRights": {Integer}
}
]
}
Property | Description |
---|---|
personId | Identificator of of the person who shall access this session |
accessRights | Access rights level. For detailed information, please see "Person access list description". |
note | Additional information field. |
Example
POST /api-share/v1/80832540faff3f90246b71122a4bd6896cd50933cc12a22d99a577b7b41d55e2/Persons HTTP/1.1
Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603
Host: signapi-prep.eparaksts.lv
{
"note": "test",
"persons": [
{
"personId": "111111-11111",
"accessRights": 5
}
]
}
Response
JSON object:
{
"data": {String}
}
Property | Description |
---|---|
data | Information about sharing status |
Example
{
"data": "Sharing of the session 6aa64f352666d8a965483527d2bc930fc93ccd3be551a4642cd8a6631b97ee89 changed. 1 persons added, rights for 0 persons modified. With note= test"
}
Remove sharing
Scope
Remove access rights from the specific session.
Description
- Person access rights to the session is removed
- If there is no other Persons with whom session is shared, status "shared" is removed from the session.
Request
The Service provider's application sends the following GET request using TLS:
DELETE /api-share/v1.0/{sessionId}/persons/{personId}
Property | Description |
---|---|
sessionId | File processing session identifier |
personId | Identificator of of the person |
Authorization
The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.
Example
DELETE /api-share/v1/80832540faff3f90246b71122a4bd6896cd50933cc12a22d99a577b7b41d55e2/Persons/111111-11111 HTTP/1.1
Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603
Host: signapi-prep.eparaksts.lv
Response
JSON object:
Property | Description |
---|---|
data | Information about operation status |
Example
{
"data": "Sharing of the session 552825f4eafdbf90a676ea40c4802c9d1f27c20373c2594c0dfe950976ce2b19 removed for 1 person"
}
Persons in session
Scope
Find out the persons with whom session is shared.
Description
Returns a list of people associated with the session.
Request
The Service provider's application sends the following GET request using TLS:
GET /api-share/v1.0/{sessionId}/persons
Property | Type | Usage | Description |
---|---|---|---|
sessionId | String (64) | Mandatory | File processing session identifier |
Authorization
The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.
Example
GET /api-share/v1/552825f4eafdbf90a676ea40c4802c9d1f27c20373c2594c0dfe950976ce2b19/Persons HTTP/1.1
Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603
Host: signapi-prep.eparaksts.lv
Response
JSON object:
{
"data": [
{
"personId": {String},
"accessRights": {Integer}
}
]
}
Property | Description |
---|---|
personId | Identificator of of the person who shall access this session |
accessRights | Access rights level. For detailed information, please see "Person access list description". |
Example
{
"data": [
{
"personId": "111111-11111",
"accessRights": 5
},
{
"personId": "222222-22222",
"accessRights": 1
}
]
}
Sessions of a Person
Scope
Find out the sessions which are shared with the specific person .
Description
Returns a list of the sessions associated to the person.
Request
The Service provider's application sends the following GET request using TLS:
GET /api-share/v1.0/{personId}/sessions
Property | Description |
---|---|
personId | Identificator of the person |
Authorization
The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.
Example
GET /api-share/v1/111111-111111/Sessions HTTP/1.1
Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603
Host: signapi-prep.eparaksts.lv
Response
JSON object:
{
"data": [
{
"sessionId": {String},
"fileCount": {Integer},
"personCount": {Integer},
"signed": {Integer},
"shared": {Boolean},
"archived": {Boolean},
"signedFileType": {String},
"lastModified": {String},
"removalTime":{String}
}
]
}
sessionId | File processing session identifier |
fileCount | File amount in the session |
personCount | Number of people the session was shared with |
signed | Session signing status: 0 - files loaded but not signed 1 - already signed files where loaded 2 - files signed |
shared | Sharing statuss: false - session is not shared true - session is shared |
archived | Archive timestamp statuss: false - do not contain archive timestap true - archive timestap added |
signedFileType | If signed, shows format of the signed file |
lastModified | Time of last file processing request |
removalTime | Expected process deletion time |
Example
{
"data": [
{
"sessionId": "552825f4eafdbf90a676ea40c4802c9d1f27c20373c2594c0dfe950976ce2b19",
"fileCount": 0,
"personCount": 2,
"signed": 0,
"shared": false,
"archived": false,
"lastModified": "0001-01-01T00:00:00",
"removalTime": "0001-01-01T00:00:00"
},
{
"sessionId": "1d72da6fd2d71810f96d04e9261bee6f3b01eaba95ed9b25be0cd6230910902b",
"fileCount": 0,
"personCount": 1,
"signed": 0,
"shared": false,
"archived": false,
"lastModified": "0001-01-01T00:00:00",
"removalTime": "0001-01-01T00:00:00"
}
]
}
Person access list description
Property | Description |
---|---|
accessRights | Access rights values: 1 - Sign 2 - Delete 4 - Read 8 - Share 16 - Reserved ⚠️ "accessRights" value is a summ of all neded operations. Value is from "0" (no access rights) to "31" (Sign+Delete+Read+Share+Reserved). ⚠️ |
Updated 6 months ago