Get order status
Endpoint for retrieving the processing status of an order and a summary of all generated notifications.
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
The short name of the creator of the notification order.
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.
ignoreReservation
Type: boolean
Whether an individuals KRR reservation status should be ignored.
resourceId
Type: string
The ID of the Altinn resource the notifications should be related to as the ID appears 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 when the status was last updated
Status | Description |
---|---|
Registered | Order has been registered and is awaiting requested send time before processing. |
Processing | Order processing is ongoing. Notifications are being generated. |
Completed | Order processing is completed. All notifications have been generated. |
Cancelled | Order processing was stopped due to order being cancelled. |
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
}
}
}
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"
}