Zum Hauptinhalt springen
PATCH
/
customer-email-addresses
/
{id}
Update customer email address
curl --request PATCH \
  --url https://coreapi.io/customer-email-addresses/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/merge-patch+json' \
  --data '
{
  "email": "john.doe@example.com",
  "receiverName": "John Doe",
  "isInvoiceEmail": true,
  "isDunningEmail": false
}
'
import requests

url = "https://coreapi.io/customer-email-addresses/{id}"

payload = {
"email": "john.doe@example.com",
"receiverName": "John Doe",
"isInvoiceEmail": True,
"isDunningEmail": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/merge-patch+json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/merge-patch+json'
},
body: JSON.stringify({
email: 'john.doe@example.com',
receiverName: 'John Doe',
isInvoiceEmail: true,
isDunningEmail: false
})
};

fetch('https://coreapi.io/customer-email-addresses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/customer-email-addresses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'john.doe@example.com',
'receiverName' => 'John Doe',
'isInvoiceEmail' => true,
'isDunningEmail' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/merge-patch+json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
  "email": "john.doe@example.com",
  "receiverName": "John Doe",
  "id": "00000000-0000-0000-0000-000000000000",
  "isInvoiceEmail": true,
  "isDunningEmail": false,
  "default": "true"
}

Autorisierungen

Authorization
string
header
erforderlich

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Pfadparameter

id
string
erforderlich

CustomerEmail identifier

Body

The updated CustomerEmail resource

email
string<email>
erforderlich
Maximum string length: 255
Beispiel:

"john.doe@example.com"

receiverName
string
erforderlich
Maximum string length: 255
Beispiel:

"John Doe"

isInvoiceEmail
boolean

Use this email for invoices, credits and financial documents.

Beispiel:

true

isDunningEmail
boolean

Use this email for dunning reminders and payment reminders.

Beispiel:

false

Antwort

CustomerEmail resource updated

email
string<email>
erforderlich
Maximum string length: 255
Beispiel:

"john.doe@example.com"

receiverName
string
erforderlich
Maximum string length: 255
Beispiel:

"John Doe"

id
string
read-only
Beispiel:

"00000000-0000-0000-0000-000000000000"

isInvoiceEmail
boolean

Use this email for invoices, credits and financial documents.

Beispiel:

true

isDunningEmail
boolean

Use this email for dunning reminders and payment reminders.

Beispiel:

false

default
boolean
Beispiel:

"true"