Add a recipient
curl --request POST \
--url https://coreapi.io/offers/{id}/recipients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"role": "<unknown>",
"sendEmail": true
}
'import requests
url = "https://coreapi.io/offers/{id}/recipients"
payload = {
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"role": "<unknown>",
"sendEmail": True
}
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: 'jsmith@example.com',
firstName: '<string>',
lastName: '<string>',
role: '<unknown>',
sendEmail: true
})
};
fetch('https://coreapi.io/offers/{id}/recipients', 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/offers/{id}/recipients",
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' => 'jsmith@example.com',
'firstName' => '<string>',
'lastName' => '<string>',
'role' => '<unknown>',
'sendEmail' => true
]),
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;
}{
"id": "<string>",
"subscription": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"externalId": "<string>",
"paymentMethod": {
"id": "<string>",
"gatewayName": "wallet",
"type": "sepa_debit",
"default": true,
"status": "active",
"enabled": true,
"name": "<string>",
"creationDate": "2021-01-01T00:00:00+00:00",
"expirationDate": "2021-01-01T00:00:00+00:00",
"card": {
"brand": "Visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2022,
"cardHolder": "Max Mustermann"
},
"sepaDebit": {
"iban": "DE8937*********3232",
"bic": "COBADEFFXXX",
"mandateReference": "MNDT-2021-123456",
"signingDate": "2021-01-01T00:00:00+00:00"
},
"paypal": {
"email": "max@mustermann.de",
"billingAgreementId": "I-1J5gqz2eZvKYlo2C2X2X2X2X"
}
},
"invoiceAddress": {},
"deliveryAddress": {},
"number": "S-00000001",
"customer": {
"id": "00000000-0000-0000-0000-000000000000",
"customerNumber": "CUSTOMER-000",
"timeZone": "Europe/Berlin",
"firstName": "John",
"lastName": "Doe",
"currencyCode": "EUR",
"companyName": "Acme Inc.",
"datevId": "123456789",
"status": "STATUS_ACTIVE"
},
"plan": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"allowCheckout": true,
"status": "draft",
"changeBehaviour": "upgradeable_and_downgradeable",
"changeApplyBehaviour": "end_of_period"
},
"activePlanTier": {},
"name": "Fitness M",
"items": [
{
"id": "01F9ZQZJZJQZJZJZJZJZJZJZJZ",
"name": "Fitness M",
"description": "Everything included",
"furtherInformation": "Additional agreements: The contract includes a free drink flatrate.",
"status": "active",
"subscriptionId": "<string>"
}
],
"billingGroup": {},
"periods": [
{
"id": "<string>",
"contractPeriodCount": 123,
"contractPeriod": "1M",
"cancellationPeriod": "1M",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"status": "active",
"activatedAt": "2021-01-01T00:00:00+00:00",
"poNumber": "PO-00000001",
"contractDetails": {
"contractStart": "2021-01-01T00:00:00+00:00",
"contractEnd": "2021-01-01T00:00:00+00:00"
},
"trialEndsOn": "2021-01-01T00:00:00+00:00",
"customFields": {
"field1": "value1",
"field2": "value2"
},
"statistics": {
"unpaidGrossAmount": {
"amount": 1000,
"precision": 2,
"currency": "EUR",
"i18n": "10,00 €",
"inputValue": "10.00"
},
"totalContractValue": {
"amount": 1000,
"precision": 2,
"currency": "EUR",
"i18n": "10,00 €",
"inputValue": "10.00"
}
},
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"defaultPaymentMethod": true,
"defaultInvoiceAddress": true,
"nextBillingDate": "2021-01-01T00:00:00+00:00",
"lastBillingAt": "2021-01-01T00:00:00+00:00",
"cancellationDate": "2021-01-01T00:00:00+00:00",
"cancelledAt": "2021-01-01T00:00:00+00:00",
"cancellationReason": {
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"isCancellationPending": true,
"nextPossibleCancellationDate": [
"<string>"
],
"partner": {
"id": "ad8f7e7d-3b3b-4b3b-8b3b-3b3b3b3b3b3b",
"name": "John Doe",
"number": "123456",
"email": "partner@example.com"
},
"activeItems": [
"<string>"
]
},
"customer": {
"id": "00000000-0000-0000-0000-000000000000",
"customerNumber": "CUSTOMER-000",
"timeZone": "Europe/Berlin",
"firstName": "John",
"lastName": "Doe",
"currencyCode": "EUR",
"companyName": "Acme Inc.",
"datevId": "123456789",
"status": "STATUS_ACTIVE"
},
"number": "<string>",
"name": "<string>",
"status": "open",
"sections": [
"<string>"
],
"customVariables": {},
"locale": "<string>",
"recipients": [
{
"id": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"role": "read",
"createdAt": "2021-01-01T00:00:00+00:00",
"signingStatus": "not_started",
"signingLog": [
"<string>"
],
"signedDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"link": "https://example.com/o/1/recipient-1"
}
],
"purchaseOrderDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"auditLogDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"signedDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"signedAt": "2021-01-01T00:00:00+00:00",
"autoActivateSubscription": true,
"acceptanceMode": "click",
"dealType": "new_business",
"validUntil": "2021-01-01T00:00:00+00:00",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"contactPerson": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"avatar": "<string>",
"phone": "<string>",
"linkedin": "<string>",
"position": "<string>",
"website": "<string>"
},
"signed": true,
"issuedAt": "2021-01-01T00:00:00+00:00",
"publishedVersionHash": "<string>",
"currentVersionHash": "<string>"
}Angebote
Add a recipient
Beta. This endpoint is unstable and may still change without notice. Pin against the dated version and watch the changelog.
Adds another recipient to the offer, optionally with its own invitation email. The role controls whether the recipient may only read, sign, or counter-sign.
POST
/
offers
/
{id}
/
recipients
Add a recipient
curl --request POST \
--url https://coreapi.io/offers/{id}/recipients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"role": "<unknown>",
"sendEmail": true
}
'import requests
url = "https://coreapi.io/offers/{id}/recipients"
payload = {
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"role": "<unknown>",
"sendEmail": True
}
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: 'jsmith@example.com',
firstName: '<string>',
lastName: '<string>',
role: '<unknown>',
sendEmail: true
})
};
fetch('https://coreapi.io/offers/{id}/recipients', 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/offers/{id}/recipients",
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' => 'jsmith@example.com',
'firstName' => '<string>',
'lastName' => '<string>',
'role' => '<unknown>',
'sendEmail' => true
]),
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;
}{
"id": "<string>",
"subscription": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"externalId": "<string>",
"paymentMethod": {
"id": "<string>",
"gatewayName": "wallet",
"type": "sepa_debit",
"default": true,
"status": "active",
"enabled": true,
"name": "<string>",
"creationDate": "2021-01-01T00:00:00+00:00",
"expirationDate": "2021-01-01T00:00:00+00:00",
"card": {
"brand": "Visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2022,
"cardHolder": "Max Mustermann"
},
"sepaDebit": {
"iban": "DE8937*********3232",
"bic": "COBADEFFXXX",
"mandateReference": "MNDT-2021-123456",
"signingDate": "2021-01-01T00:00:00+00:00"
},
"paypal": {
"email": "max@mustermann.de",
"billingAgreementId": "I-1J5gqz2eZvKYlo2C2X2X2X2X"
}
},
"invoiceAddress": {},
"deliveryAddress": {},
"number": "S-00000001",
"customer": {
"id": "00000000-0000-0000-0000-000000000000",
"customerNumber": "CUSTOMER-000",
"timeZone": "Europe/Berlin",
"firstName": "John",
"lastName": "Doe",
"currencyCode": "EUR",
"companyName": "Acme Inc.",
"datevId": "123456789",
"status": "STATUS_ACTIVE"
},
"plan": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"allowCheckout": true,
"status": "draft",
"changeBehaviour": "upgradeable_and_downgradeable",
"changeApplyBehaviour": "end_of_period"
},
"activePlanTier": {},
"name": "Fitness M",
"items": [
{
"id": "01F9ZQZJZJQZJZJZJZJZJZJZJZ",
"name": "Fitness M",
"description": "Everything included",
"furtherInformation": "Additional agreements: The contract includes a free drink flatrate.",
"status": "active",
"subscriptionId": "<string>"
}
],
"billingGroup": {},
"periods": [
{
"id": "<string>",
"contractPeriodCount": 123,
"contractPeriod": "1M",
"cancellationPeriod": "1M",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"status": "active",
"activatedAt": "2021-01-01T00:00:00+00:00",
"poNumber": "PO-00000001",
"contractDetails": {
"contractStart": "2021-01-01T00:00:00+00:00",
"contractEnd": "2021-01-01T00:00:00+00:00"
},
"trialEndsOn": "2021-01-01T00:00:00+00:00",
"customFields": {
"field1": "value1",
"field2": "value2"
},
"statistics": {
"unpaidGrossAmount": {
"amount": 1000,
"precision": 2,
"currency": "EUR",
"i18n": "10,00 €",
"inputValue": "10.00"
},
"totalContractValue": {
"amount": 1000,
"precision": 2,
"currency": "EUR",
"i18n": "10,00 €",
"inputValue": "10.00"
}
},
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"defaultPaymentMethod": true,
"defaultInvoiceAddress": true,
"nextBillingDate": "2021-01-01T00:00:00+00:00",
"lastBillingAt": "2021-01-01T00:00:00+00:00",
"cancellationDate": "2021-01-01T00:00:00+00:00",
"cancelledAt": "2021-01-01T00:00:00+00:00",
"cancellationReason": {
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"isCancellationPending": true,
"nextPossibleCancellationDate": [
"<string>"
],
"partner": {
"id": "ad8f7e7d-3b3b-4b3b-8b3b-3b3b3b3b3b3b",
"name": "John Doe",
"number": "123456",
"email": "partner@example.com"
},
"activeItems": [
"<string>"
]
},
"customer": {
"id": "00000000-0000-0000-0000-000000000000",
"customerNumber": "CUSTOMER-000",
"timeZone": "Europe/Berlin",
"firstName": "John",
"lastName": "Doe",
"currencyCode": "EUR",
"companyName": "Acme Inc.",
"datevId": "123456789",
"status": "STATUS_ACTIVE"
},
"number": "<string>",
"name": "<string>",
"status": "open",
"sections": [
"<string>"
],
"customVariables": {},
"locale": "<string>",
"recipients": [
{
"id": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"role": "read",
"createdAt": "2021-01-01T00:00:00+00:00",
"signingStatus": "not_started",
"signingLog": [
"<string>"
],
"signedDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"link": "https://example.com/o/1/recipient-1"
}
],
"purchaseOrderDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"auditLogDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"signedDocument": {
"id": "ad8a3b9e-5b0a-4e1a-9c1a-0b9b2b8b0b0b",
"mimeType": "image/jpeg",
"fileExtension": "jpg",
"fileName": "invoice.jpg"
},
"signedAt": "2021-01-01T00:00:00+00:00",
"autoActivateSubscription": true,
"acceptanceMode": "click",
"dealType": "new_business",
"validUntil": "2021-01-01T00:00:00+00:00",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"contactPerson": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"avatar": "<string>",
"phone": "<string>",
"linkedin": "<string>",
"position": "<string>",
"website": "<string>"
},
"signed": true,
"issuedAt": "2021-01-01T00:00:00+00:00",
"publishedVersionHash": "<string>",
"currentVersionHash": "<string>"
}Autorisierungen
Body
application/json
The new Offer resource
Antwort
Offer resource created
War diese Seite hilfreich?