Submitting Funeral Data

After establishing funeral responsibility, you can submit other funeral data to DGM using the petition endpoints. This approach provides a more reliable and efficient way to share funeral information compared to the legacy attachment-based method.

Prerequisites

Before submitting funeral petition data:

  1. A funeral responsible must be established with a signed responsibility statement
  2. You must have appropriate authorization credentials
  3. You should understand the structure of the petition data

Warning

The funeral petition endpoints can only be used when a funeral responsible has already been set in DGM. If no funeral responsible is set, the petition endpoints will reject your request with a 403 Forbidden error.

Petition Data Structure

A funeral petition contains three main components, each with its own processing workflow:

graph TD Petition[Funeral Petition] --> RS[Responsibility Statement] Petition --> Grave[Grave Data] Petition --> Rites[Rites Data] RS --> |Responsibility Statement Workflow| OfficialRs[Active data] Grave --> |Grave Data Workflow| OfficialGrave[Active data] Rites --> |No workflow required| OfficialRites[Active data]

The components of the funeral petition are processed asynchronously as they require different workflows before the data becomes active. Read about the component processing workflows below.

Implementation Steps

1. Retrieve Type Definitions (Optional)

To ensure your data is structured correctly, retrieve the available type definitions:

GET /dgm/api/v1/definitions/grave-types
GET /dgm/api/v1/definitions/rite-types

Example response:

[
  {
    "code": "COFFIN_ORDINARY",
    "name": "Ordinær kistegrav",
    "deprecatedFrom": null,
    "expectedAttributes": [
      {
        "key": "isDoubleDepth",
        "expectedType": "boolean",
        "isRequired": false
      }
    ]
  }
]

The above response is just an example and may differ based on the actual data.

2. Submit the Funeral Petition

Submit the complete funeral petition with all components:

POST /dgm/api/v1/funeral-petitions
{
  "partyId": "00000000-0000-0000-0000-000000000000",
  "data": {
    "responsibilityStatement": {
      "funeralHomeId": "12345",
      "allowFuneralHomeToContactNextOfKin": true,
      "placeOfDeathLocationId": "0301",
      "hasNotifiedNextOfKin": true,
      "cremation": {
        "ashHandling": "BURIAL",
        "urnBurialLocationId": "0301",
        "crematoriumId": "12345",
        "urnProvider": "FUNERAL_HOME",
        "hasAshSpreadingPermit": false
      }
    },
    "grave": {
      "type": "STANDARD_GRAVE",
      "attributes": {
        "depth": 2,
        "graveSize": "single"
      }
    },
    "rites": [
      {
        "type": "MEMORIAL_SERVICE",
        "location": "Oslo Cathedral",
        "dateTime": "2025-06-01T14:00:00Z"
      }
    ]
  }
}

3. Handle the Response

A successful submission returns 202 Accepted:

HTTP/1.1 202 Accepted

This indicates your data has been accepted for processing, but different components will be processed according to their individual workflows.

Component Processing Details

Responsibility Statement Processing

Changes to responsibility statement data submitted through the petition endpoint will:

  1. Create a new unsigned responsibility statement
  2. Initiate a new signing process in Altinn
  3. Require the next-of-kin to sign again
  4. Only become official after signing is complete

Grave Data Processing

Anytime a grave component is present in the petition, the funeral responsible will verify in Altinn that the data is in accordance with their intent.

If the funeral responsible is also the grave responsible, the data will become active after they verify in Altinn. If the funeral responsible is not the grave responsible, the data will become active after the grave responsible approves in Altinn.

Rites Data Processing

There is no workflow for rites currently. A rite component in the petition will be processed immediately and become active.

Error Handling

Common errors:

Status Code Description Action
403 Party is not funeral responsible Verify responsibility statement is signed
400 Invalid data structure Fix data according to type definitions
404 Funeral not found Check the party ID

Best Practices

  1. Merging the data should happen at your end, not in DGM

Next Steps

  1. Understand how to consume the data you've submitted
  2. Learn how to handle events for tracking component status