Update a customer profile
PUT/customers/ {customerId}/
v2
PUT
customer-update-customer
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PUT \
-d '{"customerId":"string","name":"string","owner":{"address":{"street":"Königsberger Straße","houseNumber":"4-6","city":"Espelkamp","zip":"32339","countryCode":"DE","addressPrefix":"c/o Ada Lovelace"},"company":"string","emailAddress":"email@mittwald.example","firstName":"string","lastName":"string","phoneNumbers":["string"],"salutation":"mr","title":"string","useFormalTerm":true},"vatId":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/customers/string
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.customer.updateCustomer({
"customerId": "string",
"data": {
"customerId": "string",
"name": "string",
"owner": {
"address": {
"street": "Königsberger Straße",
"houseNumber": "4-6",
"city": "Espelkamp",
"zip": "32339",
"countryCode": "DE",
"addressPrefix": "c/o Ada Lovelace"
},
"company": "string",
"emailAddress": "email@mittwald.example",
"firstName": "string",
"lastName": "string",
"phoneNumbers": [
"string"
],
"salutation": "mr",
"title": "string",
"useFormalTerm": true
},
"vatId": "string"
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Customer\UpdateCustomer\UpdateCustomerRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Customer\UpdateCustomer\UpdateCustomerRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// UpdateCustomerRequestBody to learn how to construct a valid instance
$body = new UpdateCustomerRequestBody(/* TODO: ... */);
$request = (new UpdateCustomerRequest(
customerId: "string",
body: $body
));
$response = $client->customer()->updateCustomer($request);
var_dump($response->getBody();