---
title: "Returns a customer of a company based on given id"
method: GET
path: "/core/latest/customers/{customer-id}"
tags: ["Customer"]
---

# Returns a customer of a company based on given id

`GET /core/latest/customers/{customer-id}`

## Request

- Base URL: `https://api.klara.ch`
- URL: `https://api.klara.ch/core/latest/customers/{customer-id}`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer

## Path parameters

- `customer-id` string, required

## Response `200`

Found Customer

- Customer: A customer - either a natural person or a company. customerType selects which: PERSON requires the person object and ignores company; COMPANY requires company and ignores person. This is a conditional requirement, so neither field appears in this schema's required list - supplying neither, or the wrong one for the given customerType, returns 400 with code model.invalid.
  - `id` string: Id of this Customer. Does not need to be included when creating customer
  - `person` object: The Person object. Supply this - and omit company - when customerType is PERSON. Exactly one of person and company must be present, selected by customerType; the other is ignored. Because which one is mandatory depends on another field, this cannot be marked required in this schema - omitting it when customerType = PERSON is rejected with 400 (Person object must be entered).
    - `website` string: The website address of this customer
    - `categories` string[]: Add one or more categories to this customer that you can use as filter criteria for selecting partners
    - `onlinePlatforms` OnlinePlatform[]: The list of online platforms that this customer uses
      - `id` string: Id of this Online platform. Does not need to be included when creating Customer.
      - `platformName` 'FACEBOOK' | 'GOOGLE_PLUS' | 'INSTAGRAM' | 'LINKEDIN' | 'PINTEREST' | 'SKYPE' | 'SNAPCHAT' | 'TWITTER' | 'WHATSAPP' | 'XING' | 'YOUTUBE': Name of the platform that this customer uses
      - `platformValue` string: Url of customer's online platform/webpage
    - `language` string: The main language that this partner uses, valid values is [en, de, fr, it]
    - `responsibleCounterpart` string: The name of a contact person for this customer
    - `correspondence` 'MAIL' | 'EMAIL', required: The preferred method of correspondence, how this customer wants to receive the pay slips by default
    - `id` string: Id of this person. Does not need to be included when creating customer
    - `salutation` 'MALE' | 'FEMALE' | 'MALE_FEMALE' | 'FAMILY', required: Salutation for this person, valid values is: [MALE, FEMALE, MALE_FEMALE, FAMILY]
    - `firstName` string, required: First name of this person
    - `lastName` string, required: Last name of this person
    - `birthday` string, date: Birth date of this person in ISO 8601 format (yyyy-MM-dd)
    - `addresses` Address[]: Postal addresses of this person. At least one address is required when creating or updating a customer with customerType = PERSON - omitting it is rejected with 400. Not marked required here because existing customers created before this rule may still be returned without an address.
      - `id` string: Id of this Address. Does not need to be included when creating customer
      - `validFrom` string, date: The timestamp from which this address is valid
      - `validTo` string, date: The timestamp to which this address is valid
      - `addressLines` string, required: The address lines for this Address
      - `addressType` string, required: The type of address, could be [PRIVATE, WORK, SHIPPING]. For company, address type <strong>MUST</strong> be <strong>PRIVATE</strong>.
      - `cityName` string, required: Name of this City
      - `cityZipCode` string: The postal code of the city for this address. <strong>Required for Switzerland addresses</strong> (countryIso2Code = CH), where it is matched against the KLARA city register together with cityName; a missing or non-matching combination is rejected with 400. Ignored for every other country, where cityName is taken as given. Conditional on another field, so it is not marked required.
      - `countryIso2Code` string, required: 2 letter country code. For company, only accept Switzerland
      - `countryIso3Code` string: 3 letter country code. For company, only accept Switzerland
      - `countryNumericCode` string: ISO-numeric code. For company, only accept Switzerland
      - `city_href` string: The path to get City object by city's id, /cities/{}
      - `definitionName` string: definition name of this address; in case main address, value is null; else value is not blank
      - `additionalAddress` string: Additional address for more specific
    - `phones` Phone[]: Phone number list of this person
      - `id` string: Id of this Phone. <strong>Does not need to be included</strong> when creating customer.
      - `phoneNumber` string, required
      - `type` 'PRIVATE' | 'OFFICE' | 'FAX' | 'WORK' | 'MOBILE', required: Type of this phone number. For company, only <strong>OFFICE</strong> type is supported. The full set of accepted values is the PhoneType schema.
    - `emails` Email[]: Email list of this person
      - `id` string: Id of this Email. <strong>Does not need to be included</strong> when creating customer
      - `emailAddress` string: Email address
      - `type` 'PRIVATE' | 'WORK' | 'OFFICE' | 'OTHER', required: Type of this email address. The full set of accepted values is the EmailType schema.
    - `personNumber` string: This is a number the KLARA user can give to this customer/partner/supplier
  - `company` object: The Company object. Supply this - and omit person - when customerType is COMPANY. See person for the mutual-exclusivity rule; omitting this when customerType = COMPANY is rejected with 400 (Company object must be entered).
    - `website` string: The website address of this customer
    - `categories` string[]: Add one or more categories to this customer that you can use as filter criteria for selecting partners
    - `onlinePlatforms` OnlinePlatform[]: The list of online platforms that this customer uses
      - `id` string: Id of this Online platform. Does not need to be included when creating Customer.
      - `platformName` 'FACEBOOK' | 'GOOGLE_PLUS' | 'INSTAGRAM' | 'LINKEDIN' | 'PINTEREST' | 'SKYPE' | 'SNAPCHAT' | 'TWITTER' | 'WHATSAPP' | 'XING' | 'YOUTUBE': Name of the platform that this customer uses
      - `platformValue` string: Url of customer's online platform/webpage
    - `language` string: The main language that this partner uses, valid values is [en, de, fr, it]
    - `responsibleCounterpart` string: The name of a contact person for this customer
    - `correspondence` 'MAIL' | 'EMAIL', required: The preferred method of correspondence, how this customer wants to receive the pay slips by default
    - `id` string: Id of this company. Does not need to be included when creating customer
    - `name` string, required: Name of the company
    - `phones` Phone[]: Phone numbers of the company
      - `id` string: Id of this Phone. <strong>Does not need to be included</strong> when creating customer.
      - `phoneNumber` string, required
      - `type` 'PRIVATE' | 'OFFICE' | 'FAX' | 'WORK' | 'MOBILE', required: Type of this phone number. For company, only <strong>OFFICE</strong> type is supported. The full set of accepted values is the PhoneType schema.
    - `emails` Email[]: Emails of this company
      - `id` string: Id of this Email. <strong>Does not need to be included</strong> when creating customer
      - `emailAddress` string: Email address
      - `type` 'PRIVATE' | 'WORK' | 'OFFICE' | 'OTHER', required: Type of this email address. The full set of accepted values is the EmailType schema.
    - `addresses` Address[]: Postal addresses of this company. At least one address is required when creating or updating a customer with customerType = COMPANY - omitting it is rejected with 400. Not marked required here because existing customers created before this rule may still be returned without an address.
      - `id` string: Id of this Address. Does not need to be included when creating customer
      - `validFrom` string, date: The timestamp from which this address is valid
      - `validTo` string, date: The timestamp to which this address is valid
      - `addressLines` string, required: The address lines for this Address
      - `addressType` string, required: The type of address, could be [PRIVATE, WORK, SHIPPING]. For company, address type <strong>MUST</strong> be <strong>PRIVATE</strong>.
      - `cityName` string, required: Name of this City
      - `cityZipCode` string: The postal code of the city for this address. <strong>Required for Switzerland addresses</strong> (countryIso2Code = CH), where it is matched against the KLARA city register together with cityName; a missing or non-matching combination is rejected with 400. Ignored for every other country, where cityName is taken as given. Conditional on another field, so it is not marked required.
      - `countryIso2Code` string, required: 2 letter country code. For company, only accept Switzerland
      - `countryIso3Code` string: 3 letter country code. For company, only accept Switzerland
      - `countryNumericCode` string: ISO-numeric code. For company, only accept Switzerland
      - `city_href` string: The path to get City object by city's id, /cities/{}
      - `definitionName` string: definition name of this address; in case main address, value is null; else value is not blank
      - `additionalAddress` string: Additional address for more specific
    - `corporateIdentificationNumber` string: Every business active in Switzerland is given a unique enterprise identification number (UID). To ensure that numbers are correctly allocated and managed, the UID register is run by the Federal Statistical Office
    - `vatNumber` string: This is the official CH VAT number of the company
    - `hrNumber` string: This is the official CH number for this company in the CH trade register
    - `nogaCode` string: The NOGA code of this company
    - `foundingDate` string, date: Founding date of this comany in ISO 8601 format (yyyy-mm-dd)
    - `companyNumber` string: This is a number the KLARA user can give to this customer/partner/supplier
  - `priceCategory` string: You can select / enter a price category. On the articles you can define a special price for this price category. When such an article is sold / invoiced, the price of this category will apply if it is identical for the article and the customer.
  - `customerType` 'COMPANY' | 'PERSON', required: The type of this partner. Could be either Person or Company.
  - `_links` object: links metadata
    - `self` Link: Link metadata
      - `href` string

## Other responses

- `401`: No Authorization header found or invalid token<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `403`: The current user is not allowed to access this company data<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `404`: Resource not found<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `429`: API rate limit exceeded<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.

---

[API](https://skmtc.dev/klara/apis/klara-public-api.md) · [All operations](https://skmtc.dev/klara/apis/klara-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/klara/apis/klara-public-api/revisions/490b1a879fc2?raw)
