Fakturafunksjonalitet i Digipost skal bare benyttes når det som sendes er en faktisk faktura som skal betales av mottaker. Andre "faktura-lignende" dokumenter som feks. kopi av AvtaleGiro skal sendes som vanlig brev.
Invoice payment functionality should only be used when the invoice sent is to be actually paid by the recipient. Other documents similar to an invoice such as an AvtaleGiro copy must be sent as a regular document.
For å sende en faktura til betaling sender du et brev som vanlig, men i tillegg definerer du dokumentet som en faktura og inkluderer fire ekstra faktura-elemenenter (kid, amount, account, due-date).
To send an invoice for payment you send as you normally would, but in addition you define a document as an invoice and include four extra invoice elements (kid, amount, account, due-date).
Headere og faktisk dokument innhold er ikke inkludert nedenfor. Bare XML metadata er inkludert. Se send endepunkt for eksempler på headere og multi-part forespørsler.
Headers and actual document content are not included below. Only XML metadata is included. See the send endpoint for examples of headers and multi-part requests.
<?xml version="1.0" encoding="utf-8"?> <message xmlns="http://api.digipost.no/schema/v7" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <recipient> <personal-identification-number>04036125433</personal-identification-number> </recipient> <primary-document xsi:type="invoice"> <uuid>9af46585-9fef-41fb-adf9-da120fc5bb9d</uuid> <subject>simple-invoice</subject> <file-type>pdf</file-type> <authentication-level>PASSWORD</authentication-level> <sensitivity-level>NORMAL</sensitivity-level> <kid>123456787542312300000</kid> <amount>1005</amount> <account>45278968788</account> <due-date>2017-01-01</due-date> </primary-document> </message>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <message-delivery xmlns="http://api.digipost.no/schema/v7"> <delivery-method>DIGIPOST</delivery-method> <sender-id>497013</sender-id> <status>DELIVERED</status> <delivery-time>2016-12-07T08:53:38.893+01:00</delivery-time> <primary-document> <uuid>9af46585-9fef-41fb-adf9-da120fc5bb9d</uuid> <subject>simple-invoice</subject> <file-type>pdf</file-type> <authentication-level>PASSWORD</authentication-level> <sensitivity-level>NORMAL</sensitivity-level> <pre-encrypt>false</pre-encrypt> <content-hash hash-algorithm="SHA256">BMN2VfGSeMT7MPuKsobfX+c3JGXVuubh7upaqMe0/Gg=</content-hash> </primary-document> </message-delivery>