cURL
curl -X POST \
/customers/{customerId}/email-addresses \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"email": "john.doe@example.com",
"receiverName": "John Doe"
}'import requests
url = "https://coreapi.io/customers/{customerId}/email-addresses"
payload = {
"email": "john.doe@example.com",
"receiverName": "John Doe",
"isInvoiceEmail": False,
"isDunningEmail": False,
"isDefault": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john.doe@example.com',
receiverName: 'John Doe',
isInvoiceEmail: false,
isDunningEmail: false,
isDefault: false
})
};
fetch('https://coreapi.io/customers/{customerId}/email-addresses', 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/customers/{customerId}/email-addresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'john.doe@example.com',
'receiverName' => 'John Doe',
'isInvoiceEmail' => false,
'isDunningEmail' => false,
'isDefault' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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"
}Email
Create customer email address
Create customer email address
Required permissions:customer:writePOST
/
customers
/
{customerId}
/
email-addresses
cURL
curl -X POST \
/customers/{customerId}/email-addresses \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"email": "john.doe@example.com",
"receiverName": "John Doe"
}'import requests
url = "https://coreapi.io/customers/{customerId}/email-addresses"
payload = {
"email": "john.doe@example.com",
"receiverName": "John Doe",
"isInvoiceEmail": False,
"isDunningEmail": False,
"isDefault": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john.doe@example.com',
receiverName: 'John Doe',
isInvoiceEmail: false,
isDunningEmail: false,
isDefault: false
})
};
fetch('https://coreapi.io/customers/{customerId}/email-addresses', 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/customers/{customerId}/email-addresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'john.doe@example.com',
'receiverName' => 'John Doe',
'isInvoiceEmail' => false,
'isDunningEmail' => false,
'isDefault' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
CustomerEmail identifier
Body
application/jsontext/html
The new CustomerEmail resource
Maximum string length:
255Beispiel:
"john.doe@example.com"
Maximum string length:
255Beispiel:
"John Doe"
Use this to send invoices, credits and reminders to the customer.
Beispiel:
false
Use this to send dunning reminders to the customer.
Beispiel:
false
Set this email as the primary/default email address.
Beispiel:
false
Antwort
CustomerEmail resource created
Maximum string length:
255Beispiel:
"john.doe@example.com"
Maximum string length:
255Beispiel:
"John Doe"
Beispiel:
"00000000-0000-0000-0000-000000000000"
Use this email for invoices, credits and financial documents.
Beispiel:
true
Use this email for dunning reminders and payment reminders.
Beispiel:
false
Beispiel:
"true"
War diese Seite hilfreich?