Sist endret: 16. jan. 2025

Get order status

Endpoint for retrieving the processing status of a notification order, along with a summary of all generated notifications.

Endpoint

GET /order/{id}/status

The {id} represents the unique identifier of the notification order for which status are to be retrieved.

Authentication

This API requires authentication, and the request must include one of the following:

  • Maskinporten scope altinn:serviceowner/notifications.create (for external system callers)
  • Platform Access Token (for Altinn Apps and internal Altinn systems)

See Authentication and Authorization for more information.

Response

Response codes

  • 200 OK: The status of the notification order was successfully retrieved.
  • 404 Not Found: No order matching the provided ID was found. Refer to the problem details in the response body for further information.
  • 401 Unauthorized: Indicates a missing, invalid or expired authorization header.
  • 403 Forbidden: Indicates missing or invalid scope or Platform Access Token.

Content-Type

  • application/json

Response body

The response body is formatted as an NotificationOrderWithStatusExt.cs and serialized as a JSON string.

Find a short description of each property below.

id

Type: Globally Unique Identifier (GUID)

The ID of the notification order to which the retrieved status are associated.

sendersReference

Type: string

The sender’s reference provided by the creator in the notification order request.

requestedSendTime

Type: DateTime

The date and time at which the notifications generated by the order are scheduled to be sent to the recipients.

creator

Type: string

The abbreviated name of the entity or person who created the notification order.

created

Type: DateTime

The date and time at which the notification order request was registered.

notificationChannel

Type: enum NotificationChannel

The notification channel used to deliver the notification to recipient. It can be either Email or SMS.

ignoreReservation

Type: boolean

Determines whether an individual’s KRR reservation status should be ignored.

resourceId

Type: string

The unique identifier of the Altinn resource to which the notifications are associated, as it is listed in the Altinn Resource Registry.

processingStatus

Type: StatusExt

A status object describing the processing status of the notification order containing the properties below.

  • status: current processing status.
  • description: an English description of the status and a timestamp.
  • lastUpdate: The date and time at which the status was most recently updated.
StatusDescription
RegisteredThe order has been registered and is pending the requested send time to begin processing.
ProcessingThe order is currently being processed, and notifications are actively being generated.
CompletedThe order processing has been completed, and all notifications have been successfully generated.
CancelledThe order processing was stopped because the order was cancelled.

notificationStatusSummary

Type: NotificationsStatusSummaryExt

An object contains a NotificationStatusExt object for each notification channel used.

The NotificationStatusExt object has the following properties:

  • links: a set of links to access the notifications generated for the given notification channel.
  • generated: the number of generated notifications.
  • succeeded: the number of notifications that have been successfully sent.

Examples

In the example below we have included placeholders for both the Platform Access and Altinn Token. You only need one of them, see the Authentication section for which one applies to your use case.

Request

curl --location 'https://platform.altinn.no/notifications/api/v1/orders/f1a1cc30-197f-4f34-8304-006ce4945fd1/status' \
--header 'Content-Type: application/json'\
--header 'Authorization: Bearer [INSERT ALTINN TOKEN]' \
--header 'PlatformAccessToken: [INSERT PLATFORM ACCESS TOKEN]'

Response

200 OK

Response body contains the notification order with status information.

Example: Email notification order with status information.

{
    "id": "f1a1cc30-197f-4f34-8304-006ce4945fd1",
    "sendersReference": "ref-2023-12-01",
    "requestedSendTime": "2023-12-12T14:13:27.836731Z",
    "creator": "digdir",
    "created": "2023-12-12T14:13:27.845029Z",
    "notificationChannel": "Email",
    "processingStatus": {
        "status": "Completed",
        "description": "Order processing is completed. All notifications have been generated.",
        "lastUpdate": "2023-12-12T14:13:27.845029Z"
    },
    "notificationsStatusSummary": {
        "email": {
            "links": {
                "self": "https://platform.at22.altinn.cloud/notifications/api/v1/orders/f1a1cc30-197f-4f34-8304-006ce4945fd1/notifications/email"
            },
            "generated": 1,
            "succeeded": 0
        }
    }
}

Example: Sms notification order with status information.

{
    "id": "f1a1cc30-197f-4f34-8304-006ce4945fd1",
    "sendersReference": "ref-2023-12-01",
    "requestedSendTime": "2023-12-12T14:13:27.836731Z",
    "creator": "digdir",
    "created": "2023-12-12T14:13:27.845029Z",
    "notificationChannel": "Sms",
    "processingStatus": {
        "status": "Completed",
        "description": "Order processing is completed. All notifications have been generated.",
        "lastUpdate": "2023-12-12T14:13:27.845029Z"
    },
    "notificationsStatusSummary": {
        "sms": {
            "links": {
                "self": "https://platform.at22.altinn.cloud/notifications/api/v1/orders/f1a1cc30-197f-4f34-8304-006ce4945fd1/notifications/sms"
            },
            "generated": 1,
            "succeeded": 0
        }
    }
}

40x responses

Response body contains problem details and status code

Example: 404 response body

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
  "title": "Not Found",
  "status": 404,
  "traceId": "00-5249d76c03c137205ad8976fd9cd2e64-4d97ca7aea3f7489-00"
}