Initialize
Endpoint for initializing a correspondence.
Endpoint
POST /correspondence/api/v1/correspondence
Description
This endpoint prepares and queues a correspondence for sending. Before using this endpoint, any correlating attachments must be uploaded beforehand to populate the “ExistingAttachments” field. This can be done by using the upload attachment endpoint described here.
Authentication
This API requires authentication, and the request must also include:
- Correspondence write scope altinn:correspondence.write (for external system callers)
See Authentication and Authorization for more information.
Request body
You can see an example of a request body here
Response
Response codes
200 OK: The correspondence has been successfully initialized
Refer to problem details in the response body for further information.
401 Unauthorized: Indicates a missing, invalid, or expired authorization header.
403 Forbidden: Indicates that the required scope or Platform Access Token is missing or invalid.
Content-Type
- application/json
Response body
The response body returns a list of correspondences InitializeCorrespondencesResponseExt, with one correspondence for each recipient. Each correspondence can have multiple different recipients where each recipient will be given a unique correspondenceId, status, etc.
Response body properties
correspondenceId
Type: Guid
The ID of the correspondence that has been initialized
status
Type: string
The different statuses are defined here
Shows the status of the initialized correspondence
recipient
Type: string
Shows the recipient in the format 0192:{{recipientOrgNumber}}
notifications
Type: List of InitializedCorrespondencesNotificationsExt
A list of the generated notifications with send results. Each notification will include the following properties:
- orderId: the ID of the order.
- isReminder: a boolean indicating whether the notification is a reminder or not.
- status: shows the status of the notification.
Status | Description |
---|---|
Success | Means that the notification order was created successfully with contact information. |
MissingContact | Contact information was not found at the time of creating the correspondence. |
Failure | Creating notification order failed. |