Case Files (Saksmappe
) are created using transaction
API, where in a single transaction the newly created case file must be linked to a single Series (Arkivdel
), through reference Saksmappe::refArkivdel
, and to one primary Class (Klasse
), through reference Saksmappe::refPrimaerKlasse
, part of the Classification System (Klassifikasjonssystem
) linked to the series. Case File (Saksmappe
) can be linked to more than one Class (Klasse
) as secondary class, using the reference SaksMappe::refSekundaerKlasse
. Additionally the example below is adding an External ID (EksternId
), which is an identifier of the case file in an external system. ExternalID (EksternId
) is not required to create a case file, but very useful if external identifiers are available, since the value can be used to search on it.
transaction::save
- new Case File (Saksmappe
)transaction::link
- link new case file to existing Series (Arkivdel
) with id 688transaction::link
- link new case file to existing Class (Klasse
) with id 681 as primary, through refPrimaerKlasse
transaction::link
- link new case file to existing Class (Klasse
) with id 681 as secondary, through refSekundaerKlasse
transaction::link
- link new case file to existing Class (Klasse
) with id 681 as secondary, through refSekundaerKlasse
transaction::save
- new ExternalID (EksternId
) with external ID value of ISID:0000004573transaction::link
- link new externalID to newly created case file through refMappe
reference fieldAs a result of the transaction new Case File (Saksmappe
) is created with id 1131.
Request
POST https://<documaster-instance>.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": "Saksmappe",
"id": "saksmappe-temp-id-1",
"fields": {
"tittel": "API Created Case File - 3",
"beskrivelse": "Third API created Case File",
"administrativEnhet": "AD1"
}
},
{
"action": "link",
"type": "Saksmappe",
"id": "saksmappe-temp-id-1",
"ref": "refArkivdel",
"linkToId": "688"
},
{
"action": "link",
"type": "Saksmappe",
"id": "saksmappe-temp-id-1",
"ref": "refPrimaerKlasse",
"linkToId": "681"
},
{
"action": "link",
"type": "Saksmappe",
"id": "saksmappe-temp-id-1",
"ref": "refSekundaerKlasse",
"linkToId": "1111"
},
{
"action": "link",
"type": "Saksmappe",
"id": "saksmappe-temp-id-1",
"ref": "refSekundaerKlasse",
"linkToId": "1113"
},
{
"action": "save",
"type": "EksternId",
"id": "eksternId-temp-id-1",
"fields": {
"eksterntSystem": "Integrating System",
"eksternID": "ISID:0000004573"
}
},
{
"action": "link",
"type": "EksternId",
"id": "eksternId-temp-id-1",
"ref": "refMappe",
"linkToId": "saksmappe-temp-id-1"
}
]
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"saved": {
"saksmappe-temp-id-1": {
"type": "Saksmappe",
"id": "1131",
"version": "10",
"fields": {
"uuid": "e8716b6e-3455-4148-870f-6435aa46cf5a",
"opprettetDato": "2021-12-07T12:05:56.134+0100",
"opprettetAv": "External Integrator ACME",
"opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
"mappeIdent": "2021/9",
"tittel": "API Created Case File - 3",
"beskrivelse": "Third API created Case File",
"dokumentmedium": "E",
"saksaar": 2021,
"sakssekvensnummer": 9,
"saksdato": "2021-12-07T12:05:56.149+0100",
"administrativEnhet": "AD1",
"saksansvarlig": "External Integrator ACME",
"saksansvarligBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
"saksstatus": "B"
},
"links": {
"refPrimaerKlasse": 681,
"refArkivdel": 688
}
},
"eksternId-temp-id-1": {
"type": "EksternId",
"id": "1132",
"version": "2",
"fields": {
"uuid": "835e8ef5-7127-41dc-8a0c-09edcc0ea6c4",
"opprettetDato": "2021-12-07T12:05:56.149+0100",
"opprettetAv": "External Integrator ACME",
"opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
"eksterntSystem": "Integrating System",
"eksternID": "ISID:0000004573"
},
"links": {
"refMappe": 1131
}
}
}
}
Case Files (Saksmappe
) can have multiple Case Party (Sakspart
) entity objects linked to them. Case Party (Sakspart
) represents a person related to the case file in a particular role.
transaction::save
- new Case Party (Sakspart
)transaction::link
- link new case party to existing Case File (Saksmappe
) with id 1131 through refMappe
reference fieldAs a result of the transaction new Case Party (Saks[art
) is created with id 1136 and associated with the Case File (Saksmappe
).
Request
POST https://<documaster-instance>.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": "Sakspart",
"id": "sakspart-temp-id-1",
"fields": {
"sakspartNavn": "Kari Nordmann",
"sakspartRolle": "Handler",
"epostadresse": "kari.nordmann@dummy.no"
}
},
{
"action": "link",
"type": "Sakspart",
"id": "sakspart-temp-id-1",
"ref": "refMappe",
"linkToId": "1131"
}
]
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"saved": {
"sakspart-temp-id-1": {
"type": "Sakspart",
"id": "1136",
"version": "2",
"fields": {
"uuid": "37baa8e6-b993-4137-9a2a-791a5991f1d1",
"opprettetDato": "2021-12-09T14:04:15.316+0100",
"opprettetAv": "External Integrator ACME",
"opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
"sakspartNavn": "Kari Nordmann",
"sakspartRolle": "Handler",
"epostadresse": "kari.nordmann@dummy.no"
},
"links": {
"refMappe": 1131
}
}
}
}
Retrieving a Case File (Saksmappe
) that has a specific ExternalID (EksternId
) is done using the refEksternId
reference field of CaseFile (Saksmappe
).
Request
POST https://<documaster-instance>.local.documaster.tech:8083/rms/api/public/noark5/v1/query HTTP/1.1
...
Authorization: Bearer {{accessTokenIntegrator}}
Content-Type: application/json
X-Documaster-Error-Response-Type: application/json
{
"type": "Saksmappe",
"limit": 1,
"query": "refEksternId.eksterntSystem = @externalSystemID && refEksternId.eksternID = @externalID",
"parameters" : {
"@externalSystemID": "Integrating System 1",
"@externalID" : "ISID:0000004573"
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"hasMore": false,
"results": [
{
"type": "Saksmappe",
"id": "1131",
"version": "10",
"fields": {
"uuid": "e8716b6e-3455-4148-870f-6435aa46cf5a",
"opprettetDato": "2021-12-07T12:05:56.134+0100",
"opprettetAv": "External Integrator ACME",
"opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
"mappeIdent": "2021/9",
"tittel": "API Created Case File - 3",
"beskrivelse": "Third API created Case File",
"dokumentmedium": "E",
"saksaar": 2021,
"sakssekvensnummer": 9,
"saksdato": "2021-12-07",
"administrativEnhet": "AD1",
"saksansvarlig": "External Integrator ACME",
"saksansvarligBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
"saksstatus": "B"
},
"links": {
"refPrimaerKlasse": 681,
"refArkivdel": 688
}
}
]
}
The query below is querying for a Case File (Saksmappe
) linked to two distinct secondary classes (Klasse
). The query uses joins to perform the filtering. Response is omitted since it is the same as the example from the previous example.
Request
POST https://<documaster-instance>.local.documaster.tech:8083/rms/api/public/noark5/v1/query HTTP/1.1
...
Authorization: Bearer {{accessTokenIntegrator}}
Content-Type: application/json
X-Documaster-Error-Response-Type: application/json
{
"type": "Saksmappe",
"limit": 2,
"query": "#secClass1.id = @class1 && #secClass2.id = @class2",
"parameters" : {
"@class1" : "1111",
"@class2" : "1113"
},
"joins": {
"#secClass1" : "refSekundaerKlasse",
"#secClass2" : "refSekundaerKlasse"
},
"sortOrder" : [
{
"field" : "mappeIdent",
"order" : "desc"
}
]
}
The query below is querying for a set of Case Files (Saksmappe
) that are with particular status, created in a particular time frame and with a particular primary class (and classification system). Response is omitted since it is the same as the example from the previous example.
Request
POST https://integrationtest.dev.documaster.tech:8083/rms/api/public/noark5/v1/query HTTP/1.1
...
Authorization: Bearer {{accessTokenIntegrator}}
Content-Type: application/json
X-Documaster-Error-Response-Type: application/json
{
"type": "Saksmappe",
"limit": 20,
"query": "refPrimaerKlasse.refKlassifikasjonssystem.id = @classificationSystemID && refPrimaerKlasse.klasseIdent = @classID && saksstatus = @caseFileStatus && opprettetDato = [@startDate:@endDate]",
"parameters" : {
"@classificationSystemID" : "3056241",
"@classID" : "4.5",
"@caseFileStatus" : "B",
"@startDate" : "2022-05-25T00:00:00",
"@endDate" : "2022-05-26T00:00:00"
},
"sortOrder" : [
{
"field" : "mappeIdent",
"order" : "desc"
}
]
}