> ## Documentation Index
> Fetch the complete documentation index at: https://developer.findity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# V0 - Create/Update organization (externalId)

> Creates a new organization or updates an existing one, identified by its external source ID. If no organization exists with this external ID, a new one is created — `className` is required in this case. If one exists, the supplied fields are merged into it.



## OpenAPI

````yaml openapi/findity-admin-api-1.json POST /organizations/externalid/{externalId}/
openapi: 3.0.3
info:
  title: Findity Admin API
  description: ''
  version: 1.0.0
  contact:
    name: Findity Support
    email: support@findity.com
servers:
  - url: https://stage-expense.findity.com/api/admin
    description: Stage environment
  - url: https://expense.findity.com/api/admin
    description: Production environment
security:
  - bearerAuth: []
paths:
  /organizations/externalid/{externalId}/:
    post:
      tags:
        - Organizations
      summary: V0 - Create/Update organization (externalId)
      description: >-
        Creates a new organization or updates an existing one, identified by its
        external source ID. If no organization exists with this external ID, a
        new one is created — `className` is required in this case. If one
        exists, the supplied fields are merged into it.
      operationId: 257a0f44-181f-4663-a675-93b37685871f
      parameters:
        - $ref: '#/components/parameters/externalId'
        - name: Content-Type
          in: header
          schema:
            type: string
            default: application/json
            description: Standard `application/json` content type.
        - name: X-Findity-ApiVersion
          in: header
          schema:
            type: string
            default: '3'
            description: Findity API version. Use `3` for the current admin API.
      requestBody:
        description: >-
          The organization payload. When creating, `className` is required and
          must be `com.findity.consumer.Company`. When updating, only the fields
          you want to change need to be supplied.
        content:
          application/json:
            schema:
              type: object
              properties:
                vat:
                  type: string
                  example: 123456-1234
                  description: VAT or company registration number for the organization.
                partnerCode:
                  type: string
                  example: xxxx
                  description: >-
                    Code of the partner that should own this organization. The
                    partner must exist in the calling client application.
                address:
                  type: object
                  description: The organization's primary address.
                  properties:
                    city:
                      type: string
                      example: City
                      description: City.
                    country:
                      type: string
                      example: Sweden
                      description: >-
                        Country name. Either `country` + `countryCode` or
                        `countryId` should be provided.
                    postalCode:
                      type: string
                      example: '-'
                      description: Postal/ZIP code.
                    countryId:
                      type: string
                      example: 2b9fbaa2630511e18824b0dd45bff075
                      description: >-
                        Findity-internal country ID. Alternative to supplying
                        `country` + `countryCode`.
                    countryCode:
                      type: string
                      example: SE
                      description: ISO 3166-1 alpha-2 country code (e.g. `SE`).
                    street3:
                      nullable: true
                      description: Street address line 3 (optional).
                    street2:
                      nullable: true
                      description: Street address line 2 (optional).
                    street1:
                      type: string
                      example: Example street
                      description: Street address line 1.
                className:
                  type: string
                  example: com.findity.consumer.Company
                  description: >-
                    Required when creating an organization, and should then
                    always be set to com.findity.consumer.Company
                licenses:
                  type: object
                  description: >-
                    License assignments to grant the organization. Array of
                    `{type, price, quantity}` items.
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        description: License product type.
                      price:
                        type: integer
                        description: >-
                          Per-license price in the organization's billing
                          currency.
                      quantity:
                        type: integer
                        description: Number of licenses to grant.
                settings:
                  type: object
                  description: Organization-level settings. All fields are optional.
                  properties:
                    externallyActivated:
                      type: boolean
                      description: >-
                        Whether the organization was activated via external
                        onboarding flow.
                    ignoreMileageExpenseCategory:
                      type: boolean
                      description: >-
                        If true, the default mileage expense category is not
                        created for this organization.
                    templateOrganizationId:
                      type: string
                      example: xxx
                      description: >-
                        ID of a template organization to copy initial settings,
                        categories, and accounting setup from.
                    forceNonDeductableVatOnCategories:
                      type: boolean
                      description: >-
                        If true, non-deductable VAT is enforced on expense
                        categories regardless of category default.
                    errorMailRecipient:
                      type: string
                      example: errormail@ExOrg2.com
                      description: >-
                        Email address that receives error notifications for
                        failed exports.
                    ignoreSubsistenceAllowanceCategory:
                      type: boolean
                      description: >-
                        If true, the default subsistence allowance category is
                        not created.
                    recipient:
                      type: object
                      description: Default expense report recipient configuration.
                      properties:
                        fortnoxAuthCode:
                          type: string
                          example: xxx
                          description: >-
                            OAuth authorization code from Fortnox, used to set
                            up a Fortnox export recipient.
                name:
                  type: string
                  example: Example organization 2
                  description: Display name of the organization.
                externalSourceId:
                  type: string
                  example: '1234'
                  description: >-
                    The external identifier used to identify this specific
                    Organization. This variable is required if you are creating
                    or updating an Organization
        required: true
      responses:
        '200':
          description: >-
            Organization created or updated successfully. Returns the resulting
            organization object in the same shape as `GET`.
components:
  parameters:
    externalId:
      in: path
      name: externalId
      required: true
      description: The external source id of the organization
      schema:
        type: string
      example: 6aeb86c4fb154c46b2b5a1977245ac67
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````