Registry Entry

Creating Registry Entry

Registry entries are created using transaction API, where in a single transaction the newly created registry entry should be linked to a case file (Saksmappe) or a basic folder (Mappe). Bear in mind that the registry entry can be under only one folder. Newly created registry entry requires at least one correspondence party (Korrespondansepart) to be created and associated with the registry entry. The link is done using transaction::link action following the guidelines to use newly created entry reference field to parent entry (Korrespondansepart::refRegistrering), rather than parent entry reference field (Journalpost::refKorrespondansepart). Take a look at the Fields section of this document for details about the mandatory/optional fields for registry entries.

Document (Dokument) entities are associated to Registry entries during documents creation. Examples how a document is created and associated to a registry entry can be found here.

creating registry entry

      Request

POST https://v2-34-0.local.documaster.tech:8083/rms/api/public/noark5/v1/transaction HTTP/1.1
...
Authorization: Bearer {{accessTokenIntegrator}}
Content-Type: application/json
X-Documaster-Error-Response-Type: application/json

{
    "actions": [
        {
            "action": "save",
            "type": "Journalpost",
            "id": "journalpost-temp-id-1",
            "fields": {
                "tittel": "API Created Registry Entry",
                "beskrivelse": "Registry Entry Description",
                "journalposttype": "U"
            }
        },
        {
            "action": "link",
            "type": "Journalpost",
            "id": "journalpost-temp-id-1",
            "ref": "refMappe",
            "linkToId": "691"
        },
        {
            "action": "save",
            "type": "Korrespondansepart",
            "id": "korrespondansepart-temp-id-1",
            "fields": {
                "korrespondanseparttype": "EA",
                "korrespondansepartNavn": "Correspondence Party Name"
            }
        },
        {
            "action": "link",
            "type": "Korrespondansepart",
            "id": "korrespondansepart-temp-id-1",
            "ref": "refRegistrering",
            "linkToId": "journalpost-temp-id-1"
        }
    ]
}

      Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "saved": {
        "journalpost-temp-id-1": {
            "type": "Journalpost",
            "id": "938",
            "version": "8",
            "fields": {
                "uuid": "35926f91-96d2-40d7-961e-9ffb368673af",
                "opprettetDato": "2021-11-24T14:14:05.933+0100",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "registreringsIdent": "2021/5",
                "tittel": "API Created Registry Entry",
                "beskrivelse": "Registry Entry Description",
                "registreringsDato": "2021-11-24T14:14:05.950+0100",
                "dokumentmedium": "E",
                "journalaar": 2021,
                "journalsekvensnummer": 5,
                "journalpostnummer": 5,
                "journalansvarlig": "External Integrator ACME",
                "journalansvarligBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "journalposttype": "U",
                "journalstatus": "J",
                "skjermKorrespondanseParterEInnsyn": false
            },
            "links": {
                "refMappe": 691
            }
        },
        "korrespondansepart-temp-id-1": {
            "type": "Korrespondansepart",
            "id": "939",
            "version": "3",
            "fields": {
                "uuid": "3f7bad64-9560-45d2-82a5-4e5fb06a5c13",
                "opprettetDato": "2021-11-24T14:14:05.953+0100",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "korrespondanseparttype": "EA",
                "korrespondansepartNavn": "Correspondence Party Name"
            },
            "links": {
                "refRegistrering": 938
            }
        }
    }
}

Update Registry Entry

Updating a registry entry is done through transaction::save action in the same way it is used to create it, with the difference that the actual id of the registry entry should be used (returned in create call response in $.saved.{tempIDofRegistryEntry}.id). The example below show an update of the registry entry (chaning the description) and linking a new Address (Adresse).

      Request

POST https://v2-34-0.local.documaster.tech:8083/rms/api/public/noark5/v1/transaction HTTP/1.1
...
Authorization: Bearer {{accessTokenIntegrator}}
Content-Type: application/json
X-Documaster-Error-Response-Type: application/json

{
    "actions": [
        {
            "action": "save",
            "type": "Journalpost",
            "id": "938",
            "fields": {
                "beskrivelse": "Updated Registry Entry Description"
            }
        },
        {
            "action": "save",
            "type": "Adresse",
            "id": "adresse-temp-id-1",
            "fields": {
                "adresseKnr": "0301",
                "postnr": "0301",
                "poststed": "Oslo",
                "adressenavn": "Rådhusplassen",
                "nummer": "1"
            }
        },
        {
            "action": "link",
            "type": "Adresse",
            "id": "adresse-temp-id-1",
            "ref": "refRegistrering",
            "linkToId": "938"
        }
    ]
}

      Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "saved": {
        "938": {
            "type": "Journalpost",
            "id": "938",
            "version": "9",
            "fields": {
                "uuid": "35926f91-96d2-40d7-961e-9ffb368673af",
                "opprettetDato": "2021-11-24T14:14:05.933+0100",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "registreringsIdent": "2021/5",
                "tittel": "API Created Registry Entry",
                "beskrivelse": "Updated Registry Entry Description",
                "registreringsDato": "2021-11-24",
                "dokumentmedium": "E",
                "journalaar": 2021,
                "journalsekvensnummer": 5,
                "journalpostnummer": 5,
                "journalansvarlig": "External Integrator ACME",
                "journalansvarligBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "journalposttype": "U",
                "journalstatus": "J",
                "skjermKorrespondanseParterEInnsyn": false
            },
            "links": {
                "refMappe": 691
            }
        },
        "adresse-temp-id-1": {
            "type": "Adresse",
            "id": "967",
            "version": "2",
            "fields": {
                "uuid": "7276dd75-d4aa-4b0c-956c-0ae31ee233b0",
                "opprettetDato": "2021-11-24T14:38:49.625+0100",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "adresseKnr": "0301",
                "postnr": "0301",
                "poststed": "Oslo",
                "adressenavn": "Rådhusplassen",
                "nummer": "1"
            },
            "links": {
                "refRegistrering": 938
            }
        }
    }
}

Sign-Off Registry Entry

Signing off a registry entry is done by creating an instance of the Sign-Off (Avskrivning) entity and associate it with the registry entry.

      Request

POST https://v2-34-0.local.documaster.tech:8083/rms/api/public/noark5/v1/transaction HTTP/1.1
...
Authorization: Bearer {{accessTokenIntegrator}}
Content-Type: application/json
X-Documaster-Error-Response-Type: application/json

{
    "actions": [
        {
            "action": "save",
            "type": "Avskrivning",
            "id": "new-sign-off",
            "fields": {
                "avskrivningsmaate":  "BU"
            }
        },
        {
            "action": "link",
            "type": "Avskrivning",
            "id": "new-sign-off",
            "ref": "refJournalpost",
            "linkToId": "10124"
        }
    ]
}

      Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "saved": {
        "new-sign-off": {
            "type": "Avskrivning",
            "id": "12655",
            "version": "3",
            "fields": {
                "uuid": "ba82150c-3241-4999-a5d9-a8b56edcc26d",
                "opprettetDato": "2022-07-20T11:12:18.826+0200",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "avskrivningsmaate": "BU"
            },
            "links": {
                "refJournalpost": 10124
            }
        }
    }
}