Last modified: Feb 6, 2024

Get order status

Endpoint for retrieving the processing status of an order and a summary of all generated notifications.

On this page:

Endpoint

GET /order/{id}/status

{id} represents the id of the notification order to retrieve status for.

Authentication

This API requires authentication and the request must also 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 notification order status was successfully retrieved.
  • 404 Not Found: No order matching the provided id were found. Refer to problem details in response body for further information.
  • 401 Unauthorized: Indicates a missing, invalid or expired authorization header.
  • 403 Forbidden: Indicates that required scope or Platform Access Token is missing or invalid.

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: Guid

The id of the notification order.

sendersReference

Type: string

The senders reference the creator provided in the notification order request.

requestedSendTime

Type: DateTime

The date and time for when the notification generated by the order should be sent.

creator

Type: string

created

Type: DateTime

The date and time for when the notification order request was registered.

notificationChannel

Type: enum NotificationChannel

The notification channel used for the notifications sent can be Email or Sms.

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 when the status was last updated
StatusDescription
RegisteredOrder has been registered and is awaiting requested send time before processing.
ProcessingOrder processing is ongoing. Notifications are being generated.
CompletedOrder processing is completed. All notifications have been generated.

notificationStatusSummary

Type: NotificationsStatusSummaryExt

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

The NotificationStatusExt object contains the properties below.

  • 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

Request

In the example we have included place holders for both the Platform Access and Altinn token.

You only need one of them, reference Authentication for which one applies to your use case.

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

404 Not Found

An empty response is returned with the 404 status code.