Zum Hauptinhalt springen
POST
/
offers
/
{id}
/
recipients
Empfänger hinzufügen
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
}
'
{
  "id": "<string>",
  "subscription": {
    "id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
    "externalId": "<string>",
    "paymentMethod": {
      "id": "<string>",
      "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>",
  "sections": [
    "<string>"
  ],
  "customVariables": {},
  "locale": "<string>",
  "recipients": [
    {
      "id": "<string>",
      "email": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "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,
  "crmDealId": "<string>",
  "acceptanceMode": "click",
  "dealType": "new_business",
  "validUntil": "2021-01-01T00:00:00+00:00",
  "cachedContractValueCents": "<string>",
  "cachedContractValueCurrency": "<string>",
  "createdAt": "2021-01-01T00:00:00+00:00",
  "updatedAt": "2021-01-01T00:00:00+00:00",
  "capturedInvoiceDetails": {},
  "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

Authorization
string
header
erforderlich

API-Token der Organisation. Sende es als Authorization: Bearer api_... Das Token ist fest an genau eine Organisation gebunden.

Pfadparameter

id
string
erforderlich

Offer identifier

Body

application/json

The new Offer resource

email
string<email>
erforderlich

The email of the recipient. This will be used to send the email.

firstName
string | null

The first name of the recipient (optional, email is the only required field)

Maximum string length: 100
lastName
string | null

The last name of the recipient (optional, email is the only required field)

Maximum string length: 100
role
any

The role of the recipient

Possible values:

  • read: The recipient can read the offer
  • sign: The recipient can read and sign the offer
sendEmail
boolean

Whether to send an invitation email to the recipient. Otherwise, you have to inform the recipient manually.

Antwort

Offer resource created

id
string
read-only
subscription
object
customer
object
number
string
name
string | null
status
enum<string>
read-only
Verfügbare Optionen:
open,
signing,
awaiting_invoice_details,
signed,
archived
sections
string[]
customVariables
object

Vom Nutzer im Editor angelegte eigene Variablen (Feedback-Runde 1, Punkt 11): flaches name => Wert-Mapping, das der OfferVariableResolver zusätzlich zu den Systemvariablen auflöst. Bei Namenskollision haben Systemvariablen Vorrang ({@see \Fynn\Core\Domain\Offer\Service\OfferVariableResolver}).

locale
string
read-only
recipients
object[]
read-only
purchaseOrderDocument
object

Vom Käufer (oder der delegierten Person) hochgeladenes Purchase-Order- Dokument (D17). Verknüpft beim captureInvoiceData über purchaseOrder.ref aus dem Invoice-Details-Submit; beim Finalize wird die Relation zusätzlich auf die Subscription kopiert. Die KI-Extraktion der PO-Daten kommt bewusst NICHT in dieser Welle.

auditLogDocument
object
signedDocument
object
signedAt
string<date-time> | null
read-only
Beispiel:

"2021-01-01T00:00:00+00:00"

autoActivateSubscription
boolean
Standard:true
Beispiel:

true

crmDealId
string | null
read-only
acceptanceMode
string
Standard:click

Offer-level acceptance mode (per D9 in docs/build-offer-view-wave-decisions.md).

Beispiel:

"click"

dealType
string
Standard:new_business

Deal-type denormalised at publish-time (per D2).

Beispiel:

"new_business"

validUntil
string<date-time> | null

Offer expiry (per D7). Buyers acting on a stale link are rejected via OfferExpiredException (HTTP 410). Frozen at publish time; nullable for historical offers.

Beispiel:

"2021-01-01T00:00:00+00:00"

cachedContractValueCents
string | null
read-only

Cached recurring contract value (per D6). Written at publish-time by OfferContractValueCalculator for list-view filtering/sorting only; the read path always recomputes. Cents; flat_fee=qty-agnostic invariant honored by the calculator.

cachedContractValueCurrency
string | null
read-only
createdAt
string<date-time>
read-only

The date and time when the resource was created.

Beispiel:

"2021-01-01T00:00:00+00:00"

updatedAt
string<date-time>
read-only

The date and time when the resource was last updated.

Beispiel:

"2021-01-01T00:00:00+00:00"

capturedInvoiceDetails
object
read-only

Roh-Shape der erfassten Rechnungsdaten für den wallet-Detail-Output (D21 Manual-Completion-Prefill liest offer.capturedInvoiceDetails tolerant — Legacy-Zeilen tragen 13 Schlüssel, neue zusätzlich costCenter/leitwegId). Bewusst der persistierte Array-Shape statt des VOs, dessen Properties keine Serialisierungs-Gruppen tragen.

contactPerson
object

The contact person of the offer

signed
boolean
read-only
issuedAt
string<date-time>
read-only

Ausstellungsdatum (issueDate) als roher UTC-Instant: der Zeitpunkt, zu dem die publizierte Version beim Käufer live ging (autoritativ, FYNN-3273).

Beispiel:

"2021-01-01T00:00:00+00:00"

publishedVersionHash
string | null
read-only
currentVersionHash
string | null
read-only