Customer

Creates a new customer's additional address

post/core/latest/customers/{customer-id}/additional-addresses

Request

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

Path parameters

customer-idstring required
Example:1

Id of the customer to add additional addresses to

Request body

idstring

Id of this Address. Does not need to be included when creating customer

validFromstring date

The timestamp from which this address is valid

validTostring date

The timestamp to which this address is valid

addressLinesstring required

The address lines for this Address

addressTypestring required

The type of address, could be [PRIVATE, WORK, SHIPPING]. For company, address type <strong>MUST</strong> be <strong>PRIVATE</strong>.

cityNamestring required

Name of this City

cityZipCodestring

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.

countryIso2Codestring required

2 letter country code. For company, only accept Switzerland

countryIso3Codestring

3 letter country code. For company, only accept Switzerland

countryNumericCodestring

ISO-numeric code. For company, only accept Switzerland

city_hrefstring

The path to get City object by city's id, /cities/{}

definitionNamestring

definition name of this address; in case main address, value is null; else value is not blank

additionalAddressstring

Additional address for more specific

Example request

{
  "id": "1",
  "addressLines": "Chemin de la Caquerette 12",
  "addressType": "WORK",
  "cityName": "Bern",
  "cityZipCode": "3003",
  "countryIso2Code": "CH",
  "countryIso3Code": "CHE",
  "countryNumericCode": "756",
  "city_href": "https://api.klara.ch/core/latest/cities/1",
  "definitionName": "2nd address",
  "additionalAddress": "No. 13, street 123"
}

Response

Customer's new additional address created

idstring

Id of this Address. Does not need to be included when creating customer

validFromstring date

The timestamp from which this address is valid

validTostring date

The timestamp to which this address is valid

addressLinesstring required

The address lines for this Address

addressTypestring required

The type of address, could be [PRIVATE, WORK, SHIPPING]. For company, address type <strong>MUST</strong> be <strong>PRIVATE</strong>.

cityNamestring required

Name of this City

cityZipCodestring

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.

countryIso2Codestring required

2 letter country code. For company, only accept Switzerland

countryIso3Codestring

3 letter country code. For company, only accept Switzerland

countryNumericCodestring

ISO-numeric code. For company, only accept Switzerland

city_hrefstring

The path to get City object by city's id, /cities/{}

definitionNamestring

definition name of this address; in case main address, value is null; else value is not blank

additionalAddressstring

Additional address for more specific

Example response

{
  "id": "1",
  "addressLines": "Chemin de la Caquerette 12",
  "addressType": "WORK",
  "cityName": "Bern",
  "cityZipCode": "3003",
  "countryIso2Code": "CH",
  "countryIso3Code": "CHE",
  "countryNumericCode": "756",
  "city_href": "https://api.klara.ch/core/latest/cities/1",
  "definitionName": "2nd address",
  "additionalAddress": "No. 13, street 123"
}

Changes

No recorded changes to this operation across all 1 revision of this API.