Update InvoiceSettings of a Customer
PUT/customers/ {customerId}/ invoice-settings/
v2
PUT
invoice-update-invoice-settings
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PUT \
-d '{"additionalEmailRecipients":["hallo@test.de"],"invoicePeriod":1,"paymentSettings":{"accountHolder":"Ada Lovelace","bic":"DEUTDEDB123","iban":"DE12345678901234567890","method":"debit"},"printedInvoices":true,"recipient":{"address":{"street":"Königsberger Straße","houseNumber":"4-6","city":"Espelkamp","zip":"32339","countryCode":"DE","addressPrefix":"c/o Ada Lovelace"},"company":"Mittwald CM Service GmbH & Co. KG","emailAddress":"email@mittwald.example","firstName":"Ada","lastName":"Lovelace","phoneNumbers":["+49 123 4567890"],"salutation":"mr","title":"Dr.","useFormalTerm":true},"recipientSameAsOwner":true,"targetDay":15}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/customers/string/invoice-settings
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.contract.invoiceUpdateInvoiceSettings({
"customerId": "string",
"data": {
"additionalEmailRecipients": [
"hallo@test.de"
],
"invoicePeriod": 1,
"paymentSettings": {
"accountHolder": "Ada Lovelace",
"bic": "DEUTDEDB123",
"iban": "DE12345678901234567890",
"method": "debit"
},
"printedInvoices": true,
"recipient": {
"address": {
"street": "Königsberger Straße",
"houseNumber": "4-6",
"city": "Espelkamp",
"zip": "32339",
"countryCode": "DE",
"addressPrefix": "c/o Ada Lovelace"
},
"company": "Mittwald CM Service GmbH & Co. KG",
"emailAddress": "email@mittwald.example",
"firstName": "Ada",
"lastName": "Lovelace",
"phoneNumbers": [
"+49 123 4567890"
],
"salutation": "mr",
"title": "Dr.",
"useFormalTerm": true
},
"recipientSameAsOwner": true,
"targetDay": 15
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\InvoiceUpdateInvoiceSettings\InvoiceUpdateInvoiceSettingsRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\InvoiceUpdateInvoiceSettings\InvoiceUpdateInvoiceSettingsRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// InvoiceUpdateInvoiceSettingsRequestBody to learn how to construct a valid instance
$body = new InvoiceUpdateInvoiceSettingsRequestBody(/* TODO: ... */);
$request = (new InvoiceUpdateInvoiceSettingsRequest(
customerId: "string",
body: $body
));
$response = $client->contract()->invoiceUpdateInvoiceSettings($request);
var_dump($response->getBody();