For å sende en forsendelse med ett dokument i Digipost oppretter man først en forsendelsesressurs (message). Deretter legger man til dokumentet ved bruk av add content endepunktet. Flyten avsluttes ved å faktisk sende forsendelsen.
To send digital mail with one document you first need to create a message resource. Then you add a document to the message resource you have just created by using the add content endpoint. You then complete the flow by actually sending the digital mail.
Dokumentet i eksempelet ovenfor har fått standardverdier for autentisering og sensitivitet, og i tillegg har forsendelsen fått en status som sier at sørveren venter på innhold, og tre lenker.
Forsendelsen har status NOT_COMPLETE inntil documenter er lastet opp og koblet til den etablerte forsendelsen.
Se xsd-en for attributter som kan settes på dokumentet i forsendelsen.
Lenken med rel «https://api.digipost.no/relations/add_content» brukes for å laste opp innholdet.
The document in the above example includes standard values for both authentication and sensitivity. The message is waiting for the actual content of the document. Three links to further actions are also included in the response.
The messages will have a status of NOT_COMPLETE until one or more documents (the actual content) are sent and part og the established message.
See the xsd for which attributes that can be set on the document as part of the message.
The link with rel «https://api.digipost.no/relations/add_content» can be used to add content to the established message.