Menu

Packages

The packages a company switches (Lön, Kundfakturor, Kassa och webbshop, ...) with their status: on, off, winding down (switched off while obligations are open: visible, no new work starts), not in plan or not in country. Switching one on or off is staged for an owner or admin to approve.

Endpoints


GET /api/v1/companies/:companyId/packages

packages.list · scope companies:read

List the company packages with their status and what keeps a switched-off one winding down.

Every package (Bokföring, Bank, Kundfakturor, Leverantörsfakturor och betalningar, Kvitton och underlag, Utlägg, Lön, Inventarier, Kassa och webbshop) with its availability: on, off, winding_down, not_in_plan or not_in_country. A package switched off while something is still open in it (an unbooked salary run, an unfiled AGI, an unpaid invoice) is winding_down: its pages and tools stay, no new work starts in it (start doors answer PACKAGE_OFF), and open_obligations names what keeps it there. Also the profile the company started from.

Use when: A call answered PACKAGE_OFF, or before proposing to switch a package on or off.

Don't use for: The module report and resolutions (GET /capabilities).

Pitfalls

  • A package outside the plan stays visible; its paid features answer at the call.
  • open_obligations is read only for packages that are switched off.

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Response fields

NameType
profileobject
packagesobject[]

Example response

{
  "data": {
    "profile": {
      "profile_id": "standard",
      "name_sv": "Standard (allt på)",
      "source": "implicit"
    },
    "packages": [
      {
        "package_id": "payroll",
        "name": "Payroll",
        "name_sv": "Lön",
        "switchable": true,
        "availability": "winding_down",
        "reasons": [
          "turned_off_by_company",
          "open_obligations"
        ],
        "open_obligations": [
          {
            "code": "unfiled_agi",
            "label_sv": "arbetsgivardeklarationer som inte är inlämnade",
            "label_en": "employer declarations (AGI) not yet filed"
          }
        ],
        "modules": [
          {
            "module_id": "payroll",
            "name_sv": "Lön"
          }
        ]
      }
    ]
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

POST /api/v1/companies/:companyId/packages/:packageId/disable

packages.disable · scope companies:write

Stage switching a package off, for an owner or admin to approve.

Proposes switching a package off (disable_package): its start doors close (no new invoice, salary run, asset, ...), while everything still open in it keeps working. With obligations open the package winds down: it stays visible until they are settled, then disappears. The preview names those obligations. Never refused for what is open. Send it with ?stage=true.

Use when: The user no longer uses a package (another payroll provider, no more till) and wants it out of the menu.

Don't use for: Pausing one recurring invoice or disconnecting one connection: use their own endpoints.

Pitfalls

  • Only ?stage=true: a direct call answers PACKAGE_SWITCH_STAGE_ONLY.
  • Nothing is deleted; switching the package on again brings everything back.

Risk: low · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Response fields

NameTypeDescription
package_idstring
package_namestring
enabledboolean
changedbooleanFalse when the company already had this choice.
winding_downbooleanSwitched off with obligations still open: visible until they are settled.
open_obligationsstring[]

Example request

{
  "package_id": "payroll"
}

Example response

{
  "data": {
    "package_id": "payroll",
    "package_name": "Lön",
    "enabled": false,
    "changed": true,
    "winding_down": true,
    "open_obligations": [
      "unfiled_agi"
    ]
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

POST /api/v1/companies/:companyId/packages/:packageId/enable

packages.enable · scope companies:write

Stage switching a package on, for an owner or admin to approve.

Proposes switching a package on (enable_package). Nothing changes until an owner or admin approves it, in Accounted or through the approve endpoint; the approval writes the choice with who decided and a dated line in behandlingshistorik. Refused when the plan, the country or the legal form does not offer the package. Send it with ?stage=true.

Use when: A call answered PACKAGE_OFF and the user wants to start that work, or the user asks to switch a package on.

Don't use for: Switching a package off (POST /packages/{packageId}/disable).

Pitfalls

  • Only ?stage=true: a direct call answers PACKAGE_SWITCH_STAGE_ONLY.
  • A service account's key cannot approve it: a person approves.
  • PACKAGE_NOT_FOR_LEGAL_FORM for Lön in an enskild firma that has not said it pays salaries.

Risk: low · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Response fields

NameTypeDescription
package_idstring
package_namestring
enabledboolean
changedbooleanFalse when the company already had this choice.
winding_downbooleanSwitched off with obligations still open: visible until they are settled.
open_obligationsstring[]

Example request

{
  "package_id": "payroll"
}

Example response

{
  "data": {
    "package_id": "payroll",
    "package_name": "Lön",
    "enabled": true,
    "changed": true,
    "winding_down": false,
    "open_obligations": []
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}