Attach a PDF file
Attach a PDF attachment to a billogram. The PDF attachment will be printed and sent along with the invoice if delivered by letter and will be available to download when the recipient receives the billogram via email or link. The attachment can later be fetched from the target path billogram/{id}/attachment.pdf. To remove an attachment, update the attachment field of the billogram to null.
Path Parameters
- Type: stringidrequired
Billogram ID
Body·
required
application/json
Command to attach a PDF file to a billogram.
- Type: stringFormat: bytecontentrequired
The content (base64 encoded) of the PDF file to attach.
- Type: stringfilenamerequired
The filename of the attached file, for example "example.pdf".
Responses
- application/json
- application/json
Request Example for post/billogram/{id}/command/attach
curl 'https://sandbox.billogram.com/api/v2/billogram/{id}/command/attach' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic username:password' \
--data '{
"filename": "terms.pdf",
"content": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwo+PgplbmRvYmoKdHJhaWxlcgo8PAovUm9vdCAxIDAgUgo+PgolJUVPRgo="
}'
{
"status": "OK",
"data": {
"id": "2kAEEjE",
"invoice_no": 1,
"ocr_number": "string",
"creditor_unique_value": "string",
"customer": {
"customer_no": 1,
"org_no": "string",
"name": "string",
"email": "hello@example.com",
"vat_no": "string",
"phone": "string",
"address": {
"careof": "string",
"use_careof_as_attention": true,
"attention": "string",
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"administrative_area": "string",
"dependent_locality": "string",
"organization": "string",
"sorting_code": "string",
"zipcode": "string",
"city": "string",
"country": "SE"
},
"delivery_address": {
"name": "string",
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"administrative_area": "string",
"dependent_locality": "string",
"organization": "string",
"sorting_code": "string",
"careof": "string",
"attention": "string",
"zipcode": "string",
"city": "string",
"country": "string"
},
"permanent_establishment_address": {
"name": "string",
"additional_name": "string",
"family_name": "string",
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"administrative_area": "string",
"dependent_locality": "string",
"organization": "string",
"sorting_code": "string",
"zipcode": "string",
"city": "string",
"country": "string"
},
"edi": {
"electronic_id": 1,
"operator": "addett",
"reference": "string",
"note": "string"
}
},
"items": [
{
"item_no": "string",
"count": 1,
"title": "string",
"description": "string",
"unit": "string",
"price": 1,
"vat": 1,
"discount": 1,
"start_date": "2026-04-29",
"end_date": "2026-04-29",
"external_id": null,
"bookkeeping": {
"income_account": "string",
"vat_account": "string",
"objects": [
{
"dimension_id": 1,
"object_id": "string",
"dimension_name": "string",
"object_name": "string"
}
]
},
"regional_sweden": {
"rotavdrag": true,
"electricity_collection": {
"kommunkod": 1,
"naringsidkare": true,
"avflyttad": true,
"avflyttad_datum": "2026-04-29",
"frankopplad": true,
"frankopplad_datum": "2026-04-29",
"anladr": "string",
"natom": "string",
"arsforb": 1,
"anlid": "string",
"kravmall": "string",
"plombkod": "string",
"slutfaktura": true,
"objtyp": 1,
"faktforb": 1,
"faktfrek": 1,
"nyttighet": "EL"
}
}
}
],
"invoice_date": "2026-04-29",
"due_date": "2026-04-29",
"due_days": 30,
"reminder_due_days": 1,
"respite_date": "2026-04-29",
"invoice_fee": 1,
"invoice_fee_vat": 1,
"reminder_fee": 1,
"interest_rate": 8.5,
"interest_fee": 1,
"currency": "SEK",
"info": {
"order_no": "string",
"order_date": "2026-04-29",
"our_reference": "string",
"your_reference": "string",
"shipping_date": "string",
"delivery_date": "string",
"reference_number": "string",
"footer_text": "string",
"message": "string"
},
"regional_sweden": {
"rotavdrag": 1,
"rotavdrag_personal_number": "string",
"rotavdrag_description": "string",
"rotavdrag_description_of_property": "string",
"rotavdrag_apartment_designation": "string",
"rotavdrag_housing_association_org_no": "string",
"autogiro_betalarnummer": "string",
"autogiro_payment_date": "2026-04-29",
"autogiro_status": "string",
"autogiro_full_status": "string",
"autogiro_total_sum": 1
},
"delivery_method": "Email+Letter",
"state": "string",
"url": null,
"recipient_url": null,
"recipient_overview_url": null,
"flags": [
"string"
],
"events": [
{
"type": "AutogiroFailed",
"created_at": "string",
"event_uuid": "123e4567-e89b-12d3-a456-426614174000",
"billogram_id": "string",
"data": {
"amount": 1,
"full_status": "string"
}
}
],
"remaining_sum": 1,
"total_sum": 1,
"rounding_value": 1,
"automatic_reminders": true,
"automatic_reminders_settings": [
{
"delay_days": 1,
"message": "string",
"type": "STANDARD"
}
],
"reminder_count": 1,
"created_at": "2026-04-29T11:19:15.647Z",
"attested_at": "string",
"updated_at": "2026-04-29T11:19:15.647Z",
"callbacks": {
"url": "string",
"custom": "string",
"sign_key": "string"
},
"detailed_sums": {
"credited_sum": 1,
"net_sum": 1,
"gross_sum": 1,
"invoice_fee_vat": 1,
"paid_sum": 1,
"interest_fee": 1,
"vat_sum": 1,
"reminder_fee": 1,
"invoice_fee": 1,
"rounding": 1,
"regional_sweden": {
"rotavdrag_sum": 1
},
"collector_paid_sum": 1,
"remaining_sum": 1
},
"attachment": "string",
"attachment_content": "string",
"reference_invoice_no": "string",
"reversed_vat": true,
"reversed_vat_reason": "string",
"reversed_vat_reason_reference": "string",
"automatic_collection": {
"delay_days": 1,
"amount": 50,
"use_default_settings": true
},
"contract": {
"start_date": "2026-04-29",
"end_date": "2026-04-29"
},
"self_billing_invoice": {
"type": "credit",
"serial_number": "string"
},
"offer_invoice_info": {
"message": "string",
"asset_id": "string"
},
"dunning": {
"requested_segment": "string"
},
"pdf": {
"template": "unified",
"slip_style": "normal"
},
"offers": [
{
"offer_id": "string"
}
],
"on_success": {
"command": "send",
"method": "Email+Letter"
},
"return_data": "compact"
}
}