Skip to content

Commit

Permalink
Added doc for download attachment (#1920)
Browse files Browse the repository at this point in the history
* Added doc for download attachment

* Lagt til norsk doc

* Rettet i engelsk versjon

---------

Co-authored-by: Martin Todorov <>
  • Loading branch information
mSunberg authored Dec 2, 2024
1 parent dde0097 commit 4a36b15
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Download attachment
linktitle: Download attachment
description: Endpoint for downloading a correspondence attachment.

weight: 60
toc: true
---

## Endpoint

GET /correspondence/api/v1/correspondence/{{correspondenceId}}/attachment/{{attachmentId}}/download

## Description

This endpoint enables the download of a specific attachment associated with a correspondence. Prior to utilizing this endpoint, the correspondence status must be set to "Published". The status of a correspondence can be verified by using the overview or details endpoint, as described [here](https://docs.altinn.studio/api/correspondence/spec/#/Correspondence/get_correspondence_api_v1_correspondence__correspondenceId_).

## Authentication

This API requires authentication, and the request must also include:

- Correspondence read scope __altinn:correspondence.read__ (for external system callers)

See [Authentication and Authorization](/notifications/reference/api/#authentication--authorization) for more information.

## Response

### Response codes
- 200 OK: The attachment has been downloaded succesfully.

Refer to problem details in response body for further information.
- 400 One or more validation errors occurred: Indicates that the correspondenceid or the attachmentid was not found.

### Content-Type

- text

### Response body

The response body consists of the attachment content.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Last ned vedlegg
linktitle: Last ned vedlegg
description: Endepunkt for nedlasting av et meldingsevedlegg.

weight: 60
toc: true
---

## Endepunkt

GET /correspondence/api/v1/correspondence/{{correspondenceId}}/attachment/{{attachmentId}}/download

## Beskrivelse

Dette endepunktet muliggjør nedlasting av et spesifikt vedlegg knyttet til en melding. Før endepunktet kan brukes, må statusen til meldingen være satt til "Publisert". Statusen til en melding kan verifiseres ved å bruke oversikts- eller detaljendepunktet, som beskrevet [her](https://docs.altinn.studio/api/correspondence/spec/#/Correspondence/get_correspondence_api_v1_correspondence__correspondenceId_).

## Autentisering

Dette API-et krever autentisering, og forespørselen må også inkludere:

- Correspondence read scope __altinn:correspondence.read__ (for eksterne kall)

Se [Autentisering og Autorisasjon](/notifications/reference/api/#authentication--authorization) for mer informasjon.

## Respons

### Responskoder

- 200 OK: Vedlegget har blitt lastet ned vellykket.

Se problemdetaljer i responskroppen for mer informasjon.
- 400 One or more validation errors occurred: Indikerer at correspondenceid eller attachmentid ikke ble funnet.

### Innholdstype
- text

### Response body

Respons body består av innholdet i vedlegget.

0 comments on commit 4a36b15

Please sign in to comment.