Invoices

Customer invoices (kundfakturor) and credit notes, from draft to paid.

Life of an invoice. An invoice starts as a draft: no number, no OCR reference, freely editable, and deletable without leaving a trace. POST /invoices/{invoice}/send issues it — it takes the next number in its series, gets an OCR reference, is dated, has its PDF stored and is emailed — and from that moment it can never be edited or deleted. Payments then move it to partially_paid and paid. A mistake on an issued invoice is corrected with a credit note, never with an edit; that is what bokföringslagen means by an invoice.

statusmeaningcan become
draftbeing writtensent, cancelled
sentissued, nothing paidpartially_paid, paid, overdue, credited, written_off
overduedue date passed with money outstanding (set by a nightly job)partially_paid, paid, credited, written_off
partially_paidsome money inpaid, overdue, credited, written_off
paidthe customer's share is settledcredited, partially_paid (refund)
creditedfully credited by credit notes—
cancelled, written_offclosed—

Numbers and OCR. Invoice numbers come from an unbroken series per organization and series letter (A unless you choose another); credit notes have their own series, K + the invoice's (KA). A number is spent only at send, inside the same transaction, so a failed send leaves no gap. The OCR reference is the invoice number's digits plus a Luhn (modulus 10) check digit — invoice 1042 gets OCR 10421 — so the invoice behind an OCR number is its digits minus the last one.

Amounts are integers in öre, VAT is 25, 12, 6 or 0 percent per line, and the total is rounded to whole kronor (öresavrundning, shown as rounding_cents).

ROT and RUT. Set rot_rut on the invoice and mark labour lines rot_rut_eligible; Closepact adds and maintains the deduction line itself — 30 % (ROT) or 50 % (RUT) of the eligible labour including VAT. Materials never qualify, whatever the flag says. The customer pays rot_rut.customer_pays_cents; the rest is claimed from Skatteverket in Closepact's deduction workflow, which needs the buyer's personnummer and, for ROT, the property — see the customer's tax_profiles. Each labour line (or the invoice, for every line that names none) can carry rot_rut_work_type, Skatteverket's category for the work, which the claim declares hours and material under. The yearly ceiling per person is not applied (it depends on other companies' claims), and the response says so with annual_ceiling_applied: false. Once the customer has paid their share, the claim is filed from the panel as Skatteverket's import file; when Skatteverket's decision is recorded, rot_rut.status follows it, what it paid arrives as a rot_rut payment, and what it refused (rot_rut.refused_cents) is owed by the customer again.

Webhooks. No webhook is sent for invoices or payments yet. To follow status changes, poll GET /invoices with filter[status] or filter[overdue].

Not available through the API: sending payment reminders (deliberately a person's decision — level 3 announces collection), bank statement import and matching, recurring invoice schedules, filing ROT/RUT claims with Skatteverket, the SIE export and the reports. They are in the Closepact panel.

List invoices

GET/invoices

Invoices and credit notes, newest first, without their lines (fetch one invoice for those).

For bookkeeping, filter[from]/filter[to] select on the issue date — the date an accountant means by "September" — and filter[type]=credit_note gives the credit notes. filter[overdue]=true is decided at the moment you ask (issued, due date passed, and something still owed by the customer once a ROT/RUT share is set aside), so it is more current than filter[status]=overdue, which a nightly job writes.

q is a case-insensitive contains match on the invoice number and on Er referens / Vår referens.

Paging is by cursor: pass meta.next_cursor back as cursor together with the same filters and limit — the URLs in links do not carry your filters.

curl 'https://api.closepact.com/v1/api/invoices' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "data": [
    {
      "id": "01a15b02-7c14-7e2b-8d5a-3f9c1e6b4a27",
      "type": "invoice",
      "invoice_number": "1042",
      "series": "A",
      "reference": "A-1042",
      "status": "sent",
      "status_label": "Skickad",
      "is_editable": false,
      "handover": null,
      "customer": {
        "id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
        "name": "Eva Ek",
        "customer_number": "1043",
        "payment_terms_days": 20
      },
      "dates": {
        "issue_date": "2026-10-18",
        "due_date": "2026-11-07",
        "delivery_date": "2026-10-16",
        "payment_terms_days": 20,
        "days_overdue": 0
      },
      "references": {
        "your_reference": "Eva Ek",
        "our_reference": "Anna Lindqvist",
        "ocr_reference": "10421"
      },
      "amounts": {
        "currency": "SEK",
        "net_cents": 195000,
        "vat_cents": 48750,
        "rounding_cents": 50,
        "total_cents": 243800,
        "paid_cents": 0,
        "outstanding_cents": 131300,
        "vat_by_rate": [
          {
            "rate": 25,
            "net_cents": 195000,
            "vat_cents": 48750
          }
        ]
      },
      "rot_rut": {
        "type": "rut",
        "work_type": "Stadning",
        "requested_cents": 112500,
        "approved_cents": 0,
        "refused_cents": 0,
        "status": "none",
        "customer_pays_cents": 131300,
        "annual_ceiling_applied": false,
        "tax_profile_id": null,
        "buyer": null
      },
      "delivery_method": "email",
      "delivery": null,
      "delivery_failure": null,
      "sent_at": "2026-10-18T09:20:44+00:00",
      "viewed_at": null,
      "notes": null,
      "created_at": "2026-10-17T15:02:10+00:00",
      "updated_at": "2026-10-18T09:20:44+00:00"
    }
  ],
  "links": {
    "first": null,
    "last": null,
    "prev": null,
    "next": null
  },
  "meta": {
    "path": "https://api.closepact.com/v1/api/invoices",
    "per_page": 50,
    "next_cursor": null,
    "prev_cursor": null
  }
}

Query parameters

  • qstring

    Search the invoice number and the two references.

    Example 1042

  • filter[status]string | array of strings

    One status, or several as filter[status][]=sent&filter[status][]=partially_paid.

  • filter[account_id]string(uuid)

    Only this customer's invoices.

  • filter[type]string | array of strings

    Invoices, credit notes, or (repeated as filter[type][]) both.

  • filter[overdue]boolean

    true for invoices that are overdue right now.

  • filter[from]string(date)

    Issued on or after this date.

    Example 2026-09-01

  • filter[to]string(date)

    Issued on or before this date.

    Example 2026-09-30

  • limitinteger

    Invoices per page.

    Default 501–200

  • cursorstring

    Opaque cursor from meta.next_cursor or meta.prev_cursor of the previous page.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataarray of objectsrequired
      • idstring(uuid)required
      • typestringrequired

        One ofinvoicecredit_note

      • invoice_numberstringnullablerequired

        Null on a draft; allocated at send.

      • seriesstringrequired

        A unless chosen otherwise; credit notes K + the invoice's series.

      • referencestringrequired

        The number as said out loud — A-1042 — or Utkast for a draft.

      • statusstringrequired

        See the status table in the Invoices section.

        One ofdraftsentpartially_paidpaidoverduecreditedcancelledwritten_off

      • status_labelstringrequired

        The status in Swedish, as printed: Utkast, Skickad, Delbetald, Betald, Förfallen, Krediterad, Makulerad, Avskriven.

      • is_editablebooleanrequired

        True only for a draft.

      • handoverobjectnullablerequired

        The accepted quote this invoice was drafted from — for an organization with invoicing and no scheduling — or null.

      • customerobjectrequired
      • contactobjectnullable

        The person the invoice is addressed to. Only on a single invoice.

      • datesobjectrequired
      • referencesobjectrequired
      • amountsobjectrequired

        Integers in öre.

      • rot_rutobjectrequired

        The tax deduction on the invoice, kept apart from what the customer owes.

      • linesarray of objects

        Absent from lists.

      • delivery_methodstringrequired

        One ofemailpeppolprint

      • deliveryobjectnullablerequired

        Where Closepact emailed the invoice. automatic is true when a recurring invoice agreement sent it; status is queued for a send from the panel or API (handed to the mail queue) and sent for an automatic one (accepted by the mail server before the invoice counted as sent). Null when nothing was emailed — Peppol and print are not delivered by Closepact.

      • delivery_failureobjectnullablerequired

        Why a recurring invoice agreement that was meant to send this invoice did not. The invoice is then still a draft, without a number.

      • sent_atstring(date-time)nullablerequired
      • viewed_atstring(date-time)nullablerequired

        When the customer first opened the emailed invoice.

      • notesstringnullablerequired

        Printed on the invoice. On a credit note, the reason.

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
    • linksobjectrequired
    • metaobjectrequired
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Create an invoice draft

POST/invoices
Scope write Module Invoicing Permission invoicing.invoices.manage

Creates a draft for a customer. Add its rows with POST /invoices/{invoice}/lines, then send it.

Only account_id is required. The rest comes from the customer: payment terms (then the organization's default, 30 days) and currency. delivery_method defaults to email.

The dates on a draft are provisional. Sending stamps the invoice with the day it is sent, by the Swedish calendar, and a due date payment_terms_days after that — whatever issue_date and due_date the draft held. To give the customer 20 days, send payment_terms_days: 20. delivery_date (leveransdatum, when the work was done) is kept as you set it; it decides the VAT period.

ROT/RUT. rot_rut: "rot" or "rut" makes Closepact add and maintain the deduction line from the eligible labour lines. Use it only for private customers, and make sure the customer has a tax profile — see the Invoices section.

No number, OCR reference or amount can be set here; they are produced by the lines and by sending. A customer, contact or office id from another organization answers 404.

curl -X POST 'https://api.closepact.com/v1/api/invoices' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "account_id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
  "contact_id": "01a15a21-0c7a-70e4-9b3c-5d8a2f6e1c49",
  "delivery_date": "2026-10-16",
  "payment_terms_days": 20,
  "your_reference": "Eva Ek",
  "our_reference": "Anna Lindqvist",
  "rot_rut": "rut"
}'
Response · 201
{
  "data": {
    "id": "01a15b02-7c14-7e2b-8d5a-3f9c1e6b4a27",
    "type": "invoice",
    "invoice_number": null,
    "series": "A",
    "reference": "Utkast",
    "status": "draft",
    "status_label": "Utkast",
    "is_editable": true,
    "handover": null,
    "customer": {
      "id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
      "name": "Eva Ek",
      "customer_number": "1043",
      "payment_terms_days": 20
    },
    "dates": {
      "issue_date": "2026-10-17",
      "due_date": "2026-11-06",
      "delivery_date": "2026-10-16",
      "payment_terms_days": 20,
      "days_overdue": 0
    },
    "references": {
      "your_reference": "Eva Ek",
      "our_reference": "Anna Lindqvist",
      "ocr_reference": null
    },
    "amounts": {
      "currency": "SEK",
      "net_cents": 0,
      "vat_cents": 0,
      "rounding_cents": 0,
      "total_cents": 0,
      "paid_cents": 0,
      "outstanding_cents": 0,
      "vat_by_rate": []
    },
    "rot_rut": {
      "type": "rut",
      "work_type": null,
      "requested_cents": 0,
      "approved_cents": 0,
      "refused_cents": 0,
      "status": "none",
      "customer_pays_cents": 0,
      "annual_ceiling_applied": false,
      "tax_profile_id": null,
      "buyer": null
    },
    "lines": [],
    "delivery_method": "email",
    "delivery": null,
    "delivery_failure": null,
    "sent_at": null,
    "viewed_at": null,
    "notes": null,
    "created_at": "2026-10-17T15:02:10+00:00",
    "updated_at": "2026-10-17T15:02:10+00:00"
  }
}

Request body

application/json · required

The writable header fields of an invoice draft. On update every field is optional.

  • account_idstring(uuid)required

    The customer.

  • contact_idstring(uuid)nullable

    The person at the customer it is addressed to; their email is where it is sent.

  • sub_entity_idstring(uuid)nullable

    The office issuing it, for organizations with several.

  • issue_datestring(date)nullable

    Provisional; replaced by the send date.

  • due_datestring(date)nullable

    Provisional; replaced by send date + payment terms.

  • delivery_datestring(date)nullable
  • payment_terms_daysinteger

    0–365

  • currencystring

    exactly 3 characters

  • your_referencestringnullable

    at most 128 characters

  • our_referencestringnullable

    at most 128 characters

  • seriesstring

    Number series. Each series is numbered on its own.

    Default "A"at most 8 characters

  • rot_rutstring

    ROT and RUT are included from the Väx tier of invoicing (invoicing.tax_deduction); setting rot or rut without it is answered 402 with that feature. none is always accepted.

    One ofnonerotrut

    Default "none"

  • rot_rut_work_typestringnullable

    Skatteverket's category for the work on every line that names none of its own (rot_rut_work_type on the line). The claim to Skatteverket declares the labour, hours and material per category.

    One ofByggElGlasPlatarbeteMarkDraneringarbeteMurningMalningTapetseringVvsStadningKladOchTextilvardSnoskottningTradgardsarbeteBarnpassningPersonligomsorgFlyttjansterItTjansterReparationAvVitvarorMobleringTillsynAvBostadTransportTillForsaljningTvattVidTvattinrattning

  • tax_profile_idstring(uuid)nullable

    Which of the customer's ROT/RUT tax profiles the deduction is claimed for. Must belong to the invoice's customer. Left out on a ROT/RUT invoice, the customer's only profile (or the one tied to the work order's service address) is used.

  • delivery_methodstring

    One ofemailpeppolprint

    Default "email"

  • notesstringnullable

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired

      An invoice or credit note.

      • idstring(uuid)required
      • typestringrequired

        One ofinvoicecredit_note

      • invoice_numberstringnullablerequired

        Null on a draft; allocated at send.

      • seriesstringrequired

        A unless chosen otherwise; credit notes K + the invoice's series.

      • referencestringrequired

        The number as said out loud — A-1042 — or Utkast for a draft.

      • statusstringrequired

        See the status table in the Invoices section.

        One ofdraftsentpartially_paidpaidoverduecreditedcancelledwritten_off

      • status_labelstringrequired

        The status in Swedish, as printed: Utkast, Skickad, Delbetald, Betald, Förfallen, Krediterad, Makulerad, Avskriven.

      • is_editablebooleanrequired

        True only for a draft.

      • handoverobjectnullablerequired

        The accepted quote this invoice was drafted from — for an organization with invoicing and no scheduling — or null.

      • customerobjectrequired
      • contactobjectnullable

        The person the invoice is addressed to. Only on a single invoice.

      • datesobjectrequired
      • referencesobjectrequired
      • amountsobjectrequired

        Integers in öre.

      • rot_rutobjectrequired

        The tax deduction on the invoice, kept apart from what the customer owes.

      • linesarray of objects

        Absent from lists.

      • delivery_methodstringrequired

        One ofemailpeppolprint

      • deliveryobjectnullablerequired

        Where Closepact emailed the invoice. automatic is true when a recurring invoice agreement sent it; status is queued for a send from the panel or API (handed to the mail queue) and sent for an automatic one (accepted by the mail server before the invoice counted as sent). Null when nothing was emailed — Peppol and print are not delivered by Closepact.

      • delivery_failureobjectnullablerequired

        Why a recurring invoice agreement that was meant to send this invoice did not. The invoice is then still a draft, without a number.

      • sent_atstring(date-time)nullablerequired
      • viewed_atstring(date-time)nullablerequired

        When the customer first opened the emailed invoice.

      • notesstringnullablerequired

        Printed on the invoice. On a credit note, the reason.

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Create a draft from finished work orders

POST/invoices/from-work-orders
Scope write Module Invoicing Permission invoicing.invoices.manage

Builds one invoice draft from up to 100 finished work orders of the scheduling module, the way the panel's Fakturera button does, and marks the work orders invoiced.

What is billed is what scheduling has settled: approved time only (hours still awaiting approval are left out and reported in meta.warnings), services and materials as separate lines, and the agreed price instead of the hours for a fixed-price job. The ROT/RUT type comes from the work orders.

Refused with 409 when the work orders belong to different customers, disagree about the deduction, are not finished, or were already invoiced. A work order id the organization cannot see answers 404, and so does every request from an organization without the scheduling module. The result is an ordinary draft: check meta.warnings, adjust the lines if needed, and send it.

curl -X POST 'https://api.closepact.com/v1/api/invoices/from-work-orders' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "work_order_ids": [
    "01a158e4-6b1d-7a29-8c5f-2e7d4b9a3c16"
  ],
  "delivery_date": "2026-10-16",
  "our_reference": "Anna Lindqvist"
}'
Response · 201
{
  "data": {
    "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "type": "invoice",
    "invoice_number": "string",
    "series": "string",
    "reference": "string",
    "status": "draft",
    "status_label": "string",
    "is_editable": true,
    "handover": {
      "quote_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "quote_number": "string",
      "created_automatically": true,
      "warnings": [
        {
          "code": "string",
          "message": "A short description."
        }
      ]
    },
    "customer": {
      "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "name": "Anna Lindqvist",
      "customer_number": "string",
      "payment_terms_days": 1
    },
    "contact": {
      "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "organization_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "account_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "email": "anna@nordiskfastighet.se",
      "name": "Anna Lindqvist",
      "title": "Quarterly window cleaning",
      "phone": "+46701234567",
      "crm_external_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "crm_provider": "string",
      "metadata": {},
      "created_at": "2026-10-18T09:30:00Z",
      "updated_at": "2026-10-18T09:30:00Z",
      "deleted_at": "2026-10-18T09:30:00Z"
    },
    "dates": {
      "issue_date": "2026-10-18",
      "due_date": "2026-10-18",
      "delivery_date": "2026-10-18",
      "payment_terms_days": 1,
      "days_overdue": 1
    },
    "references": {
      "your_reference": "string",
      "our_reference": "string",
      "ocr_reference": "string"
    },
    "amounts": {
      "currency": "SEK",
      "net_cents": 125000,
      "vat_cents": 125000,
      "rounding_cents": 125000,
      "total_cents": 125000,
      "paid_cents": 125000,
      "outstanding_cents": 125000,
      "vat_by_rate": [
        {
          "rate": 1,
          "net_cents": 125000,
          "vat_cents": 125000
        }
      ]
    },
    "rot_rut": {
      "type": "none",
      "work_type": "Bygg",
      "requested_cents": 125000,
      "approved_cents": 125000,
      "refused_cents": 125000,
      "status": "none",
      "customer_pays_cents": 125000,
      "annual_ceiling_applied": false,
      "tax_profile_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "buyer": {
        "name": "Anna Lindqvist",
        "personal_number_masked": "string",
        "property_designation": "string",
        "brf_org_number": "556677-8899",
        "apartment_number": "string",
        "work_address": "Södra Hamngatan 1"
      }
    },
    "lines": [
      {
        "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "sort_order": 1,
        "description": "A short description.",
        "quantity": 1,
        "unit": "string",
        "unit_price_cents": 125000,
        "discount_percent": 25,
        "vat_rate": 25,
        "net_cents": 125000,
        "vat_cents": 125000,
        "total_cents": 125000,
        "line_type": "goods",
        "rot_rut_eligible": true,
        "rot_rut_work_type": "Bygg",
        "is_generated": true,
        "account_code": "string",
        "article_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "work_order_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "time_entry_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "metadata": {}
      }
    ],
    "delivery_method": "email",
    "delivery": {
      "method": "email",
      "to": "anna@nordiskfastighet.se",
      "at": "2026-10-18T09:30:00Z",
      "automatic": true,
      "status": "queued"
    },
    "delivery_failure": {
      "at": "2026-10-18T09:30:00Z",
      "reason": "string",
      "automatic": true
    },
    "sent_at": "2026-10-18T09:30:00Z",
    "viewed_at": "2026-10-18T09:30:00Z",
    "notes": "A short description.",
    "created_at": "2026-10-18T09:30:00Z",
    "updated_at": "2026-10-18T09:30:00Z"
  },
  "meta": {
    "warnings": [
      {
        "code": "string",
        "message": "A short description.",
        "context": {},
        "work_order_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "order_number": "string"
      }
    ],
    "work_order_ids": [
      "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40"
    ]
  }
}

Request body

application/json · required

  • work_order_idsarray of strings(uuid)required

    1–100 items

  • issue_datestring(date)

    Provisional, as on any draft.

  • due_datestring(date)

    On or after issue_date. Provisional, as on any draft.

  • delivery_datestring(date)
  • your_referencestringnullable

    at most 128 characters

  • our_referencestringnullable

    at most 128 characters

  • notesstringnullable

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired

      An invoice or credit note.

      • idstring(uuid)required
      • typestringrequired

        One ofinvoicecredit_note

      • invoice_numberstringnullablerequired

        Null on a draft; allocated at send.

      • seriesstringrequired

        A unless chosen otherwise; credit notes K + the invoice's series.

      • referencestringrequired

        The number as said out loud — A-1042 — or Utkast for a draft.

      • statusstringrequired

        See the status table in the Invoices section.

        One ofdraftsentpartially_paidpaidoverduecreditedcancelledwritten_off

      • status_labelstringrequired

        The status in Swedish, as printed: Utkast, Skickad, Delbetald, Betald, Förfallen, Krediterad, Makulerad, Avskriven.

      • is_editablebooleanrequired

        True only for a draft.

      • handoverobjectnullablerequired

        The accepted quote this invoice was drafted from — for an organization with invoicing and no scheduling — or null.

      • customerobjectrequired
      • contactobjectnullable

        The person the invoice is addressed to. Only on a single invoice.

      • datesobjectrequired
      • referencesobjectrequired
      • amountsobjectrequired

        Integers in öre.

      • rot_rutobjectrequired

        The tax deduction on the invoice, kept apart from what the customer owes.

      • linesarray of objects

        Absent from lists.

      • delivery_methodstringrequired

        One ofemailpeppolprint

      • deliveryobjectnullablerequired

        Where Closepact emailed the invoice. automatic is true when a recurring invoice agreement sent it; status is queued for a send from the panel or API (handed to the mail queue) and sent for an automatic one (accepted by the mail server before the invoice counted as sent). Null when nothing was emailed — Peppol and print are not delivered by Closepact.

      • delivery_failureobjectnullablerequired

        Why a recurring invoice agreement that was meant to send this invoice did not. The invoice is then still a draft, without a number.

      • sent_atstring(date-time)nullablerequired
      • viewed_atstring(date-time)nullablerequired

        When the customer first opened the emailed invoice.

      • notesstringnullablerequired

        Printed on the invoice. On a credit note, the reason.

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
    • metaobjectrequired
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 409The request is well-formed but the invoice's state does not allow it — for example it has already been issued, has no lines, or has been credited in full. error is always conflict; the message says what to do instead.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Get an invoice

GET/invoices/{invoice}

One invoice or credit note with its contact and all its lines, including the generated ROT/RUT line.

What bookkeeping needs is here: amounts.vat_by_rate gives the VAT per rate (never blended), amounts.outstanding_cents what the customer still owes, and rot_rut the part claimed from Skatteverket, kept apart from what the customer owes. is_editable says whether the invoice may still change. Another organization's invoice id answers 404.

curl 'https://api.closepact.com/v1/api/invoices/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "data": {
    "id": "01a15b02-7c14-7e2b-8d5a-3f9c1e6b4a27",
    "type": "invoice",
    "invoice_number": "1042",
    "series": "A",
    "reference": "A-1042",
    "status": "sent",
    "status_label": "Skickad",
    "is_editable": false,
    "handover": null,
    "customer": {
      "id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
      "name": "Eva Ek",
      "customer_number": "1043",
      "payment_terms_days": 20
    },
    "contact": {
      "id": "01a15a21-0c7a-70e4-9b3c-5d8a2f6e1c49",
      "organization_id": "01a14eb3-c5f0-7c55-8c2e-6a0e1f7b9d21",
      "account_id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
      "email": "eva.ek@example.se",
      "name": "Eva Ek",
      "title": null,
      "phone": "+46 70 123 45 67",
      "crm_external_id": null,
      "crm_provider": null,
      "metadata": null,
      "created_at": "2026-09-14T10:03:51.000000Z",
      "updated_at": "2026-09-14T10:03:51.000000Z",
      "deleted_at": null
    },
    "dates": {
      "issue_date": "2026-10-18",
      "due_date": "2026-11-07",
      "delivery_date": "2026-10-16",
      "payment_terms_days": 20,
      "days_overdue": 0
    },
    "references": {
      "your_reference": "Eva Ek",
      "our_reference": "Anna Lindqvist",
      "ocr_reference": "10421"
    },
    "amounts": {
      "currency": "SEK",
      "net_cents": 195000,
      "vat_cents": 48750,
      "rounding_cents": 50,
      "total_cents": 243800,
      "paid_cents": 0,
      "outstanding_cents": 131300,
      "vat_by_rate": [
        {
          "rate": 25,
          "net_cents": 195000,
          "vat_cents": 48750
        }
      ]
    },
    "rot_rut": {
      "type": "rut",
      "work_type": "Stadning",
      "requested_cents": 112500,
      "approved_cents": 0,
      "refused_cents": 0,
      "status": "none",
      "customer_pays_cents": 131300,
      "annual_ceiling_applied": false,
      "tax_profile_id": null,
      "buyer": null
    },
    "lines": [
      {
        "id": "01a15b02-7c2e-7148-a9f3-6d2b8e5c1f40",
        "sort_order": 0,
        "description": "Hemstädning",
        "quantity": 4,
        "unit": "tim",
        "unit_price_cents": 45000,
        "discount_percent": 0,
        "vat_rate": 25,
        "net_cents": 180000,
        "vat_cents": 45000,
        "total_cents": 225000,
        "line_type": "labour",
        "rot_rut_eligible": true,
        "rot_rut_work_type": "Stadning",
        "is_generated": false,
        "account_code": "3001",
        "article_id": "01a159f8-2d6a-7b3e-9f1c-8e4a2d7b5c63",
        "work_order_id": null,
        "time_entry_id": null,
        "metadata": []
      },
      {
        "id": "01a15b02-7c41-72d6-b5e8-1a7f3c9d2e85",
        "sort_order": 1,
        "description": "Rengöringsmedel",
        "quantity": 1,
        "unit": "st",
        "unit_price_cents": 15000,
        "discount_percent": 0,
        "vat_rate": 25,
        "net_cents": 15000,
        "vat_cents": 3750,
        "total_cents": 18750,
        "line_type": "goods",
        "rot_rut_eligible": false,
        "rot_rut_work_type": null,
        "is_generated": false,
        "account_code": null,
        "article_id": null,
        "work_order_id": null,
        "time_entry_id": null,
        "metadata": []
      },
      {
        "id": "01a15b02-7c53-7a9c-8e1d-4b6f2a8c5d19",
        "sort_order": 2,
        "description": "RUT-avdrag, 50 % av arbetskostnad inkl. moms",
        "quantity": 1,
        "unit": null,
        "unit_price_cents": -112500,
        "discount_percent": 0,
        "vat_rate": 0,
        "net_cents": -112500,
        "vat_cents": 0,
        "total_cents": -112500,
        "line_type": "rot_rut_deduction",
        "rot_rut_eligible": false,
        "rot_rut_work_type": null,
        "is_generated": true,
        "account_code": null,
        "article_id": null,
        "work_order_id": null,
        "time_entry_id": null,
        "metadata": {
          "eligible_gross_cents": 225000,
          "rate_percent": 50,
          "customer_pays_cents": 131300,
          "annual_ceiling_applied": false
        }
      }
    ],
    "delivery_method": "email",
    "delivery": null,
    "delivery_failure": null,
    "sent_at": "2026-10-18T09:20:44+00:00",
    "viewed_at": "2026-10-18T17:02:31+00:00",
    "notes": null,
    "created_at": "2026-10-17T15:02:10+00:00",
    "updated_at": "2026-10-18T09:20:44+00:00"
  }
}

Path parameters

  • invoicestring(uuid)required

    The invoice's or credit note's id.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired

      An invoice or credit note.

      • idstring(uuid)required
      • typestringrequired

        One ofinvoicecredit_note

      • invoice_numberstringnullablerequired

        Null on a draft; allocated at send.

      • seriesstringrequired

        A unless chosen otherwise; credit notes K + the invoice's series.

      • referencestringrequired

        The number as said out loud — A-1042 — or Utkast for a draft.

      • statusstringrequired

        See the status table in the Invoices section.

        One ofdraftsentpartially_paidpaidoverduecreditedcancelledwritten_off

      • status_labelstringrequired

        The status in Swedish, as printed: Utkast, Skickad, Delbetald, Betald, Förfallen, Krediterad, Makulerad, Avskriven.

      • is_editablebooleanrequired

        True only for a draft.

      • handoverobjectnullablerequired

        The accepted quote this invoice was drafted from — for an organization with invoicing and no scheduling — or null.

      • customerobjectrequired
      • contactobjectnullable

        The person the invoice is addressed to. Only on a single invoice.

      • datesobjectrequired
      • referencesobjectrequired
      • amountsobjectrequired

        Integers in öre.

      • rot_rutobjectrequired

        The tax deduction on the invoice, kept apart from what the customer owes.

      • linesarray of objects

        Absent from lists.

      • delivery_methodstringrequired

        One ofemailpeppolprint

      • deliveryobjectnullablerequired

        Where Closepact emailed the invoice. automatic is true when a recurring invoice agreement sent it; status is queued for a send from the panel or API (handed to the mail queue) and sent for an automatic one (accepted by the mail server before the invoice counted as sent). Null when nothing was emailed — Peppol and print are not delivered by Closepact.

      • delivery_failureobjectnullablerequired

        Why a recurring invoice agreement that was meant to send this invoice did not. The invoice is then still a draft, without a number.

      • sent_atstring(date-time)nullablerequired
      • viewed_atstring(date-time)nullablerequired

        When the customer first opened the emailed invoice.

      • notesstringnullablerequired

        Printed on the invoice. On a credit note, the reason.

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Update an invoice draft

PATCH/invoices/{invoice}
Scope write Module Invoicing Permission invoicing.invoices.manage

Changes the header of a draft — customer, contact, dates, terms, references, ROT/RUT, delivery method, notes. Only the fields you send change.

  • Changing payment_terms_days or issue_date without sending due_date moves the due date with them.
  • Changing account_id takes the new customer's payment terms unless you send your own.
  • Changing rot_rut adds, recalculates or removes the deduction line at once.

An issued invoice answers 409: correct it with a credit note.

curl -X PATCH 'https://api.closepact.com/v1/api/invoices/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "payment_terms_days": 30,
  "notes": "Gäller städning vecka 42."
}'
Response · 200
{
  "data": {
    "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "type": "invoice",
    "invoice_number": "string",
    "series": "string",
    "reference": "string",
    "status": "draft",
    "status_label": "string",
    "is_editable": true,
    "handover": {
      "quote_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "quote_number": "string",
      "created_automatically": true,
      "warnings": [
        {
          "code": "string",
          "message": "A short description."
        }
      ]
    },
    "customer": {
      "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "name": "Anna Lindqvist",
      "customer_number": "string",
      "payment_terms_days": 1
    },
    "contact": {
      "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "organization_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "account_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "email": "anna@nordiskfastighet.se",
      "name": "Anna Lindqvist",
      "title": "Quarterly window cleaning",
      "phone": "+46701234567",
      "crm_external_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "crm_provider": "string",
      "metadata": {},
      "created_at": "2026-10-18T09:30:00Z",
      "updated_at": "2026-10-18T09:30:00Z",
      "deleted_at": "2026-10-18T09:30:00Z"
    },
    "dates": {
      "issue_date": "2026-10-18",
      "due_date": "2026-10-18",
      "delivery_date": "2026-10-18",
      "payment_terms_days": 1,
      "days_overdue": 1
    },
    "references": {
      "your_reference": "string",
      "our_reference": "string",
      "ocr_reference": "string"
    },
    "amounts": {
      "currency": "SEK",
      "net_cents": 125000,
      "vat_cents": 125000,
      "rounding_cents": 125000,
      "total_cents": 125000,
      "paid_cents": 125000,
      "outstanding_cents": 125000,
      "vat_by_rate": [
        {
          "rate": 1,
          "net_cents": 125000,
          "vat_cents": 125000
        }
      ]
    },
    "rot_rut": {
      "type": "none",
      "work_type": "Bygg",
      "requested_cents": 125000,
      "approved_cents": 125000,
      "refused_cents": 125000,
      "status": "none",
      "customer_pays_cents": 125000,
      "annual_ceiling_applied": false,
      "tax_profile_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "buyer": {
        "name": "Anna Lindqvist",
        "personal_number_masked": "string",
        "property_designation": "string",
        "brf_org_number": "556677-8899",
        "apartment_number": "string",
        "work_address": "Södra Hamngatan 1"
      }
    },
    "lines": [
      {
        "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "sort_order": 1,
        "description": "A short description.",
        "quantity": 1,
        "unit": "string",
        "unit_price_cents": 125000,
        "discount_percent": 25,
        "vat_rate": 25,
        "net_cents": 125000,
        "vat_cents": 125000,
        "total_cents": 125000,
        "line_type": "goods",
        "rot_rut_eligible": true,
        "rot_rut_work_type": "Bygg",
        "is_generated": true,
        "account_code": "string",
        "article_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "work_order_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "time_entry_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "metadata": {}
      }
    ],
    "delivery_method": "email",
    "delivery": {
      "method": "email",
      "to": "anna@nordiskfastighet.se",
      "at": "2026-10-18T09:30:00Z",
      "automatic": true,
      "status": "queued"
    },
    "delivery_failure": {
      "at": "2026-10-18T09:30:00Z",
      "reason": "string",
      "automatic": true
    },
    "sent_at": "2026-10-18T09:30:00Z",
    "viewed_at": "2026-10-18T09:30:00Z",
    "notes": "A short description.",
    "created_at": "2026-10-18T09:30:00Z",
    "updated_at": "2026-10-18T09:30:00Z"
  }
}

Path parameters

  • invoicestring(uuid)required

    The invoice's or credit note's id.

Request body

application/json · required

The writable header fields of an invoice draft. On update every field is optional.

  • account_idstring(uuid)

    The customer.

  • contact_idstring(uuid)nullable

    The person at the customer it is addressed to; their email is where it is sent.

  • sub_entity_idstring(uuid)nullable

    The office issuing it, for organizations with several.

  • issue_datestring(date)nullable

    Provisional; replaced by the send date.

  • due_datestring(date)nullable

    Provisional; replaced by send date + payment terms.

  • delivery_datestring(date)nullable
  • payment_terms_daysinteger

    0–365

  • currencystring

    exactly 3 characters

  • your_referencestringnullable

    at most 128 characters

  • our_referencestringnullable

    at most 128 characters

  • seriesstring

    Number series. Each series is numbered on its own.

    Default "A"at most 8 characters

  • rot_rutstring

    ROT and RUT are included from the Väx tier of invoicing (invoicing.tax_deduction); setting rot or rut without it is answered 402 with that feature. none is always accepted.

    One ofnonerotrut

    Default "none"

  • rot_rut_work_typestringnullable

    Skatteverket's category for the work on every line that names none of its own (rot_rut_work_type on the line). The claim to Skatteverket declares the labour, hours and material per category.

    One ofByggElGlasPlatarbeteMarkDraneringarbeteMurningMalningTapetseringVvsStadningKladOchTextilvardSnoskottningTradgardsarbeteBarnpassningPersonligomsorgFlyttjansterItTjansterReparationAvVitvarorMobleringTillsynAvBostadTransportTillForsaljningTvattVidTvattinrattning

  • tax_profile_idstring(uuid)nullable

    Which of the customer's ROT/RUT tax profiles the deduction is claimed for. Must belong to the invoice's customer. Left out on a ROT/RUT invoice, the customer's only profile (or the one tied to the work order's service address) is used.

  • delivery_methodstring

    One ofemailpeppolprint

    Default "email"

  • notesstringnullable

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired

      An invoice or credit note.

      • idstring(uuid)required
      • typestringrequired

        One ofinvoicecredit_note

      • invoice_numberstringnullablerequired

        Null on a draft; allocated at send.

      • seriesstringrequired

        A unless chosen otherwise; credit notes K + the invoice's series.

      • referencestringrequired

        The number as said out loud — A-1042 — or Utkast for a draft.

      • statusstringrequired

        See the status table in the Invoices section.

        One ofdraftsentpartially_paidpaidoverduecreditedcancelledwritten_off

      • status_labelstringrequired

        The status in Swedish, as printed: Utkast, Skickad, Delbetald, Betald, Förfallen, Krediterad, Makulerad, Avskriven.

      • is_editablebooleanrequired

        True only for a draft.

      • handoverobjectnullablerequired

        The accepted quote this invoice was drafted from — for an organization with invoicing and no scheduling — or null.

      • customerobjectrequired
      • contactobjectnullable

        The person the invoice is addressed to. Only on a single invoice.

      • datesobjectrequired
      • referencesobjectrequired
      • amountsobjectrequired

        Integers in öre.

      • rot_rutobjectrequired

        The tax deduction on the invoice, kept apart from what the customer owes.

      • linesarray of objects

        Absent from lists.

      • delivery_methodstringrequired

        One ofemailpeppolprint

      • deliveryobjectnullablerequired

        Where Closepact emailed the invoice. automatic is true when a recurring invoice agreement sent it; status is queued for a send from the panel or API (handed to the mail queue) and sent for an automatic one (accepted by the mail server before the invoice counted as sent). Null when nothing was emailed — Peppol and print are not delivered by Closepact.

      • delivery_failureobjectnullablerequired

        Why a recurring invoice agreement that was meant to send this invoice did not. The invoice is then still a draft, without a number.

      • sent_atstring(date-time)nullablerequired
      • viewed_atstring(date-time)nullablerequired

        When the customer first opened the emailed invoice.

      • notesstringnullablerequired

        Printed on the invoice. On a credit note, the reason.

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 409The request is well-formed but the invoice's state does not allow it — for example it has already been issued, has no lines, or has been credited in full. error is always conflict; the message says what to do instead.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Delete an invoice draft

DELETE/invoices/{invoice}
Scope write Module Invoicing Permission invoicing.invoices.manage

Throws a draft away. A draft never took a number, so nothing is left to explain. An issued invoice cannot be deleted — it has to be kept for seven years — and answers 409; correct it with a credit note instead.

curl -X DELETE 'https://api.closepact.com/v1/api/invoices/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "deleted": true
}

Path parameters

  • invoicestring(uuid)required

    The invoice's or credit note's id.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • deletedbooleanrequired

      One oftrue

  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 409The request is well-formed but the invoice's state does not allow it — for example it has already been issued, has no lines, or has been credited in full. error is always conflict; the message says what to do instead.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Send (issue) an invoice

POST/invoices/{invoice}/send
Scope write Module Invoicing Permission invoicing.invoices.send

Turns a draft into an invoice and delivers it. This is the irreversible step, and it needs its own permission, invoicing.invoices.send.

In one transaction the invoice:

  1. takes the next number in its series and gets its OCR reference;
  2. is dated today by the Swedish calendar, with the due date payment_terms_days later;
  3. has its totals summed from the lines and its ROT/RUT request fixed;
  4. becomes sent, and its PDF is rendered and stored — that file is what GET /invoices/{invoice}/pdf serves from now on.

Then, for delivery_method: email, it is emailed with the PDF attached to to, or else to the invoice's contact, or else to the customer's reminder_email. peppol and print are recorded but not delivered by Closepact; delivered is null for them and you deliver the PDF yourself.

Before anything is spent: an invoice that is already issued answers 409 (a retried request is therefore safe — it cannot take a second number), an invoice without lines 409, and an email invoice with nowhere to send it 422 on to, leaving the draft untouched.

The response is the issued invoice as stored — its database row with lines, account and contact — which is a different shape from GET /invoices/{invoice}; fetch that if you want the usual one.

curl -X POST 'https://api.closepact.com/v1/api/invoices/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40/send' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "eva.ek@example.se"
}'
Response · 200
{
  "data": {
    "id": "01a15b02-7c14-7e2b-8d5a-3f9c1e6b4a27",
    "organization_id": "01a14eb3-c5f0-7c55-8c2e-6a0e1f7b9d21",
    "sub_entity_id": null,
    "invoice_number": "1042",
    "series": "A",
    "type": "invoice",
    "credited_invoice_id": null,
    "account_id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
    "contact_id": "01a15a21-0c7a-70e4-9b3c-5d8a2f6e1c49",
    "status": "sent",
    "issue_date": "2026-10-18T00:00:00.000000Z",
    "due_date": "2026-11-07T00:00:00.000000Z",
    "delivery_date": "2026-10-16T00:00:00.000000Z",
    "currency": "SEK",
    "your_reference": "Eva Ek",
    "our_reference": "Anna Lindqvist",
    "payment_terms_days": 20,
    "net_cents": 195000,
    "vat_cents": 48750,
    "rounding_cents": 50,
    "total_cents": 243800,
    "rot_rut": "rut",
    "rot_rut_work_type": "Stadning",
    "rot_rut_requested_cents": 112500,
    "rot_rut_approved_cents": 0,
    "rot_rut_refused_cents": 0,
    "rot_rut_status": "pending",
    "tax_profile_id": null,
    "paid_cents": 0,
    "ocr_reference": "10421",
    "delivery_method": "email",
    "sent_at": "2026-10-18T09:20:44.000000Z",
    "viewed_at": null,
    "reminder_count": 0,
    "last_reminder_at": null,
    "pdf_document_id": "01a15b02-8f61-7c3a-b4d2-9e1f6a3c8b05",
    "sie_exported_at": null,
    "external_ref": [],
    "notes": null,
    "metadata": {
      "vat_by_rate": [
        {
          "rate": 25,
          "net_cents": 195000,
          "vat_cents": 48750
        }
      ],
      "deduction": {
        "type": "rut",
        "rate_percent": 50,
        "eligible_gross_cents": 225000,
        "deduction_cents": 112500,
        "customer_pays_cents": 131300,
        "annual_ceiling_applied": false
      },
      "delivery": {
        "method": "email",
        "to": "eva.ek@example.se",
        "at": "2026-10-18T09:20:44+00:00",
        "automatic": false,
        "status": "queued"
      }
    },
    "created_by": "01a14eb3-c634-7238-bc76-18b09b287f98",
    "created_at": "2026-10-17T15:02:10.000000Z",
    "updated_at": "2026-10-18T09:20:44.000000Z",
    "deleted_at": null,
    "recurring_invoice_id": null,
    "occurrence_date": null,
    "lines": [
      {
        "id": "01a15b02-7c2e-7148-a9f3-6d2b8e5c1f40",
        "customer_invoice_id": "01a15b02-7c14-7e2b-8d5a-3f9c1e6b4a27",
        "organization_id": "01a14eb3-c5f0-7c55-8c2e-6a0e1f7b9d21",
        "sort_order": 0,
        "article_id": "01a159f8-2d6a-7b3e-9f1c-8e4a2d7b5c63",
        "work_order_id": null,
        "time_entry_id": null,
        "description": "Hemstädning",
        "quantity": 4,
        "unit": "tim",
        "unit_price_cents": 45000,
        "discount_percent": 0,
        "vat_rate": 25,
        "net_cents": 180000,
        "vat_cents": 45000,
        "total_cents": 225000,
        "line_type": "labour",
        "rot_rut_eligible": true,
        "rot_rut_work_type": "Stadning",
        "account_code": "3001",
        "metadata": [],
        "created_at": "2026-10-17T15:03:40.000000Z",
        "updated_at": "2026-10-17T15:03:40.000000Z"
      }
    ],
    "account": {
      "id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
      "organization_id": "01a14eb3-c5f0-7c55-8c2e-6a0e1f7b9d21",
      "name": "Eva Ek",
      "domain": null,
      "industry": null,
      "size": null,
      "country": "SE",
      "crm_external_id": null,
      "crm_provider": null,
      "metadata": null,
      "created_at": "2026-09-14T10:03:51.000000Z",
      "updated_at": "2026-09-14T10:03:51.000000Z",
      "deleted_at": null,
      "sub_entity_id": null,
      "customer_number": "1043",
      "customer_type": "private",
      "org_number": null,
      "vat_number": null,
      "industry_code": null,
      "payment_terms_days": 20,
      "late_interest_percent": null,
      "vat_mode": "se",
      "invoice_delivery": "email",
      "peppol_id": null,
      "einvoice_reference": null,
      "reminder_email": null,
      "currency": "SEK",
      "locale": "sv",
      "default_price_list_id": null,
      "credit_limit_cents": null,
      "is_blocked": false,
      "notes": null
    },
    "contact": {
      "id": "01a15a21-0c7a-70e4-9b3c-5d8a2f6e1c49",
      "organization_id": "01a14eb3-c5f0-7c55-8c2e-6a0e1f7b9d21",
      "account_id": "01a15a21-0c44-7b19-8e2d-6f3a9c1b5d70",
      "email": "eva.ek@example.se",
      "name": "Eva Ek",
      "title": null,
      "phone": "+46 70 123 45 67",
      "crm_external_id": null,
      "crm_provider": null,
      "metadata": null,
      "created_at": "2026-09-14T10:03:51.000000Z",
      "updated_at": "2026-09-14T10:03:51.000000Z",
      "deleted_at": null
    }
  },
  "delivered": "eva.ek@example.se"
}

Path parameters

  • invoicestring(uuid)required

    The invoice's or credit note's id.

Request body

application/json

  • tostring(email)nullable

    Send to this address instead of the contact's.

    at most 320 characters

  • delivery_methodstring

    Overrides the draft's delivery method, and is saved on it.

    One ofemailpeppolprint

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired

      An invoice exactly as stored, returned by send and credit. Dates are serialized as midnight UTC timestamps. Prefer GET /invoices/{invoice} for display.

      • idstring(uuid)required
      • organization_idstring(uuid)required
      • sub_entity_idstring(uuid)nullablerequired
      • invoice_numberstringnullablerequired
      • seriesstringrequired
      • typestringrequired

        One ofinvoicecredit_note

      • credited_invoice_idstring(uuid)nullablerequired

        On a credit note, the invoice it credits.

      • account_idstring(uuid)required
      • contact_idstring(uuid)nullablerequired
      • statusstringrequired

        See the status table in the Invoices section.

        One ofdraftsentpartially_paidpaidoverduecreditedcancelledwritten_off

      • issue_datestring(date-time)nullablerequired
      • due_datestring(date-time)nullablerequired
      • delivery_datestring(date-time)nullablerequired
      • currencystringrequired
      • your_referencestringnullablerequired
      • our_referencestringnullablerequired
      • payment_terms_daysintegerrequired
      • net_centsintegerrequired
      • vat_centsintegerrequired
      • rounding_centsintegerrequired
      • total_centsintegerrequired
      • rot_rutstringrequired

        One ofnonerotrut

      • rot_rut_work_typestringnullablerequired

        Skatteverket's category for ROT or RUT work, as named in its claim file schema (version 6): Bygg to Vvs are ROT, Stadning to TvattVidTvattinrattning RUT. TransportTillForsaljning and TvattVidTvattinrattning are flat-rate services that are claimed without hours or material. Read when the claim to Skatteverket is filed; null when none is chosen.

        One ofByggElGlasPlatarbeteMarkDraneringarbeteMurningMalningTapetseringVvsStadningKladOchTextilvardSnoskottningTradgardsarbeteBarnpassningPersonligomsorgFlyttjansterItTjansterReparationAvVitvarorMobleringTillsynAvBostadTransportTillForsaljningTvattVidTvattinrattning

      • rot_rut_requested_centsintegerrequired
      • rot_rut_approved_centsintegerrequired
      • rot_rut_refused_centsintegerrequired

        What Skatteverket refused of the deduction; owed by the customer again.

      • rot_rut_statusstringrequired
      • tax_profile_idstring(uuid)nullablerequired

        The ROT/RUT tax profile the deduction is claimed for.

      • paid_centsintegerrequired
      • ocr_referencestringnullablerequired
      • delivery_methodstringrequired

        One ofemailpeppolprint

      • sent_atstring(date-time)nullablerequired
      • viewed_atstring(date-time)nullablerequired
      • reminder_countintegerrequired
      • last_reminder_atstring(date-time)nullablerequired
      • pdf_document_idstring(uuid)nullablerequired

        The stored PDF. Download it with GET /invoices/{invoice}/pdf.

      • sie_exported_atstring(date-time)nullablerequired

        When the invoice went to the books in an SIE export.

      • external_refobject | array of valuesnullablerequired
      • notesstringnullablerequired
      • metadataobject | array of valuesnullablerequired

        Working figures — vat_by_rate, deduction, credits, source, delivery — not a stable contract. GET /invoices/{invoice} carries delivery as a documented field.

      • created_bystring(uuid)nullablerequired
      • created_atstring(date-time)required
      • updated_atstring(date-time)required
      • deleted_atstring(date-time)nullablerequired
      • recurring_invoice_idstring(uuid)nullable

        The recurring invoice that produced it.

      • occurrence_datestringnullable

        For a recurring invoice, the period it bills.

      • quote_idstring(uuid)nullable

        The accepted quote the invoice was drafted from, for an organization that invoices without scheduling.

      • linesarray of objects
      • accountobject

        The invoiced customer exactly as stored. The field names are the storage names: invoice_delivery and einvoice_reference are invoicing.delivery and invoicing.reference on a Customer.

      • contactobjectnullable
      • credited_invoiceanynullable

        On a credit note from POST /invoices/{invoice}/credit: the original invoice, as stored.

    • deliveredstringnullablerequired

      The address the invoice was emailed to, or null when nothing was sent (peppol, print).

  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 409The request is well-formed but the invoice's state does not allow it — for example it has already been issued, has no lines, or has been credited in full. error is always conflict; the message says what to do instead.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Credit an issued invoice

POST/invoices/{invoice}/credit
Scope write Module Invoicing Permission invoicing.credit

Corrects an issued invoice by raising a credit note (kreditfaktura) against it. The original is never edited.

The body chooses how much:

  • nothing — the whole invoice, every line mirrored with negative quantities;
  • lines — some lines, each for its full quantity or for part of it (quantity, at most what was invoiced);
  • amount_cents — an agreed sum (net, in öre, at vat_rate, default 25) that corresponds to no line. Not combined with lines.

The credit note is issued immediately: it gets its own number in the credit series (K + the invoice's series, so KA-17), no OCR reference, today's date and a stored PDF, and it is emailed when the invoice has a recipient — though, unlike sending, a missing address does not stop it. When the invoice has been credited in full it becomes credited and is no longer chased.

Refused with 409 for a draft (edit it instead), for a credit note, for an invoice already credited in full, and for more than remains to credit. Whether a ROT/RUT claim already filed with Skatteverket is withdrawn is handled in Closepact's deduction workflow, not by the credit note.

Like sending, the response is the credit note as stored, with credited_invoice holding the original.

curl -X POST 'https://api.closepact.com/v1/api/invoices/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40/credit' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Fakturan skickades till fel kund."
}'
Response · 201
{
  "data": {
    "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "organization_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "sub_entity_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "invoice_number": "string",
    "series": "string",
    "type": "invoice",
    "credited_invoice_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "account_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "contact_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "status": "draft",
    "issue_date": "2026-10-18T09:30:00Z",
    "due_date": "2026-10-18T09:30:00Z",
    "delivery_date": "2026-10-18T09:30:00Z",
    "currency": "SEK",
    "your_reference": "string",
    "our_reference": "string",
    "payment_terms_days": 1,
    "net_cents": 125000,
    "vat_cents": 125000,
    "rounding_cents": 125000,
    "total_cents": 125000,
    "rot_rut": "none",
    "rot_rut_work_type": "Bygg",
    "rot_rut_requested_cents": 125000,
    "rot_rut_approved_cents": 125000,
    "rot_rut_refused_cents": 125000,
    "rot_rut_status": "string",
    "tax_profile_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "paid_cents": 125000,
    "ocr_reference": "string",
    "delivery_method": "email",
    "sent_at": "2026-10-18T09:30:00Z",
    "viewed_at": "2026-10-18T09:30:00Z",
    "reminder_count": 1,
    "last_reminder_at": "2026-10-18T09:30:00Z",
    "pdf_document_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "sie_exported_at": "2026-10-18T09:30:00Z",
    "external_ref": {},
    "notes": "A short description.",
    "metadata": {},
    "created_by": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "created_at": "2026-10-18T09:30:00Z",
    "updated_at": "2026-10-18T09:30:00Z",
    "deleted_at": "2026-10-18T09:30:00Z",
    "recurring_invoice_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "occurrence_date": "2026-10-18",
    "quote_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
    "lines": [
      {
        "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "customer_invoice_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "organization_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "sort_order": 1,
        "article_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "work_order_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "time_entry_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
        "description": "A short description.",
        "quantity": 1,
        "unit": "string",
        "unit_price_cents": 125000,
        "discount_percent": 25,
        "vat_rate": 25,
        "net_cents": 125000,
        "vat_cents": 125000,
        "total_cents": 125000,
        "line_type": "goods",
        "rot_rut_eligible": true,
        "rot_rut_work_type": "Bygg",
        "account_code": "string",
        "metadata": {},
        "created_at": "2026-10-18T09:30:00Z",
        "updated_at": "2026-10-18T09:30:00Z"
      }
    ],
    "account": {
      "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "organization_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "name": "Anna Lindqvist",
      "domain": "string",
      "industry": "string",
      "size": "string",
      "country": "SE",
      "crm_external_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "crm_provider": "string",
      "metadata": {},
      "created_at": "2026-10-18T09:30:00Z",
      "updated_at": "2026-10-18T09:30:00Z",
      "deleted_at": "2026-10-18T09:30:00Z",
      "sub_entity_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "customer_number": "string",
      "customer_type": "company",
      "org_number": "556677-8899",
      "vat_number": "SE556677889901",
      "industry_code": "string",
      "payment_terms_days": 1,
      "late_interest_percent": 25,
      "vat_mode": "se",
      "invoice_delivery": "email",
      "peppol_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "einvoice_reference": "string",
      "reminder_email": "anna@nordiskfastighet.se",
      "currency": "SEK",
      "locale": "sv",
      "default_price_list_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "credit_limit_cents": 125000,
      "is_blocked": true,
      "notes": "A short description."
    },
    "contact": {
      "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "organization_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "account_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "email": "anna@nordiskfastighet.se",
      "name": "Anna Lindqvist",
      "title": "Quarterly window cleaning",
      "phone": "+46701234567",
      "crm_external_id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
      "crm_provider": "string",
      "metadata": {},
      "created_at": "2026-10-18T09:30:00Z",
      "updated_at": "2026-10-18T09:30:00Z",
      "deleted_at": "2026-10-18T09:30:00Z"
    },
    "credited_invoice": {}
  }
}

Path parameters

  • invoicestring(uuid)required

    The invoice's or credit note's id.

Request body

application/json

  • reasonstringnullable

    Printed on the credit note.

    at most 500 characters

  • linesarray of objects
  • amount_centsinteger

    Credit this net amount in öre instead of lines.

    ≥ 1

  • vat_ratenumber

    With amount_cents: the VAT rate the amount was charged at.

    One of251260

    Default 25

  • descriptionstringnullable

    With amount_cents: the credit line's text. Defaults to Kreditering av faktura A-1042.

    at most 500 characters

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired

      An invoice exactly as stored, returned by send and credit. Dates are serialized as midnight UTC timestamps. Prefer GET /invoices/{invoice} for display.

      • idstring(uuid)required
      • organization_idstring(uuid)required
      • sub_entity_idstring(uuid)nullablerequired
      • invoice_numberstringnullablerequired
      • seriesstringrequired
      • typestringrequired

        One ofinvoicecredit_note

      • credited_invoice_idstring(uuid)nullablerequired

        On a credit note, the invoice it credits.

      • account_idstring(uuid)required
      • contact_idstring(uuid)nullablerequired
      • statusstringrequired

        See the status table in the Invoices section.

        One ofdraftsentpartially_paidpaidoverduecreditedcancelledwritten_off

      • issue_datestring(date-time)nullablerequired
      • due_datestring(date-time)nullablerequired
      • delivery_datestring(date-time)nullablerequired
      • currencystringrequired
      • your_referencestringnullablerequired
      • our_referencestringnullablerequired
      • payment_terms_daysintegerrequired
      • net_centsintegerrequired
      • vat_centsintegerrequired
      • rounding_centsintegerrequired
      • total_centsintegerrequired
      • rot_rutstringrequired

        One ofnonerotrut

      • rot_rut_work_typestringnullablerequired

        Skatteverket's category for ROT or RUT work, as named in its claim file schema (version 6): Bygg to Vvs are ROT, Stadning to TvattVidTvattinrattning RUT. TransportTillForsaljning and TvattVidTvattinrattning are flat-rate services that are claimed without hours or material. Read when the claim to Skatteverket is filed; null when none is chosen.

        One ofByggElGlasPlatarbeteMarkDraneringarbeteMurningMalningTapetseringVvsStadningKladOchTextilvardSnoskottningTradgardsarbeteBarnpassningPersonligomsorgFlyttjansterItTjansterReparationAvVitvarorMobleringTillsynAvBostadTransportTillForsaljningTvattVidTvattinrattning

      • rot_rut_requested_centsintegerrequired
      • rot_rut_approved_centsintegerrequired
      • rot_rut_refused_centsintegerrequired

        What Skatteverket refused of the deduction; owed by the customer again.

      • rot_rut_statusstringrequired
      • tax_profile_idstring(uuid)nullablerequired

        The ROT/RUT tax profile the deduction is claimed for.

      • paid_centsintegerrequired
      • ocr_referencestringnullablerequired
      • delivery_methodstringrequired

        One ofemailpeppolprint

      • sent_atstring(date-time)nullablerequired
      • viewed_atstring(date-time)nullablerequired
      • reminder_countintegerrequired
      • last_reminder_atstring(date-time)nullablerequired
      • pdf_document_idstring(uuid)nullablerequired

        The stored PDF. Download it with GET /invoices/{invoice}/pdf.

      • sie_exported_atstring(date-time)nullablerequired

        When the invoice went to the books in an SIE export.

      • external_refobject | array of valuesnullablerequired
      • notesstringnullablerequired
      • metadataobject | array of valuesnullablerequired

        Working figures — vat_by_rate, deduction, credits, source, delivery — not a stable contract. GET /invoices/{invoice} carries delivery as a documented field.

      • created_bystring(uuid)nullablerequired
      • created_atstring(date-time)required
      • updated_atstring(date-time)required
      • deleted_atstring(date-time)nullablerequired
      • recurring_invoice_idstring(uuid)nullable

        The recurring invoice that produced it.

      • occurrence_datestringnullable

        For a recurring invoice, the period it bills.

      • quote_idstring(uuid)nullable

        The accepted quote the invoice was drafted from, for an organization that invoices without scheduling.

      • linesarray of objects
      • accountobject

        The invoiced customer exactly as stored. The field names are the storage names: invoice_delivery and einvoice_reference are invoicing.delivery and invoicing.reference on a Customer.

      • contactobjectnullable
      • credited_invoiceanynullable

        On a credit note from POST /invoices/{invoice}/credit: the original invoice, as stored.

  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 409The request is well-formed but the invoice's state does not allow it — for example it has already been issued, has no lines, or has been credited in full. error is always conflict; the message says what to do instead.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Download the PDF

GET/invoices/{invoice}/pdf

The invoice document itself, as application/pdf bytes in the response body (served inline, with a file name in Content-Disposition). There is no signed URL to fetch; download it with the API key.

  • Issued invoice or credit note: exactly the file stored when it was sent — the one the customer received — never re-rendered, so it stays identical for the seven years it has to be kept. If that file has gone missing the answer is 409 rather than a lookalike.
  • Draft: a preview rendered on the spot, watermarked, with no number and no OCR reference, named …-utkast.pdf. It is not an invoice and must not be handed over as one.

No extra permission: an organization whose invoicing module has lapsed can still fetch its old invoices for an auditor.

curl 'https://api.closepact.com/v1/api/invoices/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40/pdf' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
"(binary)"

Path parameters

  • invoicestring(uuid)required

    The invoice's or credit note's id.

Responses

  • Headers

    • Content-Disposition — inline; filename="…".
    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.

    string(binary)

  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 409The request is well-formed but the invoice's state does not allow it — for example it has already been issued, has no lines, or has been credited in full. error is always conflict; the message says what to do instead.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

List an invoice's payment reminders

GET/invoices/{invoice}/reminders

The payment reminders (påminnelser) sent for the invoice, with the fee and interest each one charged — figures your bookkeeping needs, because the customer was told them — and what the next reminder would be.

There are three levels and at most one reminder per level. Levels 1 and 2 can go out automatically on the organization's schedule; level 3 announces that the debt goes to collection and is only ever sent by a person in Closepact. next_level_refusal says why the next reminder could not be sent now (for example This invoice is not overdue yet.), or is null when it could. Sending reminders is not available through the API.

curl 'https://api.closepact.com/v1/api/invoices/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40/reminders' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "data": {
    "reminders": [
      {
        "id": "01a15d33-4c8e-7b15-a6f9-1d3e7c2b5a84",
        "customer_invoice_id": "01a15b02-7c14-7e2b-8d5a-3f9c1e6b4a27",
        "level": 1,
        "sent_at": "2026-11-15T06:00:12+00:00",
        "fee_cents": 6000,
        "interest_percent": 10.5,
        "interest_cents": 302,
        "channel": "email",
        "created_by": null,
        "metadata": [],
        "created_at": "2026-11-15T06:00:12+00:00"
      }
    ],
    "next_level": 2,
    "next_level_refusal": null,
    "automatic_up_to": 2,
    "outstanding_cents": 131300,
    "days_overdue": 8
  }
}

Path parameters

  • invoicestring(uuid)required

    The invoice's or credit note's id.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired
      • remindersarray of objectsrequired
      • next_levelintegernullablerequired

        Null once all three levels have been sent.

        1–3

      • next_level_refusalstringnullablerequired

        Why the next level cannot be sent now; null when it can.

      • automatic_up_tointegerrequired

        The highest level the schedule sends by itself.

      • outstanding_centsintegerrequired

        What the customer still owes, excluding a ROT/RUT share.

      • days_overdueintegerrequired
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors