Update Customer Details
PATCHhttps://api.lochting.com/public/v1/customer/:customerId
This call allows you to update a customer.
Request
Path Parameters
customerId stringrequired
The id of the customer.
Example: customer-c7d932c1-84e8-410c-a9b2-18bf739d6b8b
Header Parameters
Authorization stringrequired
Example: your-access-token
- application/json
Bodyrequired
firstNamestringrequired
First name of customer
Example:
John
lastNamestringrequired
Last name of customer
Example:
Doe
localeLocale (string)required
Locale of the customer
Possible values: [nl_BE
, fr_BE
, en_BE
, de_BE
, fr_FR
, en_FR
, de_DE
, en_DE
, en_AU
, en_ES
, es_ES
, en_AT
, de_AT
, en_CZ
, cs_CZ
, en_SG
, en_PT
, pt_PT
]
Example:
nl_BE
emailAddressstringrequired
Email address of the customer
Example:
johndoe@lochting.com
genderGender (string)required
Gender of the customer
Possible values: [male
, female
, nonBinary
, notDisclosed
]
Example:
female
nationalIdstringnullable
National id of the customer
Example:
ABC12345
phoneNumberstringnullable
Phone of customer
Example:
123456789
addressstringnullable
Street + Street number + box
Example:
Dendermondsesteenweg 140C
zipCodestringnullable
Zipcode of customer
Example:
9000
citystringnullable
City of customer
Example:
Gent
countryCountry (string)required
ISO CountryCode of Customer
Possible values: [BE
, FR
, AU
, DE
, ES
, AT
, CZ
, SG
, PT
]
Example:
BE
Responses
- 200
- 401
- 404
OK
Unauthorized
Not Found
- application/json
- Schema
- Example (auto)
Schema
messagestring
Example:
Customer not found: customer-c7d932c1-84e8-410c-a9b2-18bf739d6b8b
{
"message": "Customer not found: customer-c7d932c1-84e8-410c-a9b2-18bf739d6b8b"
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.lochting.com/public/v1/customer/:customerId");
var content = new StringContent("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"locale\": \"nl_BE\",\n \"emailAddress\": \"johndoe@lochting.com\",\n \"gender\": \"female\",\n \"nationalId\": \"ABC12345\",\n \"phoneNumber\": \"123456789\",\n \"address\": \"Dendermondsesteenweg 140C\",\n \"zipCode\": \"9000\",\n \"city\": \"Gent\",\n \"country\": \"BE\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear