---
title: "Update a company"
method: PATCH
path: "/v1/locations/{locationId}/companies/{companyId}"
tags: ["Companies"]
---

# Update a company

`PATCH /v1/locations/{locationId}/companies/{companyId}`

## Request

- Base URL: `https://api.cliento.com`
- URL: `https://api.cliento.com/v1/locations/{locationId}/companies/{companyId}`
- Auth: HTTP bearer

Changes only the fields in the request. Either all of them are changed or none. See `CompanyUpdate` for how to clear a field.

## Path parameters

- `locationId` string, required
- `companyId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- CompanyUpdate: A JSON merge patch: send only what changes. A field you leave out keeps its value; a field set to `null` is cleared, except `name`, which cannot be cleared. `address` merges field by field.
  - `address` Address
    - `city` string, nullable
    - `country` string, nullable: Free text; an ISO 3166-1 alpha-2 code is recommended.
    - `line1` string, nullable
    - `line2` string, nullable
    - `line3` string, nullable
    - `postCode` string, nullable
  - `department` string, nullable: A part of the company, when the location serves several of them.
  - `email` string, nullable
  - `name` string
  - `notes` string, nullable: Staff-facing notes, at most 1000 characters.
  - `organisationNumber` string, nullable: The Swedish organisation number: ten digits with a valid check digit, with no hyphen.
  - `otherPhoneNumber` string, nullable
  - `phoneNumber` string, nullable: Phone number in E.164 format: a plus sign, the country code and the number, at most 15 digits.

## Response `200`

OK

- Company: Represents a business a location serves. Belongs to one location.
  - `address` Address
    - `city` string, nullable
    - `country` string, nullable: Free text; an ISO 3166-1 alpha-2 code is recommended.
    - `line1` string, nullable
    - `line2` string, nullable
    - `line3` string, nullable
    - `postCode` string, nullable
  - `createdAt` string, date-time
  - `department` string: A part of the company, when the location serves several of them.
  - `email` string
  - `externalReference` string: Your own id for it, as sent when it was created.
  - `id` string, required
  - `locationId` string, required
  - `name` string
  - `notes` string: Staff-facing notes, at most 1000 characters.
  - `organisationNumber` string: The Swedish organisation number: ten digits with a valid check digit, with no hyphen.
  - `otherPhoneNumber` string
  - `phoneNumber` string: Phone number, in E.164 format when it was set through this API.
  - `updatedAt` string, date-time

## Other responses

- `default`: Any failure. See the Errors section.

---

[API](https://skmtc.dev/cliento/apis/cliento-api.md) · [All operations](https://skmtc.dev/cliento/apis/cliento-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cliento/apis/cliento-api/revisions/29ca811bc061?raw)
