Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After the last page, the service will redirect to the given call-back URL.

Get the result

...

GET

/rest/v1/autentisering/

...

:

...

sid

Headers:

Basic authentication header with your username and password or Bearer token header with token fetched from Ambitas authentication REST

...

service

Description:

Fetch the result from the authentication session.

...

Result:

The outcome from the session as

...

json
Example:

...


{

...


"uuid": "ac85e47d-7fe8-457b-987b-5cf10c55966a",

...


"ok": true,

...


"tidspunkt": "2016-04-08T13:11:47.565+02:00",

...


"resultatType": "Autentisering",

...


"fnr": "12345678901",

...


"navn": "Kari, Normann",

...


"unikId": "9578-6000-4-11315",

...


"signatur":

...

“KVWVrMW1aREpXYlRSbV…",

...


"vaOppslag": "

...

VFVsSlNFZFVRME5CV…"
}

The ok field will specify if the session was successful or not.

...

...

The name, unique id and fnr (ssn) will be collected if the certificate/user has rights to collect this from the certificate of the user. If there are no rights to see social security number, the birth date is shown instead.

...

...

Variation in usage

As some customers may not have the right to store social security numbers, the solution would be to ask the customer for the ssn in advance to make the authentication process more secure. If you would like the user to be exactly one person/ssn, the setup of the session takes the ssn as input. Then only the given ssn will be legal, hence other authenticated persons will be treated as false.

...

Resource: Oppdrag (Assignment)

...

Method

...

POST

URI

/rest/v1/oppdrag

Parameters

Query Parameters
t type, could be omitted, default value "standards"
navn oppdrag's name. Non-mandatory if the same field in JSON is filled.

...

...

For special cases you can create the whole oppdrag in one post.

...


This only works for adding additional signatures for sdo's or signing documents of type text/BIDXML.

...

...

JSON body (optional):

...

Example

{

"navn":<name of assignment>,

...

...

"beskrivelse":<description of assignment>,

...

...

"purre_perriode_som_dager":<number of days before recurrent mail reminder will be sent>,

...

...

"layout_id":<ID of a layout assigned to customer organisation/branch>,

...

...

"sdo":<SDO object's XML>,

...

...

"signerere":[ {

...

...

"navn":<signer's name, will appear in

...

email>

...

"offisiell_id":<FNR>,

...

...

"epost":<signer's

...

email>

...

}]

...

...

}

...

Description

Creates a new oppdrag.

...

...

If body is added (only for special cases):

...


If type is set to sdo, the sdo field in the body is treated as an sdo.

...


This means you want to add an additional signature to an existing sdo.

...


If type is something else than "sdo", the sdo should be the bytes of the document only for mimetype text/BIDXML.

...

Result

Oppdrag data as JSON (201)

...

Example

{

"navn": "DLE 22.11/1",

...

...

"state": "Ikke startet",

...

...

"uuid": "f700b8d2-6de6-43fe-9577-360e3c3110c7",

...

...

"opprettet": "2016-11-22T10:12:15.019+01:00",

...

...

"beskrivelse": "some description and etc",

...

...

"oppdragstypebeskrivelse": "Vanlig oppdrag med dokumenter og signerere",

...

...

"layout": "DNB Eiendom AS_",

...

...

"signerere": [ {

...

...

"signererUuid": "f9baedbc-f13e-4555-8377-63d48a4ba5cc",

...

...

"epost": "dle@ambita.com", "

...

"fnr": "12345678901",

...

...

"signerernavn": "Terje",

...

...

"signererstate": "Ikke signert"

...

...

} ]

...

...

}

Method

GET

URI

/rest/v1/oppdrag/:id

Parameters

Description

Retrieves oppdrag with an unique id :uuid

Result

Oppdrag as JSON

Method

PUT

URI

/rest/v1/oppdrag/:id

Parameters

beskantall

Description

Set description (besk). Shown to signers
Set antall - number of days between every automatic notification email

Result

Oppdrag as JSON

Method

POST

URI

/rest/v1/oppdrag/:

...

id/

...

dokumenter

Parameters

Description

Add a new document to the assignment. Supports multipart form data in body.

Result

Oppdrag as JSON (201)

Method

POST

URI

/rest/v1/oppdrag/:id/signerere

Parameters

navn, ssn, epost

Description

Add signer to the assignment. Signer can have email and/or ssn

Result

Oppdrag som JSON (201)

Method

PUT

URI

/rest/v1/oppdrag/:

...

id/

...

start

Parameters

Description

Start the assignment, notification (if email) are sent with links and potential layout

Result

Oppdrag som JSON

Method

PUT

URI

/rest/v1/oppdrag/:id/oppdater

Parameters

Description

Manuelt oppdater alle signeringer

Result

Oversikt over status på alle signeringer som JSON

Method

PUT

URI

/rest/v1/oppdrag/:id/ferdigbehandle

Parameters

Description

Finalise. Creates SDO's for all documents, and changes the state to "Ferdigbehandlet"

Result

Oppdrag as JSON

Method

PUT

URI

/rest/v1/oppdrag/:id/

...

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>POST</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td><strong>/rest/v1/oppdrag/:id/signerere</strong></td>
</tr>
<tr class="even">
<td>Parameters</td>
<td>navn, ssn, epost</td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Add signer to the assignment. Signer can have email and/or ssn</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oppdrag som JSON (201)</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>PUT</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td><strong>/rest/v1/oppdrag/:id/start</strong></td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Start the assignment, notification (if email) are sent with links and potential layout</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oppdrag som JSON</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>PUT</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td><strong>/rest/v1/oppdrag/:id/oppdater</strong></td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Manuelt oppdater alle signeringer</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oversikt over status på alle signeringer som JSON</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>PUT</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td><strong>/rest/v1/oppdrag/:id/ferdigbehandle</strong></td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Finalise. Creates SDO's for all documents, and changes the state to "Ferdigbehandlet"</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oppdrag as JSON</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>PUT</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td><strong>/rest/v1/oppdrag/:id/arkiver</strong></td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Archive the assignement</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oppdrag as JSON</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>PUT</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td><strong>/rest/v1/oppdrag/:id/avbryt</strong></td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Cancel the assignment</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oppdrag as JSON</td>
</tr>
</tbody>
</table>

Eksempel på et oppdrag som JSON

Code Block
languagejson
{
    "beskrivelse": "Et startet oppdrag",
    "dokumenter": [
        {
            "dokumentuuid": "f3b3a645-4d20-4ac5-912c-d7a3ff0c08d4",
            "filnavn": "gurba.pdf"
        }
    ],
    "navn": "StartetOppdragNavn",
    "opprettet": "2013-01-03T01:00:00.000+01:00",
    "signerere": [
        {
            "epost": "terje@test.no",
            "fnr": null,
            "signererUuid": "2b1fff90-d02b-43e4-b615-625af3168000",
            "signerernavn": null,
            "signererstate": "Ikke signert"
        },
        {
            "epost": "line@test.no",
            "fnr": null,
            "signererUuid": "2b1fff90-d02b-43e4-b615-625af3168111",
            "signerernavn": null,
            "signererstate": "Ikke signert"
        }
    ],
    "state": "Klar til signering",
    "uuid": "StartetOppdrag"
}

Resource: Dokumenter (Documents)

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>GET</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td>/rest/v1/dokumenter/:id</td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Get the sdo for document with uuid :dokumentuuid as Base64</td>
</tr>
<tr class="even">
<td>Result</td>
<td>SDO</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>PUT</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td>/rest/v1/dokumenter/:id</td>
</tr>
<tr class="even">
<td>Parameters</td>
<td><strong>besk:</strong> the description</td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Set description :besk on dokument with uuid :dokumentuuid</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Dokument as JSON</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>DELETE</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td>/rest/v1/dokumenter/:id</td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Delete a document with uuid</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oppdrag as JSON</td>
</tr>
</tbody>
</table>

{"filnavn": "gurba.txt", "filtype": "text/plain", "filstørrelse": "2
kB", "beskrivelse": "les og bli glad"}

Resource: Signerere (Signers)

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>GET</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td>/rest/v1/signerere/:id</td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Get signer with id :id</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Signerer as JSON</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>DELETE</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td>/rest/v1/signerere/:id</td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Delete signer with uuid</td>
</tr>
<tr class="even">
<td>Result</td>
<td>Oppdrag as JSON</td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr class="header">
<th>Method</th>
<th>GET</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>URI</td>
<td>/rest/v1/signerere/:id/signeringer</td>
</tr>
<tr class="even">
<td>Parameters</td>
<td></td>
</tr>
<tr class="odd">
<td>Description</td>
<td>Get the list of signature holders for signeruuid</td>
</tr>
<tr class="even">
<td>Result</td>
<td>List of signature holders as JSON</td>
</tr>
</tbody>
</table>

Resource: Handle signing

...

arkiver

Parameters

Description

Archive the assignement

Result

Oppdrag as JSON

Method

PUT

URI

/rest/v1/oppdrag/:id/avbryt

Parameters

Description

Cancel the assignment

Result

Oppdrag as JSON

Eksempel på et oppdrag som JSON

Code Block
languagejson
{
    "beskrivelse": "Et startet oppdrag",
    "dokumenter": [
        {
            "dokumentuuid": "f3b3a645-4d20-4ac5-912c-d7a3ff0c08d4",
            "filnavn": "gurba.pdf"
        }
    ],
    "navn": "StartetOppdragNavn",
    "opprettet": "2013-01-03T01:00:00.000+01:00",
    "signerere": [
        {
            "epost": "terje@test.no",
            "fnr": null,
            "signererUuid": "2b1fff90-d02b-43e4-b615-625af3168000",
            "signerernavn": null,
            "signererstate": "Ikke signert"
        },
        {
            "epost": "line@test.no",
            "fnr": null,
            "signererUuid": "2b1fff90-d02b-43e4-b615-625af3168111",
            "signerernavn": null,
            "signererstate": "Ikke signert"
        }
    ],
    "state": "Klar til signering",
    "uuid": "StartetOppdrag"
}

Resource: Dokumenter (Documents)

Method

GET

URI

/rest/v1/dokumenter/:id

Parameters

Description

Get the sdo for document with uuid :dokumentuuid as Base64

Result

SDO

Method

PUT

URI

/rest/v1/dokumenter/:id

Parameters

besk: the description

Description

Set description :besk on dokument with uuid :dokumentuuid

Result

Dokument as JSON

Method

DELETE

URI

/rest/v1/dokumenter/:id

Parameters

Description

Delete a document with uuid

Result

Oppdrag as JSON

{“filnavn”: “gurba.txt”, “filtype”: “text/plain”, “filstørrelse”: “2 kB”, “beskrivelse”: “les og bli glad”}

Resource: Signerere (Signers)

Method

GET

URI

/rest/v1/signerere/:id

Parameters

Description

Get signer with id :id

Result

Signerer as JSON

Method

DELETE

URI

/rest/v1/signerere/:id

Parameters

Description

Delete signer with uuid

Result

Oppdrag as JSON

Method

GET

URI

/rest/v1/signerere/:id/signeringer

Parameters

Description

Get the list of signature holders for signeruuid

Result

List of signature holders as JSON

Resource: Handle signing

Method

GET

URI

/rest/v1/signeringer/:id/

...

sign

Parameters

Query parameters:

retur – a call-back url to redirect after authentication (Mandatory)

...

 

Optional parameters:

fnr – to specify the SSN to expected (will not be asked for). This will guarantee that the authenticated person has such a SSN otherwise the result will be false.

...

height – The height of the BankID client (Default: 300)

...

width – The width of the BankID client (Default: 400)

...

confirm – Should the BankID dialogue ask the user to confirm? (Default: true)

...

understand – Should the BankID dialogue ask the user to click

...

“I understand” (Default: true)

...

 

Headers:

Basic authentication header with your username and password or Bearer token header with token fetched from Ambitas authentication REST

...

service

Description

Get the url to be added to the iframe for signing a

...

document

Result

URL as JSON

Method

POST

URI

/rest/v1/signeringer/

...

signermange

Parameters
/Body

Example body:

{

"signering_uuid":["fa9204f2-25b5-453b-8072-79da8d9d1d3e","f71bbcdc-af2d-40fd-92ec-c3ae7cfdad0e","6fbc9307-0005-4192-b383-de8a4b51fc31"],

...

...

"retur":"<the retur url after finished>",

...

...

"heigth":900,

...

...

"width":900,

...

...

"confirm":true,

...

...

"understand":

...

true

...

}

...

Description

Start a session for a chained list of signings. To be used when one person should sign many documents in a

...

sequence

Result

URL as JSON

Method

GET

URI

/rest/v1/signerere/:id/

...

hent

Parameters

Description

Get list of documents that is to be signed by signererUuid.

...

List of documents as JSON

Scenarios

Signing as part of process flow

...