Organizations

Create, retrieve, update, and delete organizations.

Key Concepts

An organization represents a company or entity within Findity. Each organization contains employees, expense categories, dimensions, and settings that control how expense management works for that entity.

Key properties of an organization include:

PropertyDescription
externalSourceIdA globally unique identifier from your external system, used to address the organization across API calls
nameDisplay name of the organization
vatThe organizational/company registration number
classNameAlways set to com.findity.consumer.Company when creating an organization
addressPostal address with street1, city, postalCode, countryCode (ISO 2-letter), and optionally countryId
settingsConfiguration object including templateOrganizationId, errorMailRecipient, and feature toggles
licensesLicense configuration for the organization
partnerCodePartner code linking the organization to a partner

API Endpoints

All endpoints are available under the Admin API base URL:

https://expense.findity.com/api/admin

The following operations are available:

OperationMethodEndpoint
List organizationsGET/organizations/
Get organization by external IDGET/organizations/externalid/{externalId}/
Create or update organizationPOST/organizations/externalid/{externalId}/
Delete organizationDELETE/organizations/externalid/{externalId}/
Lookup organization by VATGET/organizations/externalid/lookup/?vat={vat}
Get report countersGET/organizations/externalid/{externalId}/reportcounters/

Required Headers

Include these headers with every request:

HeaderValue
Content-Typeapplication/json
X-Findity-ApiVersion3
AuthorizationBearer {access_token}

Step 1 — List Organizations

Retrieve all organizations the current API user is administrating.

GET /organizations/

This returns an array of organization objects. Use this to discover organizations available to your API key.

Step 2 — Create or Update an Organization

Create a new organization or update an existing one by sending a POST request with the externalSourceId path parameter.

POST /organizations/externalid/{externalId}/

Request Body Properties

PropertyTypeRequiredDescription
namestringYesDisplay name of the organization
externalSourceIdstringYesExternal identifier matching the {externalId} in the URL
classNamestringYes (create only)Set to com.findity.consumer.Company when creating
vatstringNoCompany registration number
partnerCodestringNoPartner code to associate organization with a partner
addressobjectNoAddress with street1, city, postalCode, countryCode, countryId
settingsobjectNoOrganization settings (see below)
licensesobjectNoLicense configuration

Settings Object

PropertyTypeDescription
templateOrganizationIdstringID of the template organization to base a new organization on
externallyActivatedbooleanWhether the organization is externally activated
errorMailRecipientstringEmail address for error notifications
ignoreMileageExpenseCategorybooleanIgnore mileage expense categories
ignoreSubsistenceAllowanceCategorybooleanIgnore subsistence allowance categories
forceNonDeductableVatOnCategoriesbooleanForce non-deductable VAT on categories
recipientobjectRecipient settings (e.g., fortnoxAuthCode)

Example: Create a New Organization

{
  "name": "Example Organization 2",
  "externalSourceId": "1234",
  "className": "com.findity.consumer.Company",
  "vat": "123456-1234",
  "partnerCode": "xxxx",
  "address": {
    "street1": "Example street",
    "city": "City",
    "postalCode": "-",
    "countryCode": "SE"
  },
  "settings": {
    "templateOrganizationId": "xxx",
    "errorMailRecipient": "[email protected]"
  }
}

Example: Update an Existing Organization

When updating, include only the fields you want to change. The className field is not required for updates.

{
  "name": "Updated Organization Name",
  "externalSourceId": "1234",
  "address": {
    "street1": "New street 1",
    "city": "New City",
    "postalCode": "12345",
    "countryCode": "SE"
  }
}

Step 3 — Get an Organization

Retrieve a single organization by its external ID.

GET /organizations/externalid/{externalId}/

Step 4 — Delete an Organization

Delete an organization by its external ID. This operation is irreversible.

DELETE /organizations/externalid/{externalId}/
🚨

Deleting an organization removes all associated data including employees, expense reports, and settings. This action cannot be undone.

Lookup Organization by VAT

Search for an organization using its VAT/registration number. This is useful for checking whether an organization already exists before creating a new one.

GET /organizations/externalid/lookup/?vat=123456-1234

Report Counters

Retrieve expense report statistics for an organization within a date range. Use the fromDate and toDate query parameters to filter.

GET /organizations/externalid/{externalId}/reportcounters/?fromDate=2024-01-01&toDate=2024-12-31

Common Integration Patterns

Onboarding New Organizations

When onboarding a new organization from your external system:

  1. Call GET /organizations/externalid/lookup/?vat={vat} to check if the organization already exists
  2. If it does not exist, call POST /organizations/externalid/{externalId}/ with className set to com.findity.consumer.Company and a templateOrganizationId in settings to inherit configuration from a template
  3. After creation, set up users, dimensions, and other configuration
Syncing from ERP

To keep organization data in sync with your ERP:

  1. Call POST /organizations/externalid/{externalId}/ on a schedule (e.g., nightly) for each organization
  2. Include only the fields that may have changed — the endpoint performs an upsert, creating or updating as needed
  3. Use the same externalSourceId as your ERP's identifier to maintain a consistent mapping
Retrieving Report Statistics

To generate billing or usage reports:

  1. Call GET /organizations/ to list all organizations
  2. For each organization, call GET /organizations/externalid/{externalId}/reportcounters/ with the desired date range
  3. Aggregate the counters across organizations as needed
📘

The templateOrganizationId setting is only used during organization creation. It copies categories, dimensions, and other configuration from the template. Changing it after creation has no effect.


Next steps