Get metadata for a content.
const url = 'https://sender.api.kivra.com/v1/partner/company/example/content/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sender.api.kivra.com/v1/partner/company/example/content/example \ --header 'Authorization: Bearer <token>'This resource allows to get complete metadata information for a particular content.
Note: Depending on the
content_typefor each parts of the content, Kivra will return either akeyto a binary file to be retrieved or (for text based contents) thebodyof the content itself.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Company’s unique key
The unique key for the company object being retrieved
Content’s unique key
The unique key for a specific content
Responses
Section titled “Responses”Complete metadata for the specific content
object
Unique key for the tenant that posted the content
Name of the tenant that posted the content
Date and time when the content was delivered to the recipient
Subject of the content, as set by the sender
Name of the company that received the content
NOTE: payment is deprecated and will be removed on 31st May 2024. Use payment_multiple_options instead.
object
Toggles whether this content should be payable through Kivra’s payment platform
Toggles whether this content is paid or unpaid: if already paid the user can’t pay it again through Kivra
Currency used in specifying total_owed. In Sweden, only SEK is accepted.
Date when this Invoice is due
The total amount owed according to the invoice. If payable equals true this must be a non negative number that’s greater than or equal to “1”
Type of format for the reference
1 = BG and 2 = PG
Tenant’s account number
The reference number used for paying. This can be maximum 25 characters long
Toggles whether the user may choose to pay only a portion of the total_owed amount or whether the user must always pay the complete total_owed amount
The minimum amount that can be paid when variable_amount equals true. Note that this is a soft limit, so whenever variable_amount is true the user will be able to choose freely the amount to be paid, but it may be warned if the amount paid is inferior to min_amount. min_amount must be greater than “0” and less than “total_owed”.
Files composing the content
object
The IANA media type corresponding to the file, e.g. “application/pdf”
The cheksum of the document calculated with md5
Hash of the document calculated with SHA-256
Size of the document in bytes
Body of the content (present only if content_type is “text/html” or “text/plain”)
The unique key for the content file (present for all content that is not “text/html” or “text/plain”)
Example
{ "sender": "1341573157b3a133f220f4217b2e32989d2efa015", "sender_name": "Kivra", "created_at": "2018-06-19T11:54:10Z", "subject": "Invoice 4512 from Local Bank", "receiver_name": "Digital Hero AB", "payment": { "status": "paid", "currency": "SEK", "due_date": "2017-01-01", "total_owed": "123.50", "type": "SE_OCR", "method": "1", "account": "12345", "reference": "426523791", "variable_amount": false, "min_amount": "50.00" }, "parts": [ { "content_type": "application/pdf", "checksum": "9209c7eebdd283a4c4bd7555e73e6064", "sha256": "287f2fe67a8a76a10169aa6a885d21e1f83416c4831294ea5c4b0a38bda5c78d", "size": 163414, "body": "<!doctype html>\n<html class=\"....", "key": "15118724482475bf32615b4a2aaa604fd66377010e" } ]}