---
title: "Update Company"
url: "https://developer.yukisoftware.com/apis/yuki-platform-api-prod-1/versions/9cdc452d-fd77-4e06-8797-f61e76134ec9/operations/updateCompany"
---

> Full API specification: https://developer.yukisoftware.com/apis/yuki-platform-api-prod-1/versions/9cdc452d-fd77-4e06-8797-f61e76134ec9.md

# Update Company

`PUT` `/domains/{domain-id}/companies/{company-id}`

Operation ID: `updateCompany`

This endpoint allows the modification of an existing company's details. Ensure you have the necessary permissions before attempting to update a company. You should have the **openid** and **yukiapi:domain:companies:update** scopes to access this endpoint. <!-- authorization:start --> **Authorization** Called with a **Portal User** token - an employee of an accounting portal. The caller must hold at least one of these roles in the portal: `AccountantManagement`, `Accountant`. <!-- authorization:end -->

## Path parameters

- `domain-id` (string, required) - The domain name
- `company-id` (string, uuid, required) - The ID of the company

## Header parameters

- `Authorization` (string, required) - Bearer token for authentication

## Request body (required)

Content types: `application/json`

## Responses

- `204` - Company updated successfully.
- `400` - Bad Request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found
- `500` - Internal Server Error

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Yuki Platform API Prod
  version: 1.0.77
servers:
  - url: https://apirest.yukiworks.be/api/v1
paths:
  /domains/{domain-id}/companies/{company-id}:
    put:
      x-environments:
        - development
        - pilot
        - production
      x-portal-visibility:
        - internal
        - trusted
        - prod
      x-required-roles:
        - any-of:
            - AccountantManagement
            - Accountant
          scope: portal
      summary: Update Company
      description: >-
        This endpoint allows the modification of an existing company's details.
        Ensure you have the necessary permissions before attempting to update a
        company. You should have the **openid** and
        **yukiapi:domain:companies:update** scopes to access this endpoint.


        <!-- authorization:start -->


        **Authorization**


        Called with a **Portal User** token - an employee of an accounting
        portal.


        The caller must hold at least one of these roles in the portal:
        `AccountantManagement`, `Accountant`.


        <!-- authorization:end -->
      operationId: updateCompany
      tags:
        - Company
      parameters:
        - $ref: "#/components/parameters/AuthorizationHeader"
        - $ref: "#/components/parameters/DomainIdPath"
        - $ref: "#/components/parameters/CompanyIdPath"
      security:
        - vismaConnectPortalUser:
            - openid
            - yukiapi:domain:companies:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCompany"
      responses:
        "204":
          description: Company updated successfully.
        "400":
          $ref: "#/components/responses/BadRequestResponse"
        "401":
          $ref: "#/components/responses/UnauthorizedResponse"
        "403":
          $ref: "#/components/responses/ForbiddenResponse"
        "404":
          $ref: "#/components/responses/NotFoundResponse"
        "500":
          $ref: "#/components/responses/InternalServerErrorResponse"
security:
  - vismaConnectPortalUser:
      - openid
      - yukiapi:domain:companies:update
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      description: Bearer token for authentication
      schema:
        type: string
    DomainIdPath:
      name: domain-id
      in: path
      required: true
      description: The domain name
      example: 3afb7b54-6144-4561-9a29-1148006f2375
      schema:
        type: string
    CompanyIdPath:
      name: company-id
      in: path
      required: true
      description: The ID of the company
      example: 3afb7b54-6144-4561-9a29-1148006f2375
      schema:
        type: string
        format: uuid
  schemas:
    UpdateCompany:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: The name of the company.
          example: Example Corp
        description:
          type: string
          nullable: true
          maxLength: 40
          description: A brief description of the company, stored as its commercial name.
            Limited to 40 characters; longer values are truncated without an
            error.
          example: Cloud infrastructure and hosting
        address:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/CompanyAddress"
        mailingAddress:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/CompanyAddress"
        details:
          type: object
          nullable: true
          description: Company details information object.
          properties:
            cocNumber:
              type: string
              nullable: true
              description: Chamber of Commerce number.
              example: "12345678"
            country:
              type: string
              nullable: true
              description: Country ISO code. Must match the country of the portal the
                company's domain belongs to.
              example: NL
        emailAddress:
          type: string
          nullable: true
          description: Back-office mailbox of the company. Only the part before the "@" is
            kept; the domain is replaced by Yuki's own mail domain, so the value
            is returned as <mailbox>@yukiworks.<country tld> and not as the
            address supplied here.
          example: backoffice@example.com
        phone:
          type: string
          nullable: true
          description: Phone number.
          example: +31 20 123 4567
        website:
          type: string
          nullable: true
          description: Company website (optional).
          example: https://example.com
        legalForm:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/LegalForm"
        internalCustomerCode:
          type: string
          nullable: true
          description: Internal customer code (optional).
          example: CUST001
        accountingStartingDate:
          type: string
          format: date
          nullable: true
          description: Accounting starting date. Alias of
            financials.yukiStartKeepingFinancialRecordsDate; when both are
            supplied, financials.yukiStartKeepingFinancialRecordsDate takes
            precedence.
          example: 2024-01-01
        financials:
          type: object
          nullable: true
          description: Financial object containing financial-related settings.
          properties:
            pettyCash:
              $ref: "#/components/schemas/PettyCashOption"
            financialYearFollowsCalendarMonths:
              type: boolean
              nullable: true
              description: Whether the financial year follows calendar months.
              example: true
            yukiStartKeepingFinancialRecordsYear:
              type: string
              nullable: true
              description: The year when Yuki started keeping financial records.
              example: "2023"
            yukiStartKeepingFinancialRecordsDate:
              type: string
              format: date-time
              nullable: true
              description: The date when Yuki started keeping financial records.
              example: 2023-01-01T00:00:00Z
        taxInformation:
          type: object
          nullable: true
          description: Company tax information object.
          properties:
            vatNumber:
              type: string
              nullable: true
              description: VAT number. Must be a valid VAT number for the company's country,
                including its country prefix; the request is rejected with 400
                companies:validation_failed otherwise. The value is normalised
                to the national notation before it is stored, so the number
                returned by Get Company can differ from the one supplied here
                (for example BE0531247818 is returned as BE0531.247.818).
              example: NL123456782B01
            fiscalNumber:
              type: string
              nullable: true
              description: Fiscal number.
              example: "123456789"
            payrollTaxNumber:
              type: string
              nullable: true
              description: Payroll tax number.
              example: "987654321"
            vatLiable:
              type: boolean
              nullable: true
              description: VAT liable indicator.
              example: true
            mixedOrPartialLiable:
              $ref: "#/components/schemas/MixedOrPartialLiable"
            icpFrequency:
              $ref: "#/components/schemas/ICPFrequency"
            autoICPDeclaration:
              type: boolean
              nullable: true
              description: Whether to automatically generate ICP declaration.
              example: false
            vatFrequency:
              $ref: "#/components/schemas/VATFrequency"
            showVatReturn:
              type: boolean
              nullable: true
              description: Whether to show VAT return.
              example: true
      description: Company information object.
    CompanyAddress:
      type: object
      properties:
        address:
          type: string
          nullable: true
          description: Street name and number.
          example: Main Street 123
        address2:
          type: string
          nullable: true
          description: Additional address information.
          example: Suite 456
        postalCode:
          type: string
          nullable: true
          description: Postal code.
          example: 1234AB
        city:
          type: string
          nullable: true
          description: City name.
          example: Amsterdam
      description: Address information object.
    LegalForm:
      type: string
      enum:
        - Unknown
        - SolePartnership
        - PrivateLimited
        - PublicLimited
        - GeneralPartnership
        - LimitedPartnership
        - Partnership
        - Association
        - Foundation
        - Cooperative
      description: >
        Legal form of the company. \

        BE: Unknown, SolePartnership, PrivateLimited, PublicLimited,
        GeneralPartnership, LimitedPartnership, Partnership, Association,
        Foundation, Cooperative. \

        NL: values to be added later
      example: PrivateLimited
    PettyCashOption:
      type: string
      nullable: true
      enum:
        - Unknown
        - Regularly
        - Petty
        - None
      description: |
        Cash usage option: Unknown, Regularly, Petty, None
      example: Regularly
    MixedOrPartialLiable:
      type: string
      nullable: true
      enum:
        - No
        - Mixed
        - Partial
      description: Mixed or partial liable indicator. "No" is stored as the absence of
        the setting, so sending "No" and reading the value back returns null;
        only "Mixed" and "Partial" are persisted as values.
      example: No
    ICPFrequency:
      type: string
      nullable: true
      enum:
        - None
        - Yearly
        - Quarterly
        - Monthly
      description: ICP frequency indicator.
      example: Monthly
    VATFrequency:
      type: string
      nullable: true
      enum:
        - None
        - Yearly
        - Quarterly
        - Monthly
      description: VAT frequency indicator.
      example: Monthly
    BadRequestError:
      description: A 400 comes in two shapes that differ by title. A request that
        fails model binding never reaches the operation and carries the title
        below, with errors keyed by the rejected field. A request the operation
        itself rejects carries the title Validation Error, with errors keyed by
        the rejected field for a field check, or by the errorCode for a business
        rule. Both shapes carry errorCode, traceId and errors.
      allOf:
        - $ref: "#/components/schemas/ProblemDetails"
      example:
        type: https://httpstatuses.com/400
        title: One or more validation errors occurred.
        status: 400
        detail: The request contains invalid or malformed fields. See the errors
          property for details.
        instance: /example/bad-request
        traceId: 4bf92f3577b34da6a3ce929d0e0e4736
        errorCode: validation:invalid_input
        errors:
          country:
            - The country field is required.
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/ProblemDetails"
      example:
        type: https://httpstatuses.com/401
        title: Unauthorized
        status: 401
        detail: Authentication is required.
        instance: /example/unauthorized
        traceId: 4bf92f3577b34da6a3ce929d0e0e4736
        errorCode: authentication:unauthorized
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/ProblemDetails"
      example:
        type: https://httpstatuses.com/403
        title: Forbidden
        status: 403
        detail: You do not have permission to access this resource.
        instance: /example/forbidden
        traceId: 4bf92f3577b34da6a3ce929d0e0e4736
        errorCode: authentication:forbidden
        errors:
          authentication:forbidden:
            - You do not have permission to access this resource.
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/ProblemDetails"
      example:
        type: https://httpstatuses.com/404
        title: Not Found
        status: 404
        detail: The requested resource could not be found.
        instance: /example/not-found
        traceId: 4bf92f3577b34da6a3ce929d0e0e4736
        errorCode: companies:not_found
        errors:
          companies:not_found:
            - The requested resource could not be found.
    InternalServerError:
      allOf:
        - $ref: "#/components/schemas/ProblemDetails"
      example:
        type: https://httpstatuses.com/500
        title: Internal Server Error
        status: 500
        detail: An unexpected error occurred.
        instance: /example/internal-server-error
        traceId: 4bf92f3577b34da6a3ce929d0e0e4736
        errorCode: server:internal_error
        errors:
          server:internal_error:
            - An unexpected error occurred.
    ProblemDetails:
      type: object
      description: Error body returned as application/problem+json on every 4xx and
        5xx response. Beyond the standard problem members it carries the
        traceId, errorCode and errors extensions.
      properties:
        type:
          type: string
          description: URI reference identifying the problem type. Always
            https://httpstatuses.com/{status}, so it restates the status and
            carries no Yuki-specific meaning; branch on errorCode instead.
          example: https://httpstatuses.com/400
        title:
          type: string
          description: Short, human-readable summary of the problem type, in English.
          example: Validation Error
        status:
          type: integer
          description: HTTP status code, repeated from the response status line.
          example: 400
        detail:
          type: string
          description: Human-readable explanation of this specific occurrence. Free text
            meant for developers, not a stable contract - do not parse it.
          example: The company id is required.
        instance:
          type: string
          description: Optional. Path of the request as the API received it. The gateway
            fronts the API, so it is not always populated and it may differ from
            the URL the client called.
          example: /api/v1/companies/3afb7b54-6144-4561-9a29-1148006f2375
        traceId:
          type: string
          description: Correlation id for the request - the 32-character hexadecimal W3C
            trace id taken from the incoming traceparent header, or a locally
            generated id when none was propagated. Quote it in support requests.
          example: 4bf92f3577b34da6a3ce929d0e0e4736
        errorCode:
          type: string
          description: Stable machine-readable error identifier in {feature}:{error_type}
            form. This is the member to branch on, together with the status -
            not the feature prefix on its own. A request refused before it
            reaches the operation can answer 403 with validation:invalid_input,
            and an operation that fails on an unexpected internal state can
            answer 500 with that same code.
          example: companies:not_found
        errors:
          type: object
          description: Messages that explain the failure, grouped by key. Present on the
            errors raised while the request is being handled, not only on
            validation failures. It is absent from the errors that stop a
            request before it reaches the operation - the 401 for a missing or
            unaccepted token, the 403 for an absent scope or an unusable tenant
            claim, and the 500 for a session that could not be created - which
            carry only traceId and errorCode. Keys take one of two shapes - the
            name of the rejected field when the request failed model binding or
            field validation, otherwise the errorCode of the failure, repeating
            the errorCode member.
          additionalProperties:
            type: array
            items:
              type: string
          example:
            companies:validation_failed:
              - The company id is required.
  responses:
    BadRequestResponse:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/BadRequestError"
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
    ForbiddenResponse:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
    NotFoundResponse:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/InternalServerError"
  securitySchemes:
    vismaConnectPortalUser:
      type: oauth2
      description: >
        Visma Connect token belonging to a **Portal User** - an employee of an
        accounting portal. The token's tenant must be a portal; the API resolves
        it to the caller's portal. The portal in the route must be that portal
        or one of the caller's master-accountant portals. Unless an endpoint
        says otherwise, the caller's roles are resolved against the portal.
      flows:
        authorizationCode:
          authorizationUrl: https://connect.identity.stagaws.visma.com/connect/authorize
          tokenUrl: https://connect.identity.stagaws.visma.com/connect/token
          scopes:
            openid: Required on every request, together with the endpoint API scope
            yukiapi:domain:companies:read: Allows reading information of a Company
            yukiapi:domain:companies:update: Allows the update of a Company
            yukiapi:portal:portals:read: Allows reading portal information
            yukiapi:domain:domains:read: Allows reading domains information
            yukiapi:domain:domains:write: Allows modifications of domain information, may
              include create/update
            yukiapi:domain:domains:create: Allows the creation of new domains
            yukiapi:domain:domains:update: Allows updating existing domain information
            yukiapi:domain:domains:delete: Allows the deletion of domain data
            yukiapi:domain:users:read: Allows reading of domain user data
            yukiapi:domain:users:write: Allows the creation of Domain Users
            yukiapi:domain:users:delete: Allows the deletion of Domain Users
            yukiapi:portal:portals:write: Allows updating existing portal information
            yukiapi:portal:users:read: Allows reading Portal user data
            yukiapi:portal:users:write: Allows the update of Portal user, may include create/update
            yukiapi:portal:users:update: Allows updating an existing Portal User
            yukiapi:portal:users:delete: Allows the deletion of a Portal User
```
