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 specific content

GET
/v3/partner/company/{companyKey}/content/{contentKey}
curl --request GET \
--url https://sender.api.kivra.com/v3/partner/company/156077433683911cdca5fd4563bded979572454cb9/content/156077433683911cdca5fd4563bded979572454cb9 \
--header 'Authorization: Bearer <token>'

Content metadata

Get metadata about a specific content in JSON format.

Content file data

A given content can contain multiple files (“parts”). Fetching of such parts is done by passing the part query parameter.

companyKey
required
CompanyKey

The key for a company

string
/^[0-9]{10}[a-f0-9]{32}$/
Example
156077433683911cdca5fd4563bded979572454cb9
contentKey
required
ContentKey

The key for a content

string
/^[0-9]{10}[a-f0-9]{32}$/
Example
156077433683911cdca5fd4563bded979572454cb9
part
PartQueryParameter

The content part to retrive, 1-indexed

integer
>= 1

Content metadata

FullContentMetadata

Details of content metadata

object
interpreted_fields
required
InterpretedFields

Used to indicate which fields, in dot notation, have been interpreted. Now it is always set to the empty array.

Array<string>
parts
required

The files in the content

Array<object>
PartMetadata
object
content_type
required

The MIME type of this content part

string
Allowed values: application/pdf text/html text/plain image/jpeg image/gif image/png text/calendar application/msword application/vnd.openxmlformats-officedocument.wordprocessingml.document application/vnd.openxmlformats-officedocument.wordprocessingml.template
name
required

The name of this content part. Usually a filename.

string
sha256
required

The SHA256 digest of this content part. For older content, received before early 2018, this may be null.

string
nullable
size
required

The size in bytes of this content part

integer
url
required

The URL to fetch this content part

string
responsive_body

The responsive content HTML of the part, if and only if this part has a corresponding responsive part

string
payment_options
required

Different ways to pay an invoice

Array<object>
PartnerPaymentOption

One way to pay this invoice

object
account
required

The account to pay to

string
nullable
amount
required

The amount to pay in öre, or equivalent

integer
nullable
currency
required

The currency used for this payment option

string
nullable
description
required

The description of this payment option

string
nullable
due_at
required

Due date of this payment option

string format: date-time
nullable
interpreted
required

Used to indicate if this payment option was interpreted. Now it is always set to false.

boolean
reference
required

The payments reference, could be an OCR number or invoice reference

string
nullable
reference_type
required

The type of reference

string
nullable
type
required

The type of the the payment, aka the type of the account

string
nullable
vat_amount
required

The VAT in öre for this invoice, if available

integer
nullable
accounting

Accounting data for structured invoices. For details about the properties see the description of the invoice property for Send content

object
invoice_type

The type of invoice that the content was sent as. For details about expected values, see the accounting.* variants allowed for the content type property in Send content

string
total_amount_due
string
currency
string
due_date
string
bankgiro
string
plusgiro
string
invoice_number
string
original_invoice_number
string
invoice_date
string
buyer_reference
string
order_number
string
supplier_name
string
supplier_organisation_number
string
supplier_vat_number
string
supplier_address_street
string
supplier_address_postal_code
string
supplier_address_city
string
payment_reference
object
iban
string
bic
string
total_amount_tax_exclusive
string
total_amount_tax_inclusive
string
total_vat_amount
string
rounding_amount
string
total_amount_charge
string
total_amount_discount
string
supplier_address_country
string
supplier_reference
string
buyer_name
string
buyer_organisation_number
string
project_reference
string
cost_center_reference
string
rows
Array<object>
object
references
required
InvoiceReferences

References for this invoice

object
our
required

Our reference, “vår referens” in Swedish

string
nullable
your
required

Your reference, “er referens” in Swedish

string
nullable
sender_contact_info
required
SenderContactInfo

Contact information for the sender. Null if not provided or all fields are null.

object
email_address

Email address for support.

string
nullable
logo_url

URL to a logo.

string format: url
nullable
phone_number

Phone number for support.

string
nullable
text

Free-form text, e.g., contact person or department.

string
nullable
url

URL to a support page.

string format: url
nullable
created_at
required

This is the same date and time as transaction_at, except for reminder invoices, where it is the reminder date and not the original invoice date.

string format: date-time
key
required
ContentKey

The key for a content

string
/^[0-9]{10}[a-f0-9]{32}$/
labels
required

The labels that apply to this content

object
governmental
required
GovernmentalLabel

Indicates if the content comes from a governmental body.

boolean
handled
required
HandledLabel

The content has been marked as handled, previously known as paid.

boolean
interpreted
required
InterpretedLabel

Used to indicate if the content has been interpreted. Now it is always set to false.

boolean
reminder
required
ReminderLabel

Indicates if the content, which must be an invoice, is a reminder.

boolean
trashed
required
TrashedLabel

Indicates if the content has been moved to the trash.

boolean
viewed
required
ViewedLabel

The content has been viewed. This can be toggled by the user, i.e. “Mark as unread”.

boolean
parts
required
Array<object>
PartMetadata
object
content_type
required

The MIME type of this content part

string
Allowed values: application/pdf text/html text/plain image/jpeg image/gif image/png text/calendar application/msword application/vnd.openxmlformats-officedocument.wordprocessingml.document application/vnd.openxmlformats-officedocument.wordprocessingml.template
name
required

The name of this content part. Usually a filename.

string
sha256
required

The SHA256 digest of this content part. For older content, received before early 2018, this may be null.

string
nullable
size
required

The size in bytes of this content part

integer
url
required

The URL to fetch this content part

string
responsive_body

The responsive content HTML of the part, if and only if this part has a corresponding responsive part

string
received_at
required

When the content was received by Kivra

string format: date-time
receiver_name
required

The name of the recipient company

string
receiver_vat_number
required
VatNumber

A Swedish VAT number (“momsregistreringsnummer”).

string
/^SE[0-9]{10}01$/
sender_icon_url
required

A url to the icon used by the sender within Kivra, or null if no corresponding icon exists.

string format: url
nullable
sender_name
required

The name of the sender

string
nullable
sender_vat_numbers
required

VAT numbers representing the sender

Array<string>
nullable
origin
ContentOrigin

The origin of the content. Indicates how the content was delivered to Kivra.

  • kivra: Sent directly through Kivra.
  • minameddelanden: Sent via Mina Meddelanden. Used by governmental organisations.
  • user: Uploaded by an user. Companies with Kivra företag+ can also receive:
  • physical: Physical post scanned by Kivra.
  • email: Sent via the company’s kivramail.com email address.
string
Allowed values: kivra minameddelanden user physical email
subject
required

Subject of the content

string
transaction_at
required

The date and time this content conceptually took place.

  • For a normal invoice it is the invoice date.
  • For a reminder invoice it the original invoice date and not the reminders invoice date.
  • For all other types of content it is null.
  • If no date could be found, it is null.
string format: date-time
nullable
type
required

The type of the content

string
Allowed values: invoice other
Example
{
"interpreted_fields": [],
"parts": [
{
"content_type": "application/pdf",
"name": "faktura.pdf",
"sha256": "060bed374498fe2f36a5f2e1abf217a90beb46e8fe4ec1d9d5ce7746",
"size": 4711,
"url": "https://sender.sandbox-api.kivra.com/v3/partner/company/1691677086a57b73569d594df5abad7fd2575c1070/content/1691677075a9813e08f783496382b0bff743ec34ae?part=1",
"responsive_body": "<h1>Faktura</h1>\n<p>Totalt: 1 500,00 kr/p>"
}
],
"payment_options": [
{
"account": "12345678",
"amount": 150000,
"currency": "SEK",
"description": "12 month subscription",
"due_at": "2022-03-30T00:00:00Z",
"interpreted": false,
"reference": 987654321,
"reference_type": "OCR",
"type": "bankgiro",
"vat_amount": 1500
}
],
"references": {
"our": "Gustav Larsson",
"your": null
},
"sender_contact_info": {
"email_address": "support@example.com",
"logo_url": "https://example.com/logo.png",
"phone_number": "+46700000000",
"text": "Customer Support",
"url": "https://example.com/support"
},
"key": "156077433683911cdca5fd4563bded979572454cb9",
"labels": {
"interpreted": false
},
"receiver_name": "Developers Developers Developers AB",
"receiver_vat_number": "SE556000475501",
"sender_icon_url": "https://sandbox-static.kivra.com/img/tenant/1341573157b3a1c55f220f4007b2e44789d2d04015/icon.png",
"sender_name": "Lenas Konditori AB",
"sender_vat_numbers": [
"SE556000475501"
],
"origin": "kivra",
"subject": "Invoice: a thousand Swiss rolls",
"type": "invoice"
}