The services

Capabilities

Get capabilities

The service is used to get capabilities for a receiver.

Example 1 - Get all capabilities for an organization

Curl
$ curl 'http://localhost:8080/api/capabilities/987654321' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/capabilities/987654321 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 732

{
  "capabilities" : [ {
    "process" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
    "serviceIdentifier" : "DPO",
    "documentTypes" : [ {
      "type" : "arkivmelding",
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding"
    } ]
  }, {
    "process" : "urn:no:difi:profile:arkivmelding:response:ver1.0",
    "serviceIdentifier" : "DPO",
    "documentTypes" : [ {
      "type" : "arkivmelding_kvittering",
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding_kvittering"
    }, {
      "type" : "status",
      "standard" : "urn:no:difi:arkivmelding:xsd::status"
    }, {
      "type" : "feil",
      "standard" : "urn:no:difi:arkivmelding:xsd::feil"
    } ]
  } ]
}

Example 2 - Get capabilities for an organization with security level

Curl
$ curl 'http://localhost:8080/api/capabilities/987654321?securityLevel=4' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/capabilities/987654321?securityLevel=4 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 732

{
  "capabilities" : [ {
    "process" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
    "serviceIdentifier" : "DPO",
    "documentTypes" : [ {
      "type" : "arkivmelding",
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding"
    } ]
  }, {
    "process" : "urn:no:difi:profile:arkivmelding:response:ver1.0",
    "serviceIdentifier" : "DPO",
    "documentTypes" : [ {
      "type" : "arkivmelding_kvittering",
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding_kvittering"
    }, {
      "type" : "status",
      "standard" : "urn:no:difi:arkivmelding:xsd::status"
    }, {
      "type" : "feil",
      "standard" : "urn:no:difi:arkivmelding:xsd::feil"
    } ]
  } ]
}

Example 3 - Get capabilities for an organization with a specific process

Curl
$ curl 'http://localhost:8080/api/capabilities/987654321?process=admin-process' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/capabilities/987654321?process=admin-process HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 732

{
  "capabilities" : [ {
    "process" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
    "serviceIdentifier" : "DPO",
    "documentTypes" : [ {
      "type" : "arkivmelding",
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding"
    } ]
  }, {
    "process" : "urn:no:difi:profile:arkivmelding:response:ver1.0",
    "serviceIdentifier" : "DPO",
    "documentTypes" : [ {
      "type" : "arkivmelding_kvittering",
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding_kvittering"
    }, {
      "type" : "status",
      "standard" : "urn:no:difi:arkivmelding:xsd::status"
    }, {
      "type" : "feil",
      "standard" : "urn:no:difi:arkivmelding:xsd::feil"
    } ]
  } ]
}

Example 4 - Get all capabilities for an individual

Curl
$ curl 'http://localhost:8080/api/capabilities/01017012345' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/capabilities/01017012345 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1269

{
  "capabilities" : [ {
    "process" : "urn:no:difi:profile:digitalpost:info:ver1.0",
    "serviceIdentifier" : "DPI",
    "postAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "returnAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "documentTypes" : [ {
      "type" : "digital",
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital"
    } ]
  }, {
    "process" : "urn:no:difi:profile:digitalpost:vedtak:ver1.0",
    "serviceIdentifier" : "DPI",
    "postAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "returnAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "documentTypes" : [ {
      "type" : "digital",
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital"
    } ]
  } ]
}

Example 5 - Get capabilities for an individual with security level

Curl
$ curl 'http://localhost:8080/api/capabilities/01017012345?securityLevel=4' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/capabilities/01017012345?securityLevel=4 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1269

{
  "capabilities" : [ {
    "process" : "urn:no:difi:profile:digitalpost:info:ver1.0",
    "serviceIdentifier" : "DPI",
    "postAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "returnAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "documentTypes" : [ {
      "type" : "digital",
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital"
    } ]
  }, {
    "process" : "urn:no:difi:profile:digitalpost:vedtak:ver1.0",
    "serviceIdentifier" : "DPI",
    "postAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "returnAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "documentTypes" : [ {
      "type" : "digital",
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital"
    } ]
  } ]
}

Example 6 - Get capabilities for an individual with a specific process

Curl
$ curl 'http://localhost:8080/api/capabilities/01017012345?process=admin-process' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/capabilities/01017012345?process=admin-process HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1269

{
  "capabilities" : [ {
    "process" : "urn:no:difi:profile:digitalpost:info:ver1.0",
    "serviceIdentifier" : "DPI",
    "postAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "returnAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "documentTypes" : [ {
      "type" : "digital",
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital"
    } ]
  }, {
    "process" : "urn:no:difi:profile:digitalpost:vedtak:ver1.0",
    "serviceIdentifier" : "DPI",
    "postAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "returnAddress" : {
      "name" : "Kari Nordmann",
      "street" : "Utsikten 1",
      "postalCode" : "2900",
      "postalArea" : "FJELLHEIMEN",
      "country" : "Norway"
    },
    "documentTypes" : [ {
      "type" : "digital",
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital"
    } ]
  } ]
}

About the service

Request parameters
Parameter Description

securityLevel

An optional security level. Is an integer like 1, 2, 3 or 4.

Response fields
Path Type Description

capabilities[].process

String

Type of process.

capabilities[].serviceIdentifier

String

The service identifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

capabilities[].postAddress

Object

An postal address.

capabilities[].returnAddress

Object

An return address.

capabilities[].documentTypes

Array

An postal address.

capabilities[].postAddress.name

String

Name of the recipient.

capabilities[].postAddress.street

String

Street name

capabilities[].postAddress.postalCode

String

Postal code.

capabilities[].postAddress.postalArea

String

City / Postal area.

capabilities[].postAddress.country

String

Country.

capabilities[].returnAddress.name

String

Name of the recipient.

capabilities[].returnAddress.street

String

Street name

capabilities[].returnAddress.postalCode

String

Postal code.

capabilities[].returnAddress.postalArea

String

City / Postal area.

capabilities[].returnAddress.country

String

Country.

capabilities[].documentTypes[].type

String

Message type. This is always identical to the last part of the standard.

capabilities[].documentTypes[].standard

String

Document type.

Incoming messages

To fetch messages it is necessary to start with the Peek incoming messages operation. This will get the first message in the incoming queue and simultaneously lock the message. If you are looking for a specific type of message, then there are several filters available. When the message is locked, it can be retrieved with Pop incoming messages. After the message is successfully downloaded, it should be deleted using the Delete incoming message operation.

messages in

Find incoming messages

The service is used to search for incoming messages. The response is paged with a default page size of 10.

Example 1 - Get all incoming messages

Curl
$ curl 'http://localhost:8080/api/messages/in' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/in HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2843

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
        "type" : "arkivmelding",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
          "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "arkivmelding" : {
      "hoveddokument" : "before_the_law.txt"
    }
  }, {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:einnsyn:xsd::publisering",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "04f00fe6-eded-4fe8-8649-607650466a39",
        "type" : "publisering",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "e615f7ba-3089-46cb-9263-6c34f3b6769e",
          "identifier" : "urn:no:difi:profile:einnsyn:journalpost:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "publisering" : {
      "orgnr" : "98765432"
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 2 - Search for incoming DPO messages

Curl
$ curl 'http://localhost:8080/api/messages/in?serviceIdentifier=DPO' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/in?serviceIdentifier=DPO HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1690

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
        "type" : "arkivmelding",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
          "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "arkivmelding" : {
      "hoveddokument" : "before_the_law.txt"
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 1,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 3 - Sorting

Curl
$ curl 'http://localhost:8080/api/messages/in?sort=lastUpdated%2Casc' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/in?sort=lastUpdated%2Casc HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2845

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
        "type" : "arkivmelding",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
          "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "arkivmelding" : {
      "hoveddokument" : "before_the_law.txt"
    }
  }, {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:einnsyn:xsd::publisering",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "04f00fe6-eded-4fe8-8649-607650466a39",
        "type" : "publisering",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "e615f7ba-3089-46cb-9263-6c34f3b6769e",
          "identifier" : "urn:no:difi:profile:einnsyn:journalpost:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "publisering" : {
      "orgnr" : "98765432"
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 4 - Paging

Curl
$ curl 'http://localhost:8080/api/messages/in?page=3&size=10' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/in?page=3&size=10 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1693

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
        "type" : "arkivmelding",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
          "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "arkivmelding" : {
      "hoveddokument" : "before_the_law.txt"
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 3,
    "pageSize" : 10,
    "offset" : 30,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 31,
  "last" : true,
  "totalPages" : 4,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 1,
  "first" : false,
  "size" : 10,
  "number" : 3,
  "empty" : false
}

About the service

Request parameters
Parameter Description

messageId

Filter on messageId.

conversationId

Filter on conversationId.

receiverIdentifier

Filter on receiverIdentifier.

senderIdentifier

Filter on senderIdentifier.

serviceIdentifier

Filter on serviceIdentifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

process

Filter on process.

page

Page you want to retrieve. First page is page 0

size

Size of the page you want to retrieve.

sort

Properties that should be sorted by in the format property,property(,ASC|DESC). Default sort direction is ascending. Use multiple sort parameters if you want to switch directions, e.g. ?sort=firstname&sort=lastname,asc.

Response fields
Path Type Description

content[].standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

content[].standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

content[].standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

content[].standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

content[].standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

content[].standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

content[].standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

content[].standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

content[].standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

content[].standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

content[].standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

content[].standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

content[].standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

content[].standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

content[].standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

content[].standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

content[].standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

content[].standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

content[].standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

content[].standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

content[].arkivmelding

Object

The DPO business message

content[].arkivmelding.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one. Should only be specified for DPF.

content[].publisering.

Object

The publisering DPI business message

content[].publisering.orgnr

Varies

Business registration number.

last

Boolean

A boolean value indicating if this is the last page or not.

totalElements

Number

The total number of elements

totalPages

Number

The total number of pages

size

Number

The page size

number

Number

The page number

first

Boolean

A boolean value indicating if this is the first page or not.

numberOfElements

Number

Number of elements returned in the page.

empty

Boolean

True if the page is empty. False if not.

sort.sorted

Boolean

True if the result set is sorted. False otherwise.

sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

sort.empty

Boolean

True if no sorting. False otherwise

pageable.offset

Number

The offset to be taken according to the underlying page and page size.

pageable.pageSize

Number

The requested page size

pageable.pageNumber

Number

The requested page number

pageable.sort.sorted

Boolean

True if the result set is sorted. False otherwise.

pageable.sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

pageable.sort.empty

Boolean

True if no sorting. False otherwise

Peek incoming messages

The service is used to initiate the download of an incoming message. The operations gets the first message on the incoming queue and simultaneously locks it. The message is now ready for download.

Example 1 - Peek incoming message

Curl
$ curl 'http://localhost:8080/api/messages/in/peek' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/in/peek HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1079

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::publisering",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "04f00fe6-eded-4fe8-8649-607650466a39",
      "type" : "publisering",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "e615f7ba-3089-46cb-9263-6c34f3b6769e",
        "identifier" : "urn:no:difi:profile:einnsyn:journalpost:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "publisering" : {
    "orgnr" : "98765432"
  }
}

Example 2 - Peek incoming DPE message

Curl
$ curl 'http://localhost:8080/api/messages/in/peek?serviceIdentifier=DPE' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/in/peek?serviceIdentifier=DPE HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1079

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::publisering",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "04f00fe6-eded-4fe8-8649-607650466a39",
      "type" : "publisering",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "e615f7ba-3089-46cb-9263-6c34f3b6769e",
        "identifier" : "urn:no:difi:profile:einnsyn:journalpost:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "publisering" : {
    "orgnr" : "98765432"
  }
}

Example 3 - No more messages

Response
HTTP/1.1 204 No Content
Content-Type: application/json
Content-Length: 238

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 204,
  "error" : "No Content",
  "exception" : "no.difi.meldingsutveksling.exceptions.NoContentException",
  "message" : "No content",
  "path" : "/api/messages/in/peek"
}
Response fields
Path Type Description

timestamp

String

Date and time for when the error occured.

status

Number

HTTP status code.

error

String

Error description

exception

String

The java class of the Exception that was thrown

message

String

A message describing the error.

path

String

The request URI

description

String

A more detailed description of the error.

About the service

Request parameters
Parameter Description

messageId

Filter on messageId.

conversationId

Filter on conversationId.

receiverIdentifier

Filter on receiverIdentifier.

senderIdentifier

Filter on senderIdentifier.

serviceIdentifier

Filter on serviceIdentifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

process

Filter on process.

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

publisering

Object

The DPE business message

publisering.orgnr

Varies

Business registration number.

Pop incoming messages

The service is used to download the ASiC of an incoming message.

Please note, that the message must be deleted from the queue, using Delete incoming message.

Example 1 - Download ASiC

Curl
$ curl 'http://localhost:8080/api/messages/in/pop/e99e5cd1-74de-4cce-b902-cecdf97dc4f3' -i -X GET \
    -H 'Accept: application/vnd.etsi.asic-e+zip'
Request
GET /api/messages/in/pop/e99e5cd1-74de-4cce-b902-cecdf97dc4f3 HTTP/1.1
Accept: application/vnd.etsi.asic-e+zip
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Disposition: attachment; filename=asic.zip
Content-Type: application/vnd.etsi.asic-e+zip
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1151

PK��SZ]S���������������test����U�s"�����Z��a���PH[c-�VNƴ� 2������=�U������1A�ʯ�~|#�Ǿs�!i�A[��q@��#���"�M��?|e��qQ��o�����xx��d#L2���/�#��&�r��Zj+M�ku��G�֬6����&�#��Wj]�t���w�{���S�WY3iGr��
*n���\��p�?>����9�#L�p�!���#,y��?�)�\���$���;Ǎ�>x�<���M}�ܷ΁J�x����9Ľ���:)7>7ǁ�= ���`���6c�������n�=F?$��t-ZJ-��.5M��R���k���uXy^������(`bcs'�q�{���cGe��Cek,���Se�|R��|}>�F<�5|��8<�˟�vD�3K�����>~���`u��5�$�,F
I/�����T@.W}R'ồj]Ē��'ߢ�ո%gB�5�>����c�.ղ�i'�݅���V���ѳ�ș����+s>�dZ:�)H3�u�M�V.��1]j�,��B7��,)��G���G���/`@@�T�#�ڥ_r�
�L��&�^�#�W��9�� Yb:�@�'p��q��b�1��I8^,�)oȺs�RBl����Rp1Ns�בgR.�n���T�L��5�u�9m�K�M��w��9����_��4��G����)������!��~rx��`Z��(>JA��u1�$rV�Q�����yܱ���������@m���u,�q扱�����zV1F	r�Z��$�L�y&Ln'�+�S �oC�ߵ%Tc)��"�Nr�(f3 Xl��&h[O2?�e����Z�w�v9�(g�0@��p�vL}�
�ӈ��?��A?�pv7��K?�}g~.�8H��"�/�����V�і�~I���������*a�hW]7hyF���1*8�09m����jW�2>�ݔ��u�y��
��1�Y��������8�赫ѷ@�y=��@K�r����c��c�g�PK��7;�����PK���SZ]S��7;����������������������testPK������2���7

About the service

Path parameters
Table 1. /api/messages/in/pop/{messageId}
Parameter Description

messageId

The messageId of the message to pop.

Delete incoming message

The service is used to delete an incoming message.

Example 1 - Delete an incoming message

Curl
$ curl 'http://localhost:8080/api/messages/in/e99e5cd1-74de-4cce-b902-cecdf97dc4f3' -i -X DELETE \
    -H 'Accept: application/json'
Request
DELETE /api/messages/in/e99e5cd1-74de-4cce-b902-cecdf97dc4f3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1116

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
}

About the service

Path parameters
Table 2. /api/messages/in/{messageId}
Parameter Description

messageId

The messageId of the message to pop.

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

arkivmelding

Object

The DPO business message

arkivmelding.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one. Should only be specified for DPF.

Outgoing messages

create message

Find outgoing messages

The service is used to find messages on the outgoing queue.

Example 1 - Find all outgoing messages

Curl
$ curl 'http://localhost:8080/api/messages/out' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/out HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3311

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
        "type" : "arkivmelding",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
          "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "arkivmelding" : {
      "hoveddokument" : "before_the_law.txt"
    }
  }, {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:digitalpost:xsd:digital::digital",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "c6fbe0f1-64ff-4064-8d19-00f3ca66aecd",
        "type" : "digital",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "9c5ce504-13ed-4f18-860b-61f5ae36c427",
          "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "digital" : {
      "sikkerhetsnivaa" : 4,
      "hoveddokument" : "kafka_quotes.txt",
      "tittel" : "Kafka quotes",
      "spraak" : "en",
      "digitalPostInfo" : {
        "virkningsdato" : "2019-04-01",
        "aapningskvittering" : true
      },
      "varsler" : {
        "epostTekst" : "Many a book is like a key to unknown chambers within the castle of one’s own self.",
        "smsTekst" : "A book must be the axe for the frozen sea within us."
      },
      "metadataFiler" : { }
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 2 - Find all outgoing DPO messages

Curl
$ curl 'http://localhost:8080/api/messages/out?serviceIdentifier=DPO' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/out?serviceIdentifier=DPO HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1690

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
        "type" : "arkivmelding",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
          "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "arkivmelding" : {
      "hoveddokument" : "before_the_law.txt"
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 1,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 3 - Sorting

Curl
$ curl 'http://localhost:8080/api/messages/out?sort=lastUpdated%2Casc' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/out?sort=lastUpdated%2Casc HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3313

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
        "type" : "arkivmelding",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
          "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "arkivmelding" : {
      "hoveddokument" : "before_the_law.txt"
    }
  }, {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:digitalpost:xsd:digital::digital",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "c6fbe0f1-64ff-4064-8d19-00f3ca66aecd",
        "type" : "digital",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "9c5ce504-13ed-4f18-860b-61f5ae36c427",
          "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "digital" : {
      "sikkerhetsnivaa" : 4,
      "hoveddokument" : "kafka_quotes.txt",
      "tittel" : "Kafka quotes",
      "spraak" : "en",
      "digitalPostInfo" : {
        "virkningsdato" : "2019-04-01",
        "aapningskvittering" : true
      },
      "varsler" : {
        "epostTekst" : "Many a book is like a key to unknown chambers within the castle of one’s own self.",
        "smsTekst" : "A book must be the axe for the frozen sea within us."
      },
      "metadataFiler" : { }
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 4 - Paging

Curl
$ curl 'http://localhost:8080/api/messages/out?page=3&size=10' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/out?page=3&size=10 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2125

{
  "content" : [ {
    "standardBusinessDocumentHeader" : {
      "headerVersion" : "1.0",
      "sender" : [ {
        "identifier" : {
          "value" : "0192:910077473",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "receiver" : [ {
        "identifier" : {
          "value" : "0192:910075918",
          "authority" : "iso6523-actorid-upis"
        }
      } ],
      "documentIdentification" : {
        "standard" : "urn:no:difi:digitalpost:xsd:digital::digital",
        "typeVersion" : "1.0",
        "instanceIdentifier" : "c6fbe0f1-64ff-4064-8d19-00f3ca66aecd",
        "type" : "digital",
        "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
      },
      "businessScope" : {
        "scope" : [ {
          "type" : "ConversationId",
          "instanceIdentifier" : "9c5ce504-13ed-4f18-860b-61f5ae36c427",
          "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
          "scopeInformation" : [ {
            "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
          } ]
        } ]
      }
    },
    "digital" : {
      "sikkerhetsnivaa" : 4,
      "hoveddokument" : "kafka_quotes.txt",
      "tittel" : "Kafka quotes",
      "spraak" : "en",
      "digitalPostInfo" : {
        "virkningsdato" : "2019-04-01",
        "aapningskvittering" : true
      },
      "varsler" : {
        "epostTekst" : "Many a book is like a key to unknown chambers within the castle of one’s own self.",
        "smsTekst" : "A book must be the axe for the frozen sea within us."
      },
      "metadataFiler" : { }
    }
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 3,
    "pageSize" : 10,
    "offset" : 30,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 41,
  "last" : false,
  "totalPages" : 5,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 1,
  "first" : false,
  "size" : 10,
  "number" : 3,
  "empty" : false
}

About the service

Request parameters
Parameter Description

conversationId

Filter on conversationId

messageId

Filter on messageId

processIdentifier

Filter on processIdentifier

receiverIdentifier

Filter on receiverIdentifier

senderIdentifier

Filter on senderIdentifier

serviceIdentifier

Filter on service identifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

page

Page you want to retrieve. First page is page 0

size

Size of the page you want to retrieve.

sort

Properties that should be sorted by in the format property,property(,ASC|DESC). Default sort direction is ascending. Use multiple sort parameters if you want to switch directions, e.g. ?sort=firstname&sort=lastname,asc.

Response fields
Path Type Description

content[].standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

content[].standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

content[].standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

content[].standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

content[].standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

content[].standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

content[].standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

content[].standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

content[].standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

content[].standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

content[].standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

content[].standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

content[].standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

content[].standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

content[].standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

content[].standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

content[].standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

content[].standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

content[].standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

content[].standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

content[].arkivmelding

Object

The DPO business message

content[].arkivmelding.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one. Should only be specified for DPF.

content[].digital.

Object

The digital DPI business message

content[].digital.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one.

content[].digital.sikkerhetsnivaa

Varies

Defines the authentication level required for the document to be opened.

content[].digital.tittel

Varies

The title of the message.

content[].digital.spraak

Varies

Language of the message.

content[].digital.digitalPostInfo

Varies

Language of the message.

content[].digital.varsler

Varies

Information on how the mailbox supplier should notify the Recipient of the new mail. Receiver overrides its own notification preferences

content[].digital.metadataFiler

Varies

Map of metadatadocuments.

content[].digital.digitalPostInfo.virkningsdato

Varies

Date for when a message is to be made available to the Resident in the Resident’s mailbox. The document will be delivered to the mailbox before this time, but will not be visible / accessible to Citizen. Note that the field is only a DATE and cannot be controlled at the time. In practice, this means that the mail will be made available on the night of the business day and that the mailbox can spend all day accessing mail with the same effective date.

content[].digital.digitalPostInfo.aapningskvittering

Varies

If you want a receipt when the recipient has opened the document.

content[].digital.varsler.epostTekst

Varies

Email content

content[].digital.varsler.smsTekst

Varies

SMS content

last

Boolean

A boolean value indicating if this is the last page or not.

totalElements

Number

The total number of elements

totalPages

Number

The total number of pages

size

Number

The page size

number

Number

The page number

first

Boolean

A boolean value indicating if this is the first page or not.

numberOfElements

Number

Number of elements returned in the page.

empty

Boolean

True if the page is empty. False if not.

sort.sorted

Boolean

True if the result set is sorted. False otherwise.

sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

sort.empty

Boolean

True if no sorting. False otherwise

pageable.offset

Number

The offset to be taken according to the underlying page and page size.

pageable.pageSize

Number

The requested page size

pageable.pageNumber

Number

The requested page number

pageable.sort.sorted

Boolean

True if the result set is sorted. False otherwise.

pageable.sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

pageable.sort.empty

Boolean

True if no sorting. False otherwise

Get outgoing message

The service is used to get a message on the outgoing queue by messageId.

Curl
$ curl 'http://localhost:8080/api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1116

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
}

About the service

Request parameters
Parameter Description

messageId

The messageId

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

arkivmelding

Object

The DPO business message

arkivmelding.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one. Should only be specified for DPF.

Create message

The service is used to perform the first step for sending a message, which is uploading the Standard Business Document.

Example 1 - Creating an arkivmelding message

Available processes

urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0

urn:no:difi:profile:arkivmelding:helseSosialOgOmsorg:ver1.0

urn:no:difi:profile:arkivmelding:oppvekstOgUtdanning:ver1.0

urn:no:difi:profile:arkivmelding:kulturIdrettOgFritid:ver1.0

urn:no:difi:profile:arkivmelding:trafikkReiserOgSamferdsel:ver1.0

urn:no:difi:profile:arkivmelding:naturOgMiljoe:ver1.0

urn:no:difi:profile:arkivmelding:naeringsutvikling:ver1.0

urn:no:difi:profile:arkivmelding:skatterOgAvgifter:ver1.0

urn:no:difi:profile:arkivmelding:tekniskeTjenester:ver1.0

urn:no:difi:profile:arkivmelding:administrasjon:ver1.0

Curl
$ curl 'http://localhost:8080/api/messages/out' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
}'
Request
POST /api/messages/out HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 1056
Host: localhost:8080

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1116

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
}
Request fields
Path Type Description Constraints

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

Must not be null

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

Size must be between 0 and 1 inclusive

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

Must not be empty. Size must be between 1 and 1 inclusive

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

Must not be null

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

Must not be null

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

Must not be null

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

Must not be null

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

Must be a UUID.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

Must be a NextMove message type. Must not be null

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

Must be in the past

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

Must not be null. Size must be between 1 and 2147483647 inclusive

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

Allowed values are: ConversationId, SenderRef, ReceiverRef. Must not be null

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

Must be in the future

arkivmelding.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one. Should only be specified for DPF.

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

arkivmelding.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one. Should only be specified for DPF.

Example 2 - Creating a DPI digital message

Available processes

urn:no:difi:profile:digitalpost:info:ver1.0

urn:no:difi:profile:digitalpost:vedtak:ver1.0

Curl
$ curl 'http://localhost:8080/api/messages/out' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "c6fbe0f1-64ff-4064-8d19-00f3ca66aecd",
      "type" : "digital"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "9c5ce504-13ed-4f18-860b-61f5ae36c427",
        "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "digital" : {
    "sikkerhetsnivaa" : 4,
    "hoveddokument" : "kafka_quotes.txt",
    "tittel" : "Kafka quotes",
    "spraak" : "en",
    "digitalPostInfo" : {
      "virkningsdato" : "2019-04-01",
      "aapningskvittering" : true
    },
    "varsler" : {
      "epostTekst" : "Many a book is like a key to unknown chambers within the castle of one’s own self.",
      "smsTekst" : "A book must be the axe for the frozen sea within us."
    },
    "metadataFiler" : { }
  }
}'
Request
POST /api/messages/out HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 1463
Host: localhost:8080

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "c6fbe0f1-64ff-4064-8d19-00f3ca66aecd",
      "type" : "digital"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "9c5ce504-13ed-4f18-860b-61f5ae36c427",
        "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "digital" : {
    "sikkerhetsnivaa" : 4,
    "hoveddokument" : "kafka_quotes.txt",
    "tittel" : "Kafka quotes",
    "spraak" : "en",
    "digitalPostInfo" : {
      "virkningsdato" : "2019-04-01",
      "aapningskvittering" : true
    },
    "varsler" : {
      "epostTekst" : "Many a book is like a key to unknown chambers within the castle of one’s own self.",
      "smsTekst" : "A book must be the axe for the frozen sea within us."
    },
    "metadataFiler" : { }
  }
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1523

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "c6fbe0f1-64ff-4064-8d19-00f3ca66aecd",
      "type" : "digital",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "9c5ce504-13ed-4f18-860b-61f5ae36c427",
        "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "digital" : {
    "sikkerhetsnivaa" : 4,
    "hoveddokument" : "kafka_quotes.txt",
    "tittel" : "Kafka quotes",
    "spraak" : "en",
    "digitalPostInfo" : {
      "virkningsdato" : "2019-04-01",
      "aapningskvittering" : true
    },
    "varsler" : {
      "epostTekst" : "Many a book is like a key to unknown chambers within the castle of one’s own self.",
      "smsTekst" : "A book must be the axe for the frozen sea within us."
    },
    "metadataFiler" : { }
  }
}
Request fields
Path Type Description Constraints

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

Must not be null

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

Size must be between 0 and 1 inclusive

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

Must not be empty. Size must be between 1 and 1 inclusive

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

Must not be null

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

Must not be null

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

Must not be null

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

Must not be null

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

Must be a UUID.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

Must be a NextMove message type. Must not be null

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

Must be in the past

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

Must not be null. Size must be between 1 and 2147483647 inclusive

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

Allowed values are: ConversationId, SenderRef, ReceiverRef. Must not be null

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

Must be in the future

digital.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one.

Must not be null

digital.sikkerhetsnivaa

Varies

Defines the authentication level required for the document to be opened.

Must not be null

digital.tittel

Varies

The title of the message.

Must not be null

digital.spraak

Varies

Language of the message.

Must not be null

digital.digitalPostInfo

Varies

Language of the message.

Must not be null

digital.varsler

Varies

Information on how the mailbox supplier should notify the Recipient of the new mail. Receiver overrides its own notification preferences

digital.metadataFiler

Varies

Map of metadatadocuments.

digital.digitalPostInfo.virkningsdato

Varies

Date for when a message is to be made available to the Resident in the Resident’s mailbox. The document will be delivered to the mailbox before this time, but will not be visible / accessible to Citizen. Note that the field is only a DATE and cannot be controlled at the time. In practice, this means that the mail will be made available on the night of the business day and that the mailbox can spend all day accessing mail with the same effective date.

Must not be null

digital.digitalPostInfo.aapningskvittering

Varies

If you want a receipt when the recipient has opened the document.

Must not be null

digital.varsler.epostTekst

Varies

Email content

digital.varsler.smsTekst

Varies

SMS content

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

digital.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one.

digital.sikkerhetsnivaa

Varies

Defines the authentication level required for the document to be opened.

digital.tittel

Varies

The title of the message.

digital.spraak

Varies

Language of the message.

digital.digitalPostInfo

Varies

Language of the message.

digital.varsler

Varies

Information on how the mailbox supplier should notify the Recipient of the new mail. Receiver overrides its own notification preferences

digital.metadataFiler

Varies

Map of metadatadocuments.

digital.digitalPostInfo.virkningsdato

Varies

Date for when a message is to be made available to the Resident in the Resident’s mailbox. The document will be delivered to the mailbox before this time, but will not be visible / accessible to Citizen. Note that the field is only a DATE and cannot be controlled at the time. In practice, this means that the mail will be made available on the night of the business day and that the mailbox can spend all day accessing mail with the same effective date.

digital.digitalPostInfo.aapningskvittering

Varies

If you want a receipt when the recipient has opened the document.

digital.varsler.epostTekst

Varies

Email content

digital.varsler.smsTekst

Varies

SMS content

Example 3 - Creating a DPV digital message

Available processes

urn:no:difi:profile:digitalpost:info:ver1.0

urn:no:difi:profile:digitalpost:vedtak:ver1.0

Curl
$ curl 'http://localhost:8080/api/messages/out' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital_dpv",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "362c4651-51c5-40cf-b56a-c03dfa930a0b",
      "type" : "digital_dpv"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "85341db1-da72-4783-8df4-dce2b242d452",
        "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "digital_dpv" : {
    "tittel" : "Our winters",
    "sammendrag" : "A quote from Franz Kafka's The Castle",
    "innhold" : "Our winters are very long here, very long and very monotonous. But we don't complain about it downstairs, we're shielded against the winter. Oh, spring does come eventually, and summer, and they last for a while, but now, looking back, spring and summer seem too short, as if they were not much more than a couple of days, and even on those days, no matter how lovely the day, it still snows occasionally."
  }
}'
Request
POST /api/messages/out HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 1519
Host: localhost:8080

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital_dpv",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "362c4651-51c5-40cf-b56a-c03dfa930a0b",
      "type" : "digital_dpv"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "85341db1-da72-4783-8df4-dce2b242d452",
        "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "digital_dpv" : {
    "tittel" : "Our winters",
    "sammendrag" : "A quote from Franz Kafka's The Castle",
    "innhold" : "Our winters are very long here, very long and very monotonous. But we don't complain about it downstairs, we're shielded against the winter. Oh, spring does come eventually, and summer, and they last for a while, but now, looking back, spring and summer seem too short, as if they were not much more than a couple of days, and even on those days, no matter how lovely the day, it still snows occasionally."
  }
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1579

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:digital::digital_dpv",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "362c4651-51c5-40cf-b56a-c03dfa930a0b",
      "type" : "digital_dpv",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "85341db1-da72-4783-8df4-dce2b242d452",
        "identifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "digital_dpv" : {
    "tittel" : "Our winters",
    "sammendrag" : "A quote from Franz Kafka's The Castle",
    "innhold" : "Our winters are very long here, very long and very monotonous. But we don't complain about it downstairs, we're shielded against the winter. Oh, spring does come eventually, and summer, and they last for a while, but now, looking back, spring and summer seem too short, as if they were not much more than a couple of days, and even on those days, no matter how lovely the day, it still snows occasionally."
  }
}
Request fields
Path Type Description Constraints

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

Must not be null

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

Size must be between 0 and 1 inclusive

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

Must not be empty. Size must be between 1 and 1 inclusive

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

Must not be null

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

Must not be null

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

Must not be null

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

Must not be null

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

Must be a UUID.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

Must be a NextMove message type. Must not be null

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

Must be in the past

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

Must not be null. Size must be between 1 and 2147483647 inclusive

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

Allowed values are: ConversationId, SenderRef, ReceiverRef. Must not be null

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

Must be in the future

digital_dpv.tittel

String

The title.

Must not be null

digital_dpv.sammendrag

String

Summary.

Must not be null

digital_dpv.innhold

String

The document content.

Must not be null

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

digital_dpv.tittel

String

The title.

digital_dpv.sammendrag

String

Summary.

digital_dpv.innhold

String

The document content.

Example 4 - Creating a DPI print message

Available processes

urn:no:difi:profile:digitalpost:info:ver1.0

urn:no:difi:profile:digitalpost:vedtak:ver1.0

Curl
$ curl 'http://localhost:8080/api/messages/out' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:fysisk::print",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "73c56dbe-117c-4717-81cf-7b2909675fb0",
      "type" : "print"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "10624cdc-3277-406d-b508-24b504d4405d",
        "identifier" : "urn:no:difi:profile:digitalpost:vedtak:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "print" : {
    "hoveddokument" : "kafka_quotes.txt",
    "mottaker" : {
      "navn" : "Ola Nordmann",
      "adresselinje1" : "Langtoppilia 1",
      "adresselinje2" : "",
      "adresselinje3" : "",
      "adresselinje4" : "",
      "postnummer" : "9999",
      "poststed" : "FJELL",
      "land" : "Norway"
    },
    "utskriftsfarge" : "FARGE",
    "posttype" : "A_PRIORITERT",
    "retur" : {
      "mottaker" : {
        "navn" : "Fjellheimen kommune",
        "adresselinje1" : "Luftigveien 1",
        "adresselinje2" : "",
        "adresselinje3" : "",
        "adresselinje4" : "",
        "postnummer" : "9999",
        "poststed" : "FJELL",
        "land" : "Norway"
      },
      "returhaandtering" : "DIREKTE_RETUR"
    },
    "printinstruksjoner" : { }
  }
}'
Request
POST /api/messages/out HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 1770
Host: localhost:8080

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:fysisk::print",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "73c56dbe-117c-4717-81cf-7b2909675fb0",
      "type" : "print"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "10624cdc-3277-406d-b508-24b504d4405d",
        "identifier" : "urn:no:difi:profile:digitalpost:vedtak:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "print" : {
    "hoveddokument" : "kafka_quotes.txt",
    "mottaker" : {
      "navn" : "Ola Nordmann",
      "adresselinje1" : "Langtoppilia 1",
      "adresselinje2" : "",
      "adresselinje3" : "",
      "adresselinje4" : "",
      "postnummer" : "9999",
      "poststed" : "FJELL",
      "land" : "Norway"
    },
    "utskriftsfarge" : "FARGE",
    "posttype" : "A_PRIORITERT",
    "retur" : {
      "mottaker" : {
        "navn" : "Fjellheimen kommune",
        "adresselinje1" : "Luftigveien 1",
        "adresselinje2" : "",
        "adresselinje3" : "",
        "adresselinje4" : "",
        "postnummer" : "9999",
        "poststed" : "FJELL",
        "land" : "Norway"
      },
      "returhaandtering" : "DIREKTE_RETUR"
    },
    "printinstruksjoner" : { }
  }
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1830

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:digitalpost:xsd:fysisk::print",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "73c56dbe-117c-4717-81cf-7b2909675fb0",
      "type" : "print",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "10624cdc-3277-406d-b508-24b504d4405d",
        "identifier" : "urn:no:difi:profile:digitalpost:vedtak:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "print" : {
    "hoveddokument" : "kafka_quotes.txt",
    "mottaker" : {
      "navn" : "Ola Nordmann",
      "adresselinje1" : "Langtoppilia 1",
      "adresselinje2" : "",
      "adresselinje3" : "",
      "adresselinje4" : "",
      "postnummer" : "9999",
      "poststed" : "FJELL",
      "land" : "Norway"
    },
    "utskriftsfarge" : "FARGE",
    "posttype" : "A_PRIORITERT",
    "retur" : {
      "mottaker" : {
        "navn" : "Fjellheimen kommune",
        "adresselinje1" : "Luftigveien 1",
        "adresselinje2" : "",
        "adresselinje3" : "",
        "adresselinje4" : "",
        "postnummer" : "9999",
        "poststed" : "FJELL",
        "land" : "Norway"
      },
      "returhaandtering" : "DIREKTE_RETUR"
    },
    "printinstruksjoner" : { }
  }
}
Request fields
Path Type Description Constraints

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

Must not be null

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

Size must be between 0 and 1 inclusive

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

Must not be empty. Size must be between 1 and 1 inclusive

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

Must not be null

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

Must not be null

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

Must not be null

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

Must not be null

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

Must be a UUID.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

Must be a NextMove message type. Must not be null

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

Must be in the past

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

Must not be null. Size must be between 1 and 2147483647 inclusive

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

Allowed values are: ConversationId, SenderRef, ReceiverRef. Must not be null

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

Must be in the future

print.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one.

Must not be null

print.mottaker

Object

Postal address of the recipient.

print.utskriftsfarge

String

Used to specify type of print. Can be one of: SORT_HVIT, FARGE

print.posttype

String

Mail type. Can be one of: A_PRIORITERT, B_OEKONOMI

print.retur

Object

Return address to be placed on the back of the envelope.

print.printinstruksjoner

Object

Map of print instructions

print.mottaker.navn

String

Name of the recipient.

Must not be null

print.mottaker.adresselinje1

String

Address line 1. Usually the street address.

Must not be null

print.mottaker.adresselinje2

String

Address line 2.

print.mottaker.adresselinje3

String

Address line 3.

print.mottaker.adresselinje4

String

Address line 4.

print.mottaker.postnummer

String

Postal code.

Must not be null

print.mottaker.poststed

String

City / Postal area.

Must not be null

print.mottaker.land

String

Name of country.

Must not be null

print.retur.mottaker

Object

Postal address of the sender.

Must not be null

print.retur.returhaandtering

String

Used to specify type of return. Can be one of: DIREKTE_RETUR, MAKULERING_MED_MELDING

Must not be null

print.retur.mottaker.navn

String

Name of the recipient.

Must not be null

print.retur.mottaker.adresselinje1

String

Address line 1. Usually the street address.

Must not be null

print.retur.mottaker.adresselinje2

String

Address line 2.

print.retur.mottaker.adresselinje3

String

Address line 3.

print.retur.mottaker.adresselinje4

String

Address line 4.

print.retur.mottaker.postnummer

String

Postal code.

Must not be null

print.retur.mottaker.poststed

String

City / Postal area.

Must not be null

print.retur.mottaker.land

String

Name of country.

Must not be null

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

print.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one.

print.mottaker

Object

Postal address of the recipient.

print.utskriftsfarge

String

Used to specify type of print. Can be one of: SORT_HVIT, FARGE

print.posttype

String

Mail type. Can be one of: A_PRIORITERT, B_OEKONOMI

print.retur

Object

Return address to be placed on the back of the envelope.

print.printinstruksjoner

Object

Map of print instructions

print.mottaker.navn

String

Name of the recipient.

print.mottaker.adresselinje1

String

Address line 1. Usually the street address.

print.mottaker.adresselinje2

String

Address line 2.

print.mottaker.adresselinje3

String

Address line 3.

print.mottaker.adresselinje4

String

Address line 4.

print.mottaker.postnummer

String

Postal code.

print.mottaker.poststed

String

City / Postal area.

print.mottaker.land

String

Name of country.

print.retur.mottaker

Object

Postal address of the sender.

print.retur.returhaandtering

String

Used to specify type of return. Can be one of: DIREKTE_RETUR, MAKULERING_MED_MELDING

print.retur.mottaker.navn

String

Name of the recipient.

print.retur.mottaker.adresselinje1

String

Address line 1. Usually the street address.

print.retur.mottaker.adresselinje2

String

Address line 2.

print.retur.mottaker.adresselinje3

String

Address line 3.

print.retur.mottaker.adresselinje4

String

Address line 4.

print.retur.mottaker.postnummer

String

Postal code.

print.retur.mottaker.poststed

String

City / Postal area.

print.retur.mottaker.land

String

Name of country.

Example 5 - Creating a DPE innsynskrav message

Curl
$ curl 'http://localhost:8080/api/messages/out' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::innsynskrav",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "d54334c4-abf8-4f0a-ae61-6ad576c1b997",
      "type" : "innsynskrav"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "ca580042-4475-4fbd-84f8-cca80329d826",
        "identifier" : "urn:no:difi:profile:einnsyn:innsynskrav:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "innsynskrav" : {
    "orgnr" : "98765432",
    "epost" : "doofenshmirtz@evil.inc"
  }
}'
Request
POST /api/messages/out HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 1060
Host: localhost:8080

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::innsynskrav",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "d54334c4-abf8-4f0a-ae61-6ad576c1b997",
      "type" : "innsynskrav"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "ca580042-4475-4fbd-84f8-cca80329d826",
        "identifier" : "urn:no:difi:profile:einnsyn:innsynskrav:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "innsynskrav" : {
    "orgnr" : "98765432",
    "epost" : "doofenshmirtz@evil.inc"
  }
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1120

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::innsynskrav",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "d54334c4-abf8-4f0a-ae61-6ad576c1b997",
      "type" : "innsynskrav",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "ca580042-4475-4fbd-84f8-cca80329d826",
        "identifier" : "urn:no:difi:profile:einnsyn:innsynskrav:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "innsynskrav" : {
    "orgnr" : "98765432",
    "epost" : "doofenshmirtz@evil.inc"
  }
}
Request fields
Path Type Description Constraints

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

Must not be null

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

Size must be between 0 and 1 inclusive

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

Must not be empty. Size must be between 1 and 1 inclusive

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

Must not be null

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

Must not be null

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

Must not be null

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

Must not be null

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

Must be a UUID.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

Must be a NextMove message type. Must not be null

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

Must be in the past

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

Must not be null. Size must be between 1 and 2147483647 inclusive

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

Allowed values are: ConversationId, SenderRef, ReceiverRef. Must not be null

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

Must be in the future

innsynskrav.orgnr

Varies

Business registration number for the organization that you want to gain insight to.

Must not be null

innsynskrav.epost

Varies

E-mail of the recipient of the inquiry.

Must not be null

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

innsynskrav.orgnr

Varies

Business registration number for the organization that you want to gain insight to.

innsynskrav.epost

Varies

E-mail of the recipient of the inquiry.

Example 6 - Creating a DPE publisering message

Available processes

urn:no:difi:profile:einnsyn:journalpost:ver1.0

urn:no:difi:profile:einnsyn:meeting:ver1.0

Curl
$ curl 'http://localhost:8080/api/messages/out' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::publisering",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "04f00fe6-eded-4fe8-8649-607650466a39",
      "type" : "publisering"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "e615f7ba-3089-46cb-9263-6c34f3b6769e",
        "identifier" : "urn:no:difi:profile:einnsyn:journalpost:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "publisering" : {
    "orgnr" : "98765432"
  }
}'
Request
POST /api/messages/out HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 1019
Host: localhost:8080

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::publisering",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "04f00fe6-eded-4fe8-8649-607650466a39",
      "type" : "publisering"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "e615f7ba-3089-46cb-9263-6c34f3b6769e",
        "identifier" : "urn:no:difi:profile:einnsyn:journalpost:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "publisering" : {
    "orgnr" : "98765432"
  }
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1079

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:einnsyn:xsd::publisering",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "04f00fe6-eded-4fe8-8649-607650466a39",
      "type" : "publisering",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "e615f7ba-3089-46cb-9263-6c34f3b6769e",
        "identifier" : "urn:no:difi:profile:einnsyn:journalpost:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "publisering" : {
    "orgnr" : "98765432"
  }
}
Request fields
Path Type Description Constraints

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

Must not be null

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

Size must be between 0 and 1 inclusive

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

Must not be empty. Size must be between 1 and 1 inclusive

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

Must not be null

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

Must not be null

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

Must not be null

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

Must not be null

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

Must be a UUID.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

Must be a NextMove message type. Must not be null

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

Must be in the past

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

Must not be null. Size must be between 1 and 2147483647 inclusive

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

Allowed values are: ConversationId, SenderRef, ReceiverRef. Must not be null

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

Must be in the future

publisering.orgnr

Varies

Business registration number.

Must not be null

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

publisering.orgnr

Varies

Business registration number.

Example 7 - Validation error

Response
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 259

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 400,
  "error" : "Bad Request",
  "exception" : "no.difi.meldingsutveksling.exceptions.ServiceNotEnabledException",
  "message" : "Service DPI is not enabled",
  "path" : "/api/messages/out"
}
Response fields
Path Type Description

timestamp

String

Date and time for when the error occured.

status

Number

HTTP status code.

error

String

Error description

exception

String

The java class of the Exception that was thrown

message

String

A message describing the error.

path

String

The request URI

description

String

A more detailed description of the error.

Example 8 - Constraint violation

Response
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 676

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 400,
  "error" : "Bad Request",
  "exception" : "javax.validation.ConstraintViolationException",
  "message" : "standardBusinessDocumentHeader.documentIdentification.type: Must be a NextMove message type",
  "path" : "/api/messages/out",
  "errors" : [ {
    "codes" : [ "MessageType" ],
    "defaultMessage" : "Must be a NextMove message type",
    "objectName" : "standardBusinessDocumentHeader.documentIdentification.type",
    "field" : "standardBusinessDocumentHeader.documentIdentification.type",
    "rejectedValue" : "strange",
    "bindingFailure" : false,
    "code" : "MessageType"
  } ]
}
Response fields
Path Type Description

timestamp

String

Date and time for when the error occured.

status

Number

HTTP status code.

error

String

Error description

exception

String

The java class of the Exception that was thrown

message

String

A message describing the error.

path

String

The request URI

description

String

A more detailed description of the error.

errors

Array

Constraint validations details.

errors[].codes[]

Array

The message codes to be used to resolve this message.

errors[].defaultMessage

String

The default message to be used to resolve this message.

errors[].objectName

String

The name/path of the object where the constraint validation occurred.

errors[].field

String

The name/path of the field where the constraint validation occurred.

errors[].rejectedValue

String

The rejected field value.

errors[].bindingFailure

Boolean

Whether this error represents a binding failure (like a type mismatch); otherwise it is a validation failure.

errors[].code

String

The message code to be used to resolve this message.

Upload attachment

The service is used to upload an attachment to a given message.

Curl
$ curl 'http://localhost:8080/api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3' -i -X PUT \
    -H 'Content-Type: text/plain;charset=UTF-8' \
    -H 'Content-Disposition: attachment; name=Before The Law; filename=before_the_law.txt' \
    -H 'Accept: application/json' \
    -d 'Before the law sits a gatekeeper. To this gatekeeper comes a man from the country who asks to gain entry into the law...'
Request
PUT /api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Content-Disposition: attachment; name=Before The Law; filename=before_the_law.txt
Accept: application/json
Content-Length: 120
Host: localhost:8080

Before the law sits a gatekeeper. To this gatekeeper comes a man from the country who asks to gain entry into the law...
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

About the service

Request headers
Name Description

Content-Type

Content type of the attachment.

Content-Disposition

The title of the document. The title can alternatively be specified using the name attribute of the Content-Disposition header. The filename is specified in the filename attribute of this header.

Request parameters
Parameter Description

messageId

The messageId

title

The attachment title can alternatively be specified in this request parameter. If not specified here, then the title is extracted from the Content-Disposition HTTP header.

Send message

The service is used to send a given message.

Curl
$ curl 'http://localhost:8080/api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3' -i -X POST \
    -H 'Accept: application/json'
Request
POST /api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

About the service

Request headers
Name Description
Request parameters
Parameter Description

messageId

The messageId

Send multipart message

The service is used to create and send messages using multipart upload.

Please note, that multipart is only allowed for smaller messages up to 5 MB. For larger messages, please use the following combination: Create message, Upload attachment and Send message instead. Upload attachment can be used several times if you have more than one attachment.

Example 1 - Send a multipart arkivmelding

Curl
$ curl 'http://localhost:8080/api/messages/out/multipart' -i -X POST \
    -H 'Content-Type: multipart/form-data;charset=UTF-8' \
    -H 'Accept: application/json' \
    -F 'sbd={
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
};type=application/json' \
    -F 'Before The Law=@before_the_law.txt;type=text/plain'
Request
POST /api/messages/out/multipart HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=sbd
Content-Type: application/json

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=Before The Law; filename=before_the_law.txt
Content-Type: text/plain

Before the law sits a gatekeeper. To this gatekeeper comes a man from the country who asks to gain entry into the law...
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1116

{
  "standardBusinessDocumentHeader" : {
    "headerVersion" : "1.0",
    "sender" : [ {
      "identifier" : {
        "value" : "0192:910077473",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "receiver" : [ {
      "identifier" : {
        "value" : "0192:910075918",
        "authority" : "iso6523-actorid-upis"
      }
    } ],
    "documentIdentification" : {
      "standard" : "urn:no:difi:arkivmelding:xsd::arkivmelding",
      "typeVersion" : "1.0",
      "instanceIdentifier" : "e99e5cd1-74de-4cce-b902-cecdf97dc4f3",
      "type" : "arkivmelding",
      "creationDateAndTime" : "2019-03-25T11:38:23+02:00"
    },
    "businessScope" : {
      "scope" : [ {
        "type" : "ConversationId",
        "instanceIdentifier" : "b4567a25-672c-4c2e-9a0f-08c52c54254b",
        "identifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
        "scopeInformation" : [ {
          "expectedResponseDateTime" : "2019-04-25T11:38:23+02:00"
        } ]
      } ]
    }
  },
  "arkivmelding" : {
    "hoveddokument" : "before_the_law.txt"
  }
}

About the service

Request parts
Part Description

sbd

The Standard Business Document.

Before The Law

There can be zero or more attachments. The name of the part will be used as a title for the attachment. The originalFilename will be used as the name of the file in the ASiC. Please note that the Content-Type of the part must be set to the MIME-type of the attachment.

Response fields
Path Type Description

standardBusinessDocumentHeader.headerVersion

String

Header version. Expected value is 1.0

standardBusinessDocumentHeader.sender

Array

Logical party representing the organization that has created the standard business document.

standardBusinessDocumentHeader.receiver

Array

Logical party representing the organization that receives the SBD.

standardBusinessDocumentHeader.documentIdentification

Object

Characteristics containing identification about the document.

standardBusinessDocumentHeader.businessScope

Object

The business scope contains 1 to many [1..*] scopes. It is not mandatory to put all intermediary scopes in an SBDH. Only those scopes that the parties agree to are valid. The following examples are all valid: transaction; business process; collaboration. A Profile may be used to group well-formedness rules together. The business scope block consists of the Scope block.

standardBusinessDocumentHeader.sender[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.sender[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the sending party.

standardBusinessDocumentHeader.receiver[].identifier.value

String

Descriptor with information to identify this party. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

standardBusinessDocumentHeader.receiver[].identifier.authority

String

Descriptor that qualifies the identifier used to identify the receiving party.

standardBusinessDocumentHeader.documentIdentification.standard

String

The originator of the type of the Business Data standard, e.g. SWIFT, OAG, EAN.UCC, EDIFACT, X12; references which Data Dictionary is being used. Used for the task of verifying that the grammar of a message is valid

standardBusinessDocumentHeader.documentIdentification.typeVersion

String

Descriptor which contains versioning information or number of the standard that defines the document which is specified in the ’Type’ data element, e.g. values could be ‘1.3’ or ‘D.96A’, etc. . This is the version of the document itself and is different than the HeaderVersion.

standardBusinessDocumentHeader.documentIdentification.instanceIdentifier

String

Descriptor which contains reference information which uniquely identifies this instance of the SBD between the sender and the receiver. This identifier identifies this document as distinct from others. There is only one SBD instance per Standard Header. The Instance Identifier is automatically generated as an UUID if not specified.

standardBusinessDocumentHeader.documentIdentification.type

String

A logical indicator representing the type of Business Data being sent or the named type of business data. This attribute identifies the type of document and not the instance of that document. The instance document or interchange can contain one or more business documents of a single document type or closely related types. The industry standard body (as referenced in the ‘Standard’ element) is responsible for defining the Type value to be used in this field. Currently NextMove supports the following types: status, feil, arkivmelding, arkivmelding_kvittering, avtalt, fiksio, digital, digital_dpv, print, innsynskrav, publisering, einnsyn_kvittering

standardBusinessDocumentHeader.documentIdentification.creationDateAndTime

String

Descriptor which contains date and time of SBDH/document creation. In the SBDH the parser translator or service component assigns the SBD a Date and Time stamp. The creation date and time expressed here most likely will be different from the date and time stamped in the transport envelope.

standardBusinessDocumentHeader.businessScope.scope

Array

Indicates the type of scope, the identifiers for the scope, other supporting information and the scope content itself. The importance of the Scope is that it allows the SBDH to operate under auspices of an agreement; that parties agree that they only include reference agreements

standardBusinessDocumentHeader.businessScope.scope[].type

String

Indicates the kind of scope; an attribute describing the Scope. Example entries include: ConversationId, SenderRef, ReceiverRef

standardBusinessDocumentHeader.businessScope.scope[].instanceIdentifier

String

A unique identifier that references the instance of the scope (e.g. process execution instance, document instance). For example, the Instance Identifier could be used to identify the specific instance of a Business Process. This identifier would be used to correlate all the way back to the business domain layer; it can be thought of as a session descriptor at the business domain application level.

standardBusinessDocumentHeader.businessScope.scope[].identifier

String

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation

Array

An optional unique descriptor that identifies the "contract" or "agreement" that this instance relates to. It operates at the level of business domain, not at the transport or messaging level, by providing the information necessary and sufficient to configure the service at the other partner’s end.

standardBusinessDocumentHeader.businessScope.scope[].scopeInformation[].expectedResponseDateTime

String

Date and time when response is expected. This element could be populated in an initial message of a correlation sequence, and should be echoed back in a subsequent response.

arkivmelding.hoveddokument

Varies

Name of the attachment that is the main document. Especially when there are more than one attachment, there is a need to know which document is the main one. Should only be specified for DPF.

Delete message

The service is used to delete a message on the outgoing queue by messageId.

Curl
$ curl 'http://localhost:8080/api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3' -i -X DELETE \
    -H 'Accept: application/json'
Request
DELETE /api/messages/out/e99e5cd1-74de-4cce-b902-cecdf97dc4f3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

About the service

Request parameters
Parameter Description

messageId

The messageId

Conversations

Find conversations

The service is used to search for conversations. The response is paged with a default page size of 10.

Example 1 - Get all conversations

Curl
$ curl 'http://localhost:8080/api/conversations' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/conversations HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2181

{
  "content" : [ {
    "id" : 49,
    "conversationId" : "46235f4e-1a5e-40ee-a577-47c3a778729c",
    "messageId" : "bc718283-d88e-4688-a1ec-7339811d9e8f",
    "senderIdentifier" : "0192:910077473",
    "receiverIdentifier" : "0192:910075918",
    "processIdentifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
    "messageReference" : "system-12463",
    "messageTitle" : "A message title",
    "serviceCode" : "4255",
    "serviceEditionCode" : "10",
    "lastUpdate" : "2019-03-25T12:38:23+01:00",
    "finished" : false,
    "expiry" : "2019-04-25T12:38:23+01:00",
    "direction" : "INCOMING",
    "serviceIdentifier" : "DPO",
    "messageStatuses" : [ {
      "id" : 76,
      "lastUpdate" : "2019-11-05T12:04:34+02:00",
      "status" : "INNKOMMENDE_MOTTATT",
      "description" : "INNKOMMENDE_MOTTATT"
    } ]
  }, {
    "id" : 56,
    "conversationId" : "f1b791c7-ae5d-4e8a-a5b2-9d947a99d129",
    "messageId" : "6194d724-a07a-4687-9343-111eb4c5df55",
    "senderIdentifier" : "0192:910077473",
    "receiverIdentifier" : "01017012345",
    "processIdentifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
    "messageReference" : "system-98765",
    "messageTitle" : "A message title",
    "serviceCode" : "4255",
    "serviceEditionCode" : "10",
    "lastUpdate" : "2019-03-25T12:38:23+01:00",
    "finished" : false,
    "expiry" : "2019-04-25T12:38:23+01:00",
    "direction" : "INCOMING",
    "serviceIdentifier" : "DPI",
    "messageStatuses" : [ {
      "id" : 76,
      "lastUpdate" : "2019-11-05T12:04:34+02:00",
      "status" : "INNKOMMENDE_MOTTATT",
      "description" : "INNKOMMENDE_MOTTATT"
    } ]
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 2 - Search for conversations

Curl
$ curl 'http://localhost:8080/api/conversations?serviceIdentifier=DPO' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/conversations?serviceIdentifier=DPO HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1350

{
  "content" : [ {
    "id" : 49,
    "conversationId" : "7cbd95ca-47bf-49f1-ada1-1ca1c56fc741",
    "messageId" : "3ecddf8d-f783-4f0c-bc29-820cbe178f6a",
    "senderIdentifier" : "0192:910077473",
    "receiverIdentifier" : "0192:910075918",
    "processIdentifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
    "messageReference" : "system-12463",
    "messageTitle" : "A message title",
    "serviceCode" : "4255",
    "serviceEditionCode" : "10",
    "lastUpdate" : "2019-03-25T12:38:23+01:00",
    "finished" : false,
    "expiry" : "2019-04-25T12:38:23+01:00",
    "direction" : "INCOMING",
    "serviceIdentifier" : "DPO",
    "messageStatuses" : [ {
      "id" : 76,
      "lastUpdate" : "2019-11-05T12:04:34+02:00",
      "status" : "INNKOMMENDE_MOTTATT",
      "description" : "INNKOMMENDE_MOTTATT"
    } ]
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 1,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 3 - Sorting

Curl
$ curl 'http://localhost:8080/api/conversations?sort=lastUpdated%2Casc' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/conversations?sort=lastUpdated%2Casc HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1350

{
  "content" : [ {
    "id" : 49,
    "conversationId" : "ab890178-1912-4465-83bf-7f04b54f5198",
    "messageId" : "b9b714d6-779c-46dd-abc7-b1ba42e2abcf",
    "senderIdentifier" : "0192:910077473",
    "receiverIdentifier" : "0192:910075918",
    "processIdentifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
    "messageReference" : "system-12463",
    "messageTitle" : "A message title",
    "serviceCode" : "4255",
    "serviceEditionCode" : "10",
    "lastUpdate" : "2019-03-25T12:38:23+01:00",
    "finished" : false,
    "expiry" : "2019-04-25T12:38:23+01:00",
    "direction" : "INCOMING",
    "serviceIdentifier" : "DPO",
    "messageStatuses" : [ {
      "id" : 76,
      "lastUpdate" : "2019-11-05T12:04:34+02:00",
      "status" : "INNKOMMENDE_MOTTATT",
      "description" : "INNKOMMENDE_MOTTATT"
    } ]
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 1,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 4 - Paging

Curl
$ curl 'http://localhost:8080/api/conversations?page=3&size=10' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/conversations?page=3&size=10 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1336

{
  "content" : [ {
    "id" : 56,
    "conversationId" : "51311cbe-f069-4886-8cf7-a6e7c20b949f",
    "messageId" : "c8459a17-09c6-4563-afbc-11289d9408bf",
    "senderIdentifier" : "0192:910077473",
    "receiverIdentifier" : "01017012345",
    "processIdentifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
    "messageReference" : "system-98765",
    "messageTitle" : "A message title",
    "serviceCode" : "4255",
    "serviceEditionCode" : "10",
    "lastUpdate" : "2019-03-25T12:38:23+01:00",
    "finished" : false,
    "expiry" : "2019-04-25T12:38:23+01:00",
    "direction" : "INCOMING",
    "serviceIdentifier" : "DPI",
    "messageStatuses" : [ {
      "id" : 76,
      "lastUpdate" : "2019-11-05T12:04:34+02:00",
      "status" : "INNKOMMENDE_MOTTATT",
      "description" : "INNKOMMENDE_MOTTATT"
    } ]
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 3,
    "pageSize" : 10,
    "offset" : 30,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 31,
  "last" : true,
  "totalPages" : 4,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 1,
  "first" : false,
  "size" : 10,
  "number" : 3,
  "empty" : false
}

About the service

Request parameters
Parameter Description

messageId

Filter on messageId

conversationId

Filter on conversationId

receiver

Filter on receiver (as ISO-6523)

receiverIdentifier

Filter on receiverIdentifier

sender

Filter on sender (as ISO-6523)

senderIdentifier

Filter on senderIdentifier

messageReference

Filter on messageReference

messageTitle

Filter on message title

pollable

Filter on pollable (true/false)

finished

Filter on finished (true/false)

direction

Filter on direction. Can be one of: OUTGOING, INCOMING

page

Page you want to retrieve. First page is page 0

size

Size of the page you want to retrieve.

sort

Properties that should be sorted by in the format property,property(,ASC|DESC). Default sort direction is ascending. Use multiple sort parameters if you want to switch directions, e.g. ?sort=firstname&sort=lastname,asc.

Response fields
Path Type Description

content[].id

Number

Integer. The numeric message status ID.

content[].messageId

String

The messageId. Typically an UUID.

content[].conversationId

String

The conversationId. Typically an UUID.

content[].senderIdentifier

String

Descriptor with information to identify the sender. Requires a 0192: prefix for all norwegian organizations.

content[].receiverIdentifier

String

Descriptor with information to identify the receiver. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

content[].processIdentifier

String

The process identifier used by the message.

content[].messageReference

String

The message reference

content[].messageTitle

String

The message title

content[].serviceCode

String

Altinn service code

content[].serviceEditionCode

String

Altinn service edition code.

content[].lastUpdate

String

Date and time of status.

content[].finished

Boolean

If the conversation has a finished state or not.

content[].expiry

String

Expiry timestamp

content[].direction

String

The direction. Can be one of: OUTGOING, INCOMING

content[].serviceIdentifier

String

The service identifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

content[].messageStatuses

Array

An array of message statuses.

content[].messageStatuses[].id

Number

Integer. The numeric message status ID.

content[].messageStatuses[].status

String

The message status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT. More details can be found here.

content[].messageStatuses[].description

String

Description.

content[].messageStatuses[].lastUpdate

String

Date and time of status.

last

Boolean

A boolean value indicating if this is the last page or not.

totalElements

Number

The total number of elements

totalPages

Number

The total number of pages

size

Number

The page size

number

Number

The page number

first

Boolean

A boolean value indicating if this is the first page or not.

numberOfElements

Number

Number of elements returned in the page.

empty

Boolean

True if the page is empty. False if not.

sort.sorted

Boolean

True if the result set is sorted. False otherwise.

sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

sort.empty

Boolean

True if no sorting. False otherwise

pageable.offset

Number

The offset to be taken according to the underlying page and page size.

pageable.pageSize

Number

The requested page size

pageable.pageNumber

Number

The requested page number

pageable.sort.sorted

Boolean

True if the result set is sorted. False otherwise.

pageable.sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

pageable.sort.empty

Boolean

True if no sorting. False otherwise

Get conversation by id

The service is used to search for conversations by id. The response is paged with a default page size of 10

Example 1 - Get conversation

Curl
$ curl 'http://localhost:8080/api/conversations/49' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/conversations/49 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 802

{
  "id" : 49,
  "conversationId" : "942f9899-18b2-46f9-ac86-b0053f234c38",
  "messageId" : "75d64e2b-14ca-4aac-82d7-c9a46e885ff4",
  "senderIdentifier" : "0192:910077473",
  "receiverIdentifier" : "0192:910075918",
  "processIdentifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
  "messageReference" : "system-12463",
  "messageTitle" : "A message title",
  "serviceCode" : "4255",
  "serviceEditionCode" : "10",
  "lastUpdate" : "2019-03-25T12:38:23+01:00",
  "finished" : false,
  "expiry" : "2019-04-25T12:38:23+01:00",
  "direction" : "INCOMING",
  "serviceIdentifier" : "DPO",
  "messageStatuses" : [ {
    "id" : 76,
    "lastUpdate" : "2019-11-05T12:04:34+02:00",
    "status" : "INNKOMMENDE_MOTTATT",
    "description" : "INNKOMMENDE_MOTTATT"
  } ]
}

Example 2 - Conversation not found

Response
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 277

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 404,
  "error" : "Not Found",
  "exception" : "no.difi.meldingsutveksling.exceptions.ConversationNotFoundException",
  "message" : "Conversation with id = 49 was not found",
  "path" : "/api/conversations/49"
}
Response fields
Path Type Description

timestamp

String

Date and time for when the error occured.

status

Number

HTTP status code.

error

String

Error description

exception

String

The java class of the Exception that was thrown

message

String

A message describing the error.

path

String

The request URI

description

String

A more detailed description of the error.

About the service

Path parameters
Table 3. /api/conversations/{id}
Parameter Description

id

The numeric id of the conversation to be retrieved.

Response fields
Path Type Description

id

Number

Integer. The numeric message status ID.

messageId

String

The messageId. Typically an UUID.

conversationId

String

The conversationId. Typically an UUID.

senderIdentifier

String

Descriptor with information to identify the sender. Requires a 0192: prefix for all norwegian organizations.

receiverIdentifier

String

Descriptor with information to identify the receiver. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

processIdentifier

String

The process identifier used by the message.

messageReference

String

The message reference

messageTitle

String

The message title

serviceCode

String

Altinn service code

serviceEditionCode

String

Altinn service edition code.

lastUpdate

String

Date and time of status.

finished

Boolean

If the conversation has a finished state or not.

expiry

String

Expiry timestamp

direction

String

The direction. Can be one of: OUTGOING, INCOMING

serviceIdentifier

String

The service identifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

messageStatuses

Array

An array of message statuses.

messageStatuses[].id

Number

Integer. The numeric message status ID.

messageStatuses[].status

String

The message status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT. More details can be found here.

messageStatuses[].description

String

Description.

messageStatuses[].lastUpdate

String

Date and time of status.

Get conversation by messageId

The service is used to search for conversations by messageId. The response is paged with a default page size of 10

Example 1 - Get conversation by messageId

Curl
$ curl 'http://localhost:8080/api/conversations/messageId/ecfd35a3-3006-4757-b521-8524c56d0702' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/conversations/messageId/ecfd35a3-3006-4757-b521-8524c56d0702 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 802

{
  "id" : 49,
  "conversationId" : "ea1d7c23-7df9-4ae7-81c5-5c9f73c316b9",
  "messageId" : "ecfd35a3-3006-4757-b521-8524c56d0702",
  "senderIdentifier" : "0192:910077473",
  "receiverIdentifier" : "0192:910075918",
  "processIdentifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
  "messageReference" : "system-12463",
  "messageTitle" : "A message title",
  "serviceCode" : "4255",
  "serviceEditionCode" : "10",
  "lastUpdate" : "2019-03-25T12:38:23+01:00",
  "finished" : false,
  "expiry" : "2019-04-25T12:38:23+01:00",
  "direction" : "INCOMING",
  "serviceIdentifier" : "DPO",
  "messageStatuses" : [ {
    "id" : 76,
    "lastUpdate" : "2019-11-05T12:04:34+02:00",
    "status" : "INNKOMMENDE_MOTTATT",
    "description" : "INNKOMMENDE_MOTTATT"
  } ]
}

Example 2 - Conversation not found

Response
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 362

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 404,
  "error" : "Not Found",
  "exception" : "no.difi.meldingsutveksling.exceptions.ConversationNotFoundException",
  "message" : "Conversation with messageId = df64afa1-83f4-497c-ae94-db22108801b9 was not found",
  "path" : "/api/conversations/messageId/df64afa1-83f4-497c-ae94-db22108801b9"
}
Response fields
Path Type Description

timestamp

String

Date and time for when the error occured.

status

Number

HTTP status code.

error

String

Error description

exception

String

The java class of the Exception that was thrown

message

String

A message describing the error.

path

String

The request URI

description

String

A more detailed description of the error.

About the service

Path parameters
Table 4. /api/conversations/messageId/{messageId}
Parameter Description

messageId

The messageId. Typically an UUID.

Response fields
Path Type Description

id

Number

Integer. The numeric message status ID.

messageId

String

The messageId. Typically an UUID.

conversationId

String

The conversationId. Typically an UUID.

senderIdentifier

String

Descriptor with information to identify the sender. Requires a 0192: prefix for all norwegian organizations.

receiverIdentifier

String

Descriptor with information to identify the receiver. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

processIdentifier

String

The process identifier used by the message.

messageReference

String

The message reference

messageTitle

String

The message title

serviceCode

String

Altinn service code

serviceEditionCode

String

Altinn service edition code.

lastUpdate

String

Date and time of status.

finished

Boolean

If the conversation has a finished state or not.

expiry

String

Expiry timestamp

direction

String

The direction. Can be one of: OUTGOING, INCOMING

serviceIdentifier

String

The service identifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

messageStatuses

Array

An array of message statuses.

messageStatuses[].id

Number

Integer. The numeric message status ID.

messageStatuses[].status

String

The message status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT. More details can be found here.

messageStatuses[].description

String

Description.

messageStatuses[].lastUpdate

String

Date and time of status.

Delete conversation by id

This service is used to delete a conversation based on its database id.

Example: delete conversation by id

Curl
$ curl 'http://localhost:8080/api/conversations/42' -i -X DELETE \
    -H 'Accept: application/json'
Request
DELETE /api/conversations/42 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Delete conversation by messageId

This service is used to delete a conversation based on its messageId.

Example: delete conversation by messageId

Curl
$ curl 'http://localhost:8080/api/conversations/messageId/b0142ac1-547f-4460-a3db-aa657e6f2681' -i -X DELETE \
    -H 'Accept: application/json'
Request
DELETE /api/conversations/messageId/b0142ac1-547f-4460-a3db-aa657e6f2681 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Queued conversations

The service is used to get all conversations with not-finished state. The response is paged with a default page size of 10

Example 1 - Get queued conversations

Curl
$ curl 'http://localhost:8080/api/conversations/queue' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/conversations/queue HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2181

{
  "content" : [ {
    "id" : 49,
    "conversationId" : "3d4d410b-88ea-457d-a176-4d6248b46043",
    "messageId" : "41f387ff-c1e3-4eb4-88dc-a5cf77290950",
    "senderIdentifier" : "0192:910077473",
    "receiverIdentifier" : "0192:910075918",
    "processIdentifier" : "urn:no:difi:profile:arkivmelding:planByggOgGeodata:ver1.0",
    "messageReference" : "system-12463",
    "messageTitle" : "A message title",
    "serviceCode" : "4255",
    "serviceEditionCode" : "10",
    "lastUpdate" : "2019-03-25T12:38:23+01:00",
    "finished" : false,
    "expiry" : "2019-04-25T12:38:23+01:00",
    "direction" : "INCOMING",
    "serviceIdentifier" : "DPO",
    "messageStatuses" : [ {
      "id" : 76,
      "lastUpdate" : "2019-11-05T12:04:34+02:00",
      "status" : "INNKOMMENDE_MOTTATT",
      "description" : "INNKOMMENDE_MOTTATT"
    } ]
  }, {
    "id" : 56,
    "conversationId" : "9557e379-5e72-436b-bdf6-1ddbafbdf717",
    "messageId" : "008f1fe5-c091-405c-a57c-2e7634772eb7",
    "senderIdentifier" : "0192:910077473",
    "receiverIdentifier" : "01017012345",
    "processIdentifier" : "urn:no:difi:profile:digitalpost:info:ver1.0",
    "messageReference" : "system-98765",
    "messageTitle" : "A message title",
    "serviceCode" : "4255",
    "serviceEditionCode" : "10",
    "lastUpdate" : "2019-03-25T12:38:23+01:00",
    "finished" : false,
    "expiry" : "2019-04-25T12:38:23+01:00",
    "direction" : "INCOMING",
    "serviceIdentifier" : "DPI",
    "messageStatuses" : [ {
      "id" : 76,
      "lastUpdate" : "2019-11-05T12:04:34+02:00",
      "status" : "INNKOMMENDE_MOTTATT",
      "description" : "INNKOMMENDE_MOTTATT"
    } ]
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

About the service

Request parameters
Parameter Description

page

Page you want to retrieve. First page is page 0

size

Size of the page you want to retrieve.

sort

Properties that should be sorted by in the format property,property(,ASC|DESC). Default sort direction is ascending. Use multiple sort parameters if you want to switch directions, e.g. ?sort=firstname&sort=lastname,asc.

Response fields
Path Type Description

content[].id

Number

Integer. The numeric message status ID.

content[].messageId

String

The messageId. Typically an UUID.

content[].conversationId

String

The conversationId. Typically an UUID.

content[].senderIdentifier

String

Descriptor with information to identify the sender. Requires a 0192: prefix for all norwegian organizations.

content[].receiverIdentifier

String

Descriptor with information to identify the receiver. Requires a 0192: prefix for all norwegian organizations. Prefix is not required for individuals.

content[].processIdentifier

String

The process identifier used by the message.

content[].messageReference

String

The message reference

content[].messageTitle

String

The message title

content[].serviceCode

String

Altinn service code

content[].serviceEditionCode

String

Altinn service edition code.

content[].lastUpdate

String

Date and time of status.

content[].finished

Boolean

If the conversation has a finished state or not.

content[].expiry

String

Expiry timestamp

content[].direction

String

The direction. Can be one of: OUTGOING, INCOMING

content[].serviceIdentifier

String

The service identifier. Can be one of: DPO, DPV, DPI, DPF, DPFIO, DPE, UNKNOWN

content[].messageStatuses

Array

An array of message statuses.

content[].messageStatuses[].id

Number

Integer. The numeric message status ID.

content[].messageStatuses[].status

String

The message status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT. More details can be found here.

content[].messageStatuses[].description

String

Description.

content[].messageStatuses[].lastUpdate

String

Date and time of status.

last

Boolean

A boolean value indicating if this is the last page or not.

totalElements

Number

The total number of elements

totalPages

Number

The total number of pages

size

Number

The page size

number

Number

The page number

first

Boolean

A boolean value indicating if this is the first page or not.

numberOfElements

Number

Number of elements returned in the page.

empty

Boolean

True if the page is empty. False if not.

sort.sorted

Boolean

True if the result set is sorted. False otherwise.

sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

sort.empty

Boolean

True if no sorting. False otherwise

pageable.offset

Number

The offset to be taken according to the underlying page and page size.

pageable.pageSize

Number

The requested page size

pageable.pageNumber

Number

The requested page number

pageable.sort.sorted

Boolean

True if the result set is sorted. False otherwise.

pageable.sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

pageable.sort.empty

Boolean

True if no sorting. False otherwise

Message statuses

Find message statuses

The service is used to search for message statuses. The response is paged with a default page size of 10.

Example 1 - Get all message statuses

Curl
$ curl 'http://localhost:8080/api/statuses' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/statuses HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1044

{
  "content" : [ {
    "id" : 1,
    "lastUpdate" : "2019-11-05T12:04:34+02:00",
    "status" : "MOTTATT",
    "description" : "Mottatt",
    "convId" : 2,
    "conversationId" : "cc3740ec-c6c1-474f-a93d-7e73816ca34b",
    "messageId" : "1cc3fb67-b776-4730-b017-1028b86a8b8b"
  }, {
    "id" : 7,
    "lastUpdate" : "2019-10-23T15:43:12+02:00",
    "status" : "LEVERT",
    "description" : "Levert",
    "convId" : 4,
    "conversationId" : "4364a1f2-be6a-46f2-832d-c11d9b52abad",
    "messageId" : "e424303b-9d8d-4392-b02e-14da4d3dad36"
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 2 - Search for message statuses

Curl
$ curl 'http://localhost:8080/api/statuses?messageId=1cc3fb67-b776-4730-b017-1028b86a8b8b&status=MOTTATT' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/statuses?messageId=1cc3fb67-b776-4730-b017-1028b86a8b8b&status=MOTTATT HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 774

{
  "content" : [ {
    "id" : 1,
    "lastUpdate" : "2019-11-05T12:04:34+02:00",
    "status" : "MOTTATT",
    "description" : "Mottatt",
    "convId" : 2,
    "conversationId" : "cc3740ec-c6c1-474f-a93d-7e73816ca34b",
    "messageId" : "1cc3fb67-b776-4730-b017-1028b86a8b8b"
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 1,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 3 - Sorting

Curl
$ curl 'http://localhost:8080/api/statuses?sort=lastUpdated%2Casc' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/statuses?sort=lastUpdated%2Casc HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1044

{
  "content" : [ {
    "id" : 7,
    "lastUpdate" : "2019-10-23T15:43:12+02:00",
    "status" : "LEVERT",
    "description" : "Levert",
    "convId" : 4,
    "conversationId" : "4364a1f2-be6a-46f2-832d-c11d9b52abad",
    "messageId" : "e424303b-9d8d-4392-b02e-14da4d3dad36"
  }, {
    "id" : 1,
    "lastUpdate" : "2019-11-05T12:04:34+02:00",
    "status" : "MOTTATT",
    "description" : "Mottatt",
    "convId" : 2,
    "conversationId" : "cc3740ec-c6c1-474f-a93d-7e73816ca34b",
    "messageId" : "1cc3fb67-b776-4730-b017-1028b86a8b8b"
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 4 - Paging

Curl
$ curl 'http://localhost:8080/api/statuses?page=3&size=10' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/statuses?page=3&size=10 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 775

{
  "content" : [ {
    "id" : 7,
    "lastUpdate" : "2019-10-23T15:43:12+02:00",
    "status" : "LEVERT",
    "description" : "Levert",
    "convId" : 4,
    "conversationId" : "4364a1f2-be6a-46f2-832d-c11d9b52abad",
    "messageId" : "e424303b-9d8d-4392-b02e-14da4d3dad36"
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 3,
    "pageSize" : 10,
    "offset" : 30,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 31,
  "last" : true,
  "totalPages" : 4,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 1,
  "first" : false,
  "size" : 10,
  "number" : 3,
  "empty" : false
}

Example 5 - Time range

Curl
$ curl 'http://localhost:8080/api/statuses?fromDateTime=2019-10-16T10:01:52.625-02:00&toDateTime=2019-10-30T16:46:49.610-02:00' -i -X GET \
    -H 'Accept: application/json'
Request
GET api/statuses?fromDateTime=2019-10-16T10:01:52.625-02:00&toDateTime=2019-10-30T16:46:49.610-02:00 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
    Vary: Origin
    Vary: Access-Control-Request-Method
    Vary: Access-Control-Request-Headers
    Content-Type: application/json
    X-Content-Type-Options: nosniff
    X-XSS-Protection: 1; mode=block
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Pragma: no-cache
    Expires: 0
    X-Frame-Options: DENY
    Content-Length: 775
    
    {
      "content" : [ {
        "id" : 7,
        "lastUpdate" : "2019-10-23T15:43:12+02:00",
        "status" : "LEVERT",
        "description" : "Levert",
        "convId" : 4,
        "conversationId" : "4364a1f2-be6a-46f2-832d-c11d9b52abad",
        "messageId" : "e424303b-9d8d-4392-b02e-14da4d3dad36"
      } ],
      "pageable" : {
        "sort" : {
          "sorted" : true,
          "unsorted" : false,
          "empty" : false
        },
        "pageNumber" : 3,
        "pageSize" : 10,
        "offset" : 30,
        "paged" : true,
        "unpaged" : false
      },
      "totalElements" : 31,
      "last" : true,
      "totalPages" : 4,
      "sort" : {
        "sorted" : true,
        "unsorted" : false,
        "empty" : false
      },
      "numberOfElements" : 1,
      "first" : false,
      "size" : 10,
      "number" : 3,
      "empty" : false
    }

About the service

Request parameters
Parameter Description

id

Filter on the numeric message status ID

messageId

Filter on messageId

conversationId

Filter on conversationId

status

Filter on status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT

page

Page you want to retrieve. First page is page 0

size

Size of the page you want to retrieve.

sort

Properties that should be sorted by in the format property,property(,ASC|DESC). Default sort direction is ascending. Use multiple sort parameters if you want to switch directions, e.g. ?sort=firstname&sort=lastname,asc.

fromDateTime and toDateTime

Filter on lastUpdate in the range of fromDateTime to toDateTime. Both fromDateTime and toDateTime must be used to filter on date and time.

Response fields
Path Type Description

content[].id

Number

Integer. The numeric message status ID.

content[].convId

Number

Integer. The numeric conversation ID.

content[].messageId

String

The messageId. Typically an UUID.

content[].conversationId

String

The conversationId. Typically an UUID.

content[].status

String

The message status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT. More details can be found here.

content[].description

String

Description.

content[].lastUpdate

String

Date and time of status.

content[].rawReceipt

String

The raw receipt.

last

Boolean

A boolean value indicating if this is the last page or not.

totalElements

Number

The total number of elements

totalPages

Number

The total number of pages

size

Number

The page size

number

Number

The page number

first

Boolean

A boolean value indicating if this is the first page or not.

numberOfElements

Number

Number of elements returned in the page.

empty

Boolean

True if the page is empty. False if not.

sort.sorted

Boolean

True if the result set is sorted. False otherwise.

sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

sort.empty

Boolean

True if no sorting. False otherwise

pageable.offset

Number

The offset to be taken according to the underlying page and page size.

pageable.pageSize

Number

The requested page size

pageable.pageNumber

Number

The requested page number

pageable.sort.sorted

Boolean

True if the result set is sorted. False otherwise.

pageable.sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

pageable.sort.empty

Boolean

True if no sorting. False otherwise

Find message statuses by messageId

The service is used to search for message statuses by messageId. The response is paged with a default page size of 10

Example 1 - Find all message statuses by messageId

Curl
$ curl 'http://localhost:8080/api/statuses/1cc3fb67-b776-4730-b017-1028b86a8b8b' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/statuses/1cc3fb67-b776-4730-b017-1028b86a8b8b HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 774

{
  "content" : [ {
    "id" : 1,
    "lastUpdate" : "2019-11-05T12:04:34+02:00",
    "status" : "MOTTATT",
    "description" : "Mottatt",
    "convId" : 2,
    "conversationId" : "cc3740ec-c6c1-474f-a93d-7e73816ca34b",
    "messageId" : "1cc3fb67-b776-4730-b017-1028b86a8b8b"
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : true,
      "unsorted" : false,
      "empty" : false
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 1,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : true,
    "unsorted" : false,
    "empty" : false
  },
  "numberOfElements" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

About the service

Path parameters
Table 5. /api/statuses/{messageId}
Parameter Description

messageId

The messageId

page

Page you want to retrieve. First page is page 0

size

Size of the page you want to retrieve.

sort

Properties that should be sorted by in the format property,property(,ASC|DESC). Default sort direction is ascending. Use multiple sort parameters if you want to switch directions, e.g. ?sort=firstname&sort=lastname,asc.

Response fields
Path Type Description

content[].id

Number

Integer. The numeric message status ID.

content[].convId

Number

Integer. The numeric conversation ID.

content[].messageId

String

The messageId. Typically an UUID.

content[].conversationId

String

The conversationId. Typically an UUID.

content[].status

String

The message status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT. More details can be found here.

content[].description

String

Description.

content[].lastUpdate

String

Date and time of status.

content[].rawReceipt

String

The raw receipt.

last

Boolean

A boolean value indicating if this is the last page or not.

totalElements

Number

The total number of elements

totalPages

Number

The total number of pages

size

Number

The page size

number

Number

The page number

first

Boolean

A boolean value indicating if this is the first page or not.

numberOfElements

Number

Number of elements returned in the page.

empty

Boolean

True if the page is empty. False if not.

sort.sorted

Boolean

True if the result set is sorted. False otherwise.

sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

sort.empty

Boolean

True if no sorting. False otherwise

pageable.offset

Number

The offset to be taken according to the underlying page and page size.

pageable.pageSize

Number

The requested page size

pageable.pageNumber

Number

The requested page number

pageable.sort.sorted

Boolean

True if the result set is sorted. False otherwise.

pageable.sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

pageable.sort.empty

Boolean

True if no sorting. False otherwise

Peek the latest message status

The service is used to peek the message status with the latest lastUpdate timestamp.

Example 1 - Successfull peek

Curl
$ curl 'http://localhost:8080/api/statuses/peek' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/statuses/peek HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 254

{
  "id" : 1,
  "lastUpdate" : "2019-11-05T12:04:34+02:00",
  "status" : "MOTTATT",
  "description" : "Mottatt",
  "convId" : 2,
  "conversationId" : "cc3740ec-c6c1-474f-a93d-7e73816ca34b",
  "messageId" : "1cc3fb67-b776-4730-b017-1028b86a8b8b"
}

Example 2 - Unsuccessful peek

Response
HTTP/1.1 204 No Content
Content-Type: application/json
Content-Length: 235

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 204,
  "error" : "No Content",
  "exception" : "no.difi.meldingsutveksling.exceptions.NoContentException",
  "message" : "No content",
  "path" : "/api/statuses/peek"
}
Response fields
Path Type Description

timestamp

String

Date and time for when the error occured.

status

Number

HTTP status code.

error

String

Error description

exception

String

The java class of the Exception that was thrown

message

String

A message describing the error.

path

String

The request URI

description

String

A more detailed description of the error.

About the service

Response fields
Path Type Description

id

Number

Integer. The numeric message status ID.

convId

Number

Integer. The numeric conversation ID.

messageId

String

The messageId. Typically an UUID.

conversationId

String

The conversationId. Typically an UUID.

status

String

The message status. Can be one of: OPPRETTET, SENDT, MOTTATT, LEVERT, LEST, FEIL, ANNET, INNKOMMENDE_MOTTATT, INNKOMMENDE_LEVERT, LEVETID_UTLOPT. More details can be found here.

description

String

Description.

lastUpdate

String

Date and time of status.

rawReceipt

String

The raw receipt.

Error fields
Path Type Description

timestamp

String

Date and time for when the error occured.

status

Number

HTTP status code.

error

String

Error description

exception

String

The java class of the Exception that was thrown

message

String

A message describing the error.

path

String

The request URI

description

String

A more detailed description of the error.

Webhook events

Ping event

Curl
$ curl 'http://your.pushendpoint.com/push' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "createdTs" : "2019-03-25T12:38:23+01:00",
  "event" : "ping"
}'
Request
POST /push HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 70
Host: your.pushendpoint.com

{
  "createdTs" : "2019-03-25T12:38:23+01:00",
  "event" : "ping"
}
Request fields
Path Type Description Constraints

createdTs

String

Timestamp for when the event occurred.

event

String

Type of event.

Message status event

Curl
$ curl 'http://your.pushendpoint.com/push' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "createdTs" : "2019-03-25T12:38:23+01:00",
  "resource" : "messages",
  "event" : "status",
  "messageId" : "bdb5d59e-6819-483e-a2a5-aafa2cfb09e2",
  "conversationId" : "9a62cb73-b122-4ad4-aa8e-b73130aff58b",
  "direction" : "INCOMING",
  "serviceIdentifier" : "DPO",
  "status" : "LEVETID_UTLOPT",
  "description" : "Levetiden for meldingen er utgått. Må sendes på nytt"
}'
Request
POST /push HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 390
Host: your.pushendpoint.com

{
  "createdTs" : "2019-03-25T12:38:23+01:00",
  "resource" : "messages",
  "event" : "status",
  "messageId" : "bdb5d59e-6819-483e-a2a5-aafa2cfb09e2",
  "conversationId" : "9a62cb73-b122-4ad4-aa8e-b73130aff58b",
  "direction" : "INCOMING",
  "serviceIdentifier" : "DPO",
  "status" : "LEVETID_UTLOPT",
  "description" : "Levetiden for meldingen er utgått. Må sendes på nytt"
}
Request fields
Path Type Description Constraints

createdTs

String

Timestamp for when the event occurred.

resource

String

Type of resource. Currently there are only one possible value: messages

event

String

Type of event. Possible values are: ping and status.

messageId

String

The messageId of the message that triggered the event.

conversationId

String

The conversationId of the message that triggered the event.

direction

String

Direction of the message that triggered the event. Possible values are INCOMING and OUTGOING.

serviceIdentifier

String

Service identifier of the message that triggered the event. Possible values

status

String

Status of the message that triggered the event.

description

String

A more detailed description.

Webhook subscriptions

List all subscriptions

The service is used to list all subscriptions. The response is paged with a default page size of 10.

Example 1 - List all subscriptions

Curl
$ curl 'http://localhost:8080/api/subscriptions' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/subscriptions HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 974

{
  "content" : [ {
    "id" : 84,
    "name" : "Incoming messages",
    "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
    "resource" : "messages",
    "event" : "status",
    "filter" : "status=INNKOMMENDE_MOTTAT&direction=INCOMING"
  }, {
    "id" : 32,
    "name" : "Incoming messages",
    "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
    "resource" : "messages",
    "event" : "status",
    "filter" : "status=FEIL,LEVETID_UTLOPT"
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 0,
    "pageSize" : 10,
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 1,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 2,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "empty" : false
}

Example 2 - Paging

Curl
$ curl 'http://localhost:8080/api/subscriptions?page=1&size=1' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/subscriptions?page=1&size=1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 727

{
  "content" : [ {
    "id" : 32,
    "name" : "Incoming messages",
    "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
    "resource" : "messages",
    "event" : "status",
    "filter" : "status=FEIL,LEVETID_UTLOPT"
  } ],
  "pageable" : {
    "sort" : {
      "sorted" : false,
      "unsorted" : true,
      "empty" : true
    },
    "pageNumber" : 1,
    "pageSize" : 1,
    "offset" : 1,
    "paged" : true,
    "unpaged" : false
  },
  "totalElements" : 2,
  "last" : true,
  "totalPages" : 2,
  "sort" : {
    "sorted" : false,
    "unsorted" : true,
    "empty" : true
  },
  "numberOfElements" : 1,
  "first" : false,
  "size" : 1,
  "number" : 1,
  "empty" : false
}

About the service

Request parameters
Parameter Description

page

Page you want to retrieve. First page is page 0

size

Size of the page you want to retrieve.

sort

Properties that should be sorted by in the format property,property(,ASC|DESC). Default sort direction is ascending. Use multiple sort parameters if you want to switch directions, e.g. ?sort=firstname&sort=lastname,asc.

Response fields
Path Type Description

content[].id

Number

The resource identifier.

content[].name

String

A label to remember why it was created. Use it for whatever purpose you’d like.

content[].pushEndpoint

String

URL to push the webhook messages to.

content[].resource

String

Indicates the noun being observed.

content[].event

String

Further narrows the events by specifying the action that would trigger a notification to your backend.

content[].filter

String

A set of filtering criteria. Generally speaking, webhook filters will be a subset of the query parameters available when GETing a list of the target resource. It is an optional property. To add multiple filters, separate them with the “&” symbol. Supported filters are: status, serviceIdentifier, direction.

last

Boolean

A boolean value indicating if this is the last page or not.

totalElements

Number

The total number of elements

totalPages

Number

The total number of pages

size

Number

The page size

number

Number

The page number

first

Boolean

A boolean value indicating if this is the first page or not.

numberOfElements

Number

Number of elements returned in the page.

empty

Boolean

True if the page is empty. False if not.

sort.sorted

Boolean

True if the result set is sorted. False otherwise.

sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

sort.empty

Boolean

True if no sorting. False otherwise

pageable.offset

Number

The offset to be taken according to the underlying page and page size.

pageable.pageSize

Number

The requested page size

pageable.pageNumber

Number

The requested page number

pageable.sort.sorted

Boolean

True if the result set is sorted. False otherwise.

pageable.sort.unsorted

Boolean

True if the result set is unsorted. False otherwise.

pageable.sort.empty

Boolean

True if no sorting. False otherwise

Get a subscription

The service is used to retrieve a subscription.

Example 1 - Get a subscription

Curl
$ curl 'http://localhost:8080/api/subscriptions/84' -i -X GET \
    -H 'Accept: application/json'
Request
GET /api/subscriptions/84 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 230

{
  "id" : 84,
  "name" : "Incoming messages",
  "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
  "resource" : "messages",
  "event" : "status",
  "filter" : "status=INNKOMMENDE_MOTTAT&direction=INCOMING"
}

Example 2 - Subscription not found

Response
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 276

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 404,
  "error" : "Not Found",
  "exception" : "no.difi.meldingsutveksling.exceptions.SubscriptionNotFoundException",
  "message" : "Subscription with id = 84 was not found",
  "path" : "/api/subscription/84"
}

About the service

Path parameters
Table 6. /api/subscriptions/{id}
Parameter Description

id

The id of the subscription to retrieve

Response fields
Path Type Description

id

Number

The resource identifier.

name

String

A label to remember why it was created. Use it for whatever purpose you’d like.

pushEndpoint

String

URL to push the webhook messages to.

resource

String

Indicates the noun being observed.

event

String

Further narrows the events by specifying the action that would trigger a notification to your backend.

filter

String

A set of filtering criteria. Generally speaking, webhook filters will be a subset of the query parameters available when GETing a list of the target resource. It is an optional property. To add multiple filters, separate them with the “&” symbol. Supported filters are: status, serviceIdentifier, direction.

Create a subscription

The service is used to create a webhook a subscription. The webhook is persisted in the database, so it will continue to work after a reboot.

Please note, that we do not guarantee delivery of the webhook events. An event that cannot be delivered, will be retried three times. If all these attempts fail, the event will not be redelivered.
Only use a small number of webhooks. Usually one webhook should be sufficient. Creating a webhook for each message is considered bad practise, and can lead to performance degradation.

Example 1 - Create a subscription

Curl
$ curl 'http://localhost:8080/api/subscriptions' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "name" : "Incoming messages",
  "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
  "resource" : "messages",
  "event" : "status",
  "filter" : "status=INNKOMMENDE_MOTTAT&direction=INCOMING"
}'
Request
POST /api/subscriptions HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 216
Host: localhost:8080

{
  "name" : "Incoming messages",
  "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
  "resource" : "messages",
  "event" : "status",
  "filter" : "status=INNKOMMENDE_MOTTAT&direction=INCOMING"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 230

{
  "id" : 84,
  "name" : "Incoming messages",
  "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
  "resource" : "messages",
  "event" : "status",
  "filter" : "status=INNKOMMENDE_MOTTAT&direction=INCOMING"
}

Please note that during validation of the input, the service will attempt to POST a ping message to the URL specified in the "pushEndpoint" attribute. Below is an example of such a ping message:

Ping event
POST /push HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 70
Host: your.pushendpoint.com

{
  "createdTs" : "2019-03-25T12:38:23+01:00",
  "event" : "ping"
}
Message Status Filters

Currently the following filters are available:

Key Description Example

status

Filter events on message status.

status=FEIL,LEVETID_UTLOPT

serviceIdentifier

Filter events on serviceIdentifier.

serviceIdentifier=DPO,DPF

direction

Filter events on direction.

direction=INCOMING

All these can be combined using standard HTTP query style.

Example
status=FEIL,LEVETID_UTLOPT&direction=INCOMING&serviceIdentifier=DPO,DPI

Example 2 - Constraint violation

Response
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 576

{
  "timestamp" : "2019-03-25T12:38:23+01:00",
  "status" : 400,
  "error" : "Bad Request",
  "exception" : "javax.validation.ConstraintViolationException",
  "message" : "event: 'nonexistent' is not expected. Allowed values are: [all, status]",
  "path" : "/api/subscriptions",
  "errors" : [ {
    "codes" : [ "OneOf" ],
    "defaultMessage" : "'nonexistent' is not expected. Allowed values are: [all, status]",
    "objectName" : "event",
    "field" : "event",
    "rejectedValue" : "nonexistent",
    "bindingFailure" : false,
    "code" : "OneOf"
  } ]
}

About the service

Request fields
Path Type Description Constraints

name

String

A label to remember why it was created. Use it for whatever purpose you’d like.

Must not be null

pushEndpoint

String

URL to push the webhook messages to.

Must be a well-formed URL. Must not be null

resource

String

Indicates the noun being observed.

Allowed values are: all, messages. Must not be null

event

String

Further narrows the events by specifying the action that would trigger a notification to your backend.

Allowed values are: all, status. Must not be null

filter

String

A set of filtering criteria. Generally speaking, webhook filters will be a subset of the query parameters available when GETing a list of the target resource. It is an optional property. To add multiple filters, separate them with the “&” symbol. Supported filters are: status, serviceIdentifier, direction.

Must be a valid filter definition.

Response fields
Path Type Description

id

Number

The resource identifier.

name

String

A label to remember why it was created. Use it for whatever purpose you’d like.

pushEndpoint

String

URL to push the webhook messages to.

resource

String

Indicates the noun being observed.

event

String

Further narrows the events by specifying the action that would trigger a notification to your backend.

filter

String

A set of filtering criteria. Generally speaking, webhook filters will be a subset of the query parameters available when GETing a list of the target resource. It is an optional property. To add multiple filters, separate them with the “&” symbol. Supported filters are: status, serviceIdentifier, direction.

Update a subscription

The service is used to update a webhook a subscription.

Example 1 - Update a subscription

Curl
$ curl 'http://localhost:8080/api/subscriptions/84' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "name" : "Incoming messages",
  "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
  "resource" : "messages",
  "event" : "status",
  "filter" : "status=INNKOMMENDE_MOTTAT&direction=INCOMING"
}'
Request
PUT /api/subscriptions/84 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 216
Host: localhost:8080

{
  "name" : "Incoming messages",
  "pushEndpoint" : "http://my.pushendpoint.no/messages/incoming",
  "resource" : "messages",
  "event" : "status",
  "filter" : "status=INNKOMMENDE_MOTTAT&direction=INCOMING"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

About the service

Request fields
Path Type Description Constraints

name

String

A label to remember why it was created. Use it for whatever purpose you’d like.

pushEndpoint

String

URL to push the webhook messages to.

Must be a well-formed URL

resource

String

Indicates the noun being observed.

Allowed values are: all, messages

event

String

Further narrows the events by specifying the action that would trigger a notification to your backend.

Allowed values are: all, status

filter

String

A set of filtering criteria. Generally speaking, webhook filters will be a subset of the query parameters available when GETing a list of the target resource. It is an optional property. To add multiple filters, separate them with the “&” symbol. Supported filters are: status, serviceIdentifier, direction.

Must be a valid filter definition.

Delete a subscription

The service is used to delete a webhook a subscription.

Example 1 - Delete a subscription

Curl
$ curl 'http://localhost:8080/api/subscriptions/84' -i -X DELETE \
    -H 'Accept: application/json'
Request
DELETE /api/subscriptions/84 HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Delete all subscriptions

The service is used to delete all webhook a subscriptions.

Example 1 - Delete all subscriptions

Curl
$ curl 'http://localhost:8080/api/subscriptions' -i -X DELETE \
    -H 'Accept: application/json'
Request
DELETE /api/subscriptions HTTP/1.1
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY