Update content metadata
const url = 'https://sender.api.kivra.com/v3/partner/company/156077433683911cdca5fd4563bded979572454cb9/content/156077433683911cdca5fd4563bded979572454cb9';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"labels":{"handled":true,"viewed":true}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://sender.api.kivra.com/v3/partner/company/156077433683911cdca5fd4563bded979572454cb9/content/156077433683911cdca5fd4563bded979572454cb9 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "labels": { "handled": true, "viewed": true } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The key for a company
Example
156077433683911cdca5fd4563bded979572454cb9The key for a content
Example
156077433683911cdca5fd4563bded979572454cb9Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Mark the content as handled/unhandled
Mark the content as viewed/unviewed
Examplegenerated
{ "labels": { "handled": true, "viewed": true }}Responses
Section titled “Responses”Content metadata
Details of content metadata
object
Used to indicate which fields, in dot notation, have been interpreted. Now it is always set to the empty array.
The files in the content
object
The MIME type of this content part
The name of this content part. Usually a filename.
The SHA256 digest of this content part. For older content, received before early 2018, this may be null.
The size in bytes of this content part
The URL to fetch this content part
The responsive content HTML of the part, if and only if this part has a corresponding responsive part
Different ways to pay an invoice
One way to pay this invoice
object
The account to pay to
The amount to pay in öre, or equivalent
The currency used for this payment option
The description of this payment option
Due date of this payment option
Used to indicate if this payment option was interpreted. Now it is
always set to false.
The payments reference, could be an OCR number or invoice reference
The type of reference
The type of the the payment, aka the type of the account
The VAT in öre for this invoice, if available
Accounting data for structured invoices. For details about the
properties see the description of the invoice property for
Send content
object
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
object
object
References for this invoice
object
Our reference, “vår referens” in Swedish
Your reference, “er referens” in Swedish
Contact information for the sender. Null if not provided or all fields are null.
object
Email address for support.
URL to a logo.
Phone number for support.
Free-form text, e.g., contact person or department.
URL to a support page.
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.
The key for a content
The labels that apply to this content
object
Indicates if the content comes from a governmental body.
The content has been marked as handled, previously known as paid.
Used to indicate if the content has been interpreted. Now it is always
set to false.
Indicates if the content, which must be an invoice, is a reminder.
Indicates if the content has been moved to the trash.
The content has been viewed. This can be toggled by the user, i.e. “Mark as unread”.
object
The MIME type of this content part
The name of this content part. Usually a filename.
The SHA256 digest of this content part. For older content, received before early 2018, this may be null.
The size in bytes of this content part
The URL to fetch this content part
The responsive content HTML of the part, if and only if this part has a corresponding responsive part
When the content was received by Kivra
The name of the recipient company
A Swedish VAT number (“momsregistreringsnummer”).
A url to the icon used by the sender within Kivra, or null if no corresponding icon exists.
The name of the sender
VAT numbers representing the sender
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.
Subject of the content
The date and time this content conceptually took place.
- For a normal
invoiceit is the invoice date. - For a reminder
invoiceit the original invoice date and not the reminders invoice date. - For all
othertypes of content it isnull. - If no date could be found, it is
null.
The type of the content
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"}The file data of the content part, content_type in the part metadata
describes its file type.