Skip to content
This is a new version of the Kivra Developer Docs. Report issues or share feedback at avsandare.support@kivra.se. The previous version can be found here.

Get metadata for a content.

GET
/v1/partner/company/{companyKey}/content/{contentKey}
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_type for each parts of the content, Kivra will return either a key to a binary file to be retrieved or (for text based contents) the body of the content itself.

companyKey
required

Company’s unique key

string

The unique key for the company object being retrieved

contentKey
required

Content’s unique key

string

The unique key for a specific content

Complete metadata for the specific content

Media typeapplication/json
CompanyContent
object
sender

Unique key for the tenant that posted the content

string
sender_name

Name of the tenant that posted the content

string
created_at

Date and time when the content was delivered to the recipient

string
subject

Subject of the content, as set by the sender

string
receiver_name

Name of the company that received the content

string
payment
Payment

NOTE: payment is deprecated and will be removed on 31st May 2024. Use payment_multiple_options instead.

object
payable
required

Toggles whether this content should be payable through Kivra’s payment platform

boolean
status

Toggles whether this content is paid or unpaid: if already paid the user can’t pay it again through Kivra

string
default: unpaid
Allowed values: paid unpaid
currency
required

Currency used in specifying total_owed. In Sweden, only SEK is accepted.

string
Allowed values: SEK
due_date
required

Date when this Invoice is due

string format: ISO8601
total_owed
required

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”

string format: float
type
required

Type of format for the reference

string
Allowed values: SE_OCR TENANT_REF
method
required

1 = BG and 2 = PG

string
Allowed values: 1 2
account
required

Tenant’s account number

string
reference
required

The reference number used for paying. This can be maximum 25 characters long

string
variable_amount

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

boolean
min_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”.

string format: float
parts

Files composing the content

Array<object>
Parts
object
content_type

The IANA media type corresponding to the file, e.g. “application/pdf”

string
checksum

The cheksum of the document calculated with md5

string
sha256

Hash of the document calculated with SHA-256

string
size

Size of the document in bytes

integer
body

Body of the content (present only if content_type is “text/html” or “text/plain”)

string
key

The unique key for the content file (present for all content that is not “text/html” or “text/plain”)

string
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"
}
]
}