Zum Hauptinhalt springen
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
}
'
{
  "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,
  "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

Authorization
string
header
erforderlich

API token of the organisation. Send it as Authorization: Bearer api_... The token is bound to exactly one organisation.

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 | null

Linked subscription. Set when the offer extends or renews an existing subscription, and also once an accepted offer has been converted into a subscription. Null when the offer is not linked to a subscription.

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

Media ID of the purchase order uploaded by the buyer. To download it, call GET /media/{id}/download with your API token, or mint a shareable link with POST /media/{id}/download-token and then GET /media/{id}/download/{token}.

auditLogDocument
object | null

Media ID of the acceptance and audit-trail document. To download it, call GET /media/{id}/download with your API token, or mint a shareable link with POST /media/{id}/download-token and then GET /media/{id}/download/{token}.

signedDocument
object | null

Media ID of the fully signed offer PDF. To download it, call GET /media/{id}/download with your API token, or mint a shareable link with POST /media/{id}/download-token and then GET /media/{id}/download/{token}.

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

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

autoActivateSubscription
boolean
Standard:true
Beispiel:

true

acceptanceMode
string
Standard:click

How the offer is accepted: click, esignature or print. Defaults to click.

Beispiel:

"click"

dealType
string
Standard:new_business

Deal type, set automatically when the offer is published: new_business, expansion, renewal or one_off. Read-only.

Beispiel:

"new_business"

validUntil
string<date-time> | null

Date until which the offer is valid. Acting on an expired offer is rejected with HTTP 410. Set when the offer is published; null for historical offers.

Beispiel:

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

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"

contactPerson
object | null

The contact person of the offer

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

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

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