Fonds and Fonds Creator

Creating Fonds

Fonds (Arkiv) is created with the POST /transaction operation. In the same transaction at least one Fonds Creator (Arkivskaper) entity should be created and associated to the Fonds (Arkiv).

  • transaction::save - new Fonds (Arkiv)
  • transaction::save - new Fonds Creator (Arkivskaper)
  • transaction::link - link new Fonds Creator (Arkivskaper) to new Fonds (Arkiv) with id 688

As a result of the transaction new Fonds (Arkiv) and Fonds Creator (Arkivskaper) are created with ids respectively 11888 and 11889.

      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": "Arkiv",
            "id": "arkiv-temp-id-1",
            "fields": {
                "tittel": "Integration Fonds",
                "beskrivelse": "API Create Fonds"
            }
        },
        {
            "action": "save",
            "type": "Arkivskaper",
            "id": "arkivskaper-temp-id-1",
            "fields": {
                "arkivskaperIdent": "EXI",
                "arkivskaperNavn": "External Integrator"
            }
        },
        {
            "action": "link",
            "type": "Arkiv",
            "id": "arkiv-temp-id-1",
            "ref": "refArkivskaper",
            "linkToId": "arkivskaper-temp-id-1"
        }
    ]
}

      Response

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

{
    "saved": {
        "arkiv-temp-id-1": {
            "type": "Arkiv",
            "id": "11888",
            "version": "4",
            "fields": {
                "uuid": "6fd14491-31ef-4e6a-b774-6bdc74187ded",
                "opprettetDato": "2022-05-30T15:04:40.083+0200",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "tittel": "Integration Fonds",
                "beskrivelse": "API Create Fonds",
                "arkivstatus": "O",
                "dokumentmedium": "E"
            },
            "links": {}
        },
        "arkivskaper-temp-id-1": {
            "type": "Arkivskaper",
            "id": "11889",
            "version": "2",
            "fields": {
                "uuid": "9a5f4140-c008-4c00-90e0-1656813d76bc",
                "opprettetDato": "2022-05-30T15:04:40.086+0200",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "arkivskaperIdent": "EXI",
                "arkivskaperNavn": "External Integrator"
            },
            "links": {
                "refArkiv": 11888
            }
        }
    }
}