Zum Hauptinhalt springen
POST
/
customers
cURL
curl -X POST \
 /customers \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "currencyCode": "EUR",
    "timeZone": "Europe\/Berlin",
    "invoiceEmail": "[email protected]",
    "datevId": "123456789",
    "vatId": "DE123456789",
    "companyName": "Acme Inc.",
    "commercialRegisterName": "Amtsgericht Berlin (Charlottenburg)",
    "commercialRegisterNumber": "HRB 123456",
    "phone": "+49 123 456789",
    "street": "Musterstra\u00dfe 1",
    "houseNumber": "1a",
    "zip": "12345",
    "city": "Berlin",
    "addition": "c\/o John Doe",
    "customFields": {
        "field1": "value1",
        "field2": "value2"
    }
}'
{
  "countryCode": "DE",
  "id": "00000000-0000-0000-0000-000000000000",
  "customerNumber": "CUSTOMER-000",
  "timeZone": "Europe/Berlin",
  "firstName": "John",
  "lastName": "Doe",
  "currencyCode": "EUR",
  "companyName": "Acme Inc.",
  "vatId": "DE123456789",
  "isVatIdValid": true,
  "taxExempt": "auto",
  "datevId": "123456789",
  "commercialRegisterName": "Amtsgericht Berlin (Charlottenburg)",
  "commercialRegisterNumber": "HRB 123456",
  "status": "STATUS_ACTIVE",
  "gender": "male",
  "phone": "+49 123 456789",
  "language": "de",
  "totalTurnOverRank": 10,
  "createdAt": "2020-01-01T00:00:00+00:00",
  "emailAddresses": [
    {
      "email": "[email protected]",
      "receiverName": "John Doe",
      "type": "TYPE_COMPANY",
      "id": "00000000-0000-0000-0000-000000000000",
      "default": "true"
    }
  ],
  "addresses": [
    {
      "id": "<string>",
      "vatId": "DE123456789",
      "type": "TYPE_DEFAULT",
      "default": "true",
      "status": "active",
      "city": "Berlin",
      "zip": "12345",
      "street": "Musterstraße",
      "houseNumber": "1a",
      "countryCode": "DE",
      "companyName": "ACME Inc.",
      "salutation": "Herr",
      "addition": "c/o John Doe",
      "costCentre": "123456789",
      "firstName": "John",
      "lastName": "Doe"
    }
  ],
  "customerGroup": {
    "name": "<string>",
    "id": "<string>",
    "description": "<string>"
  },
  "customFields": {
    "field1": "value1",
    "field2": "value2"
  },
  "businessCustomer": true,
  "defaultAddress": {
    "id": "<string>",
    "vatId": "DE123456789",
    "type": "TYPE_DEFAULT",
    "default": "true",
    "status": "active",
    "city": "Berlin",
    "zip": "12345",
    "street": "Musterstraße",
    "houseNumber": "1a",
    "countryCode": "DE",
    "companyName": "ACME Inc.",
    "salutation": "Herr",
    "addition": "c/o John Doe",
    "costCentre": "123456789",
    "firstName": "John",
    "lastName": "Doe"
  },
  "defaultInvoiceAddress": {
    "id": "<string>",
    "vatId": "DE123456789",
    "type": "TYPE_DEFAULT",
    "default": "true",
    "status": "active",
    "city": "Berlin",
    "zip": "12345",
    "street": "Musterstraße",
    "houseNumber": "1a",
    "countryCode": "DE",
    "companyName": "ACME Inc.",
    "salutation": "Herr",
    "addition": "c/o John Doe",
    "costCentre": "123456789",
    "firstName": "John",
    "lastName": "Doe"
  },
  "defaultEmailAddress": {
    "email": "[email protected]",
    "receiverName": "John Doe",
    "type": "TYPE_COMPANY",
    "id": "00000000-0000-0000-0000-000000000000",
    "default": "true"
  },
  "defaultInvoiceEmailAddress": {
    "email": "[email protected]",
    "receiverName": "John Doe",
    "type": "TYPE_COMPANY",
    "id": "00000000-0000-0000-0000-000000000000",
    "default": "true"
  },
  "defaultPaymentMethod": {
    "id": "<string>",
    "gatewayName": "wallet",
    "type": "sepa_debit",
    "default": true,
    "status": "active",
    "enabled": true,
    "name": "<string>",
    "creationDate": "2023-11-07T05:31:56Z",
    "expirationDate": "2023-11-07T05:31:56Z",
    "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": "[email protected]",
      "billingAgreementId": "I-1J5gqz2eZvKYlo2C2X2X2X2X"
    }
  },
  "contactPerson": {
    "id": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "<string>",
    "avatar": "<string>"
  },
  "isPartner": true,
  "partner": {
    "id": "ad8f7e7d-3b3b-4b3b-8b3b-3b3b3b3b3b3b",
    "name": "John Doe",
    "number": "123456",
    "email": "[email protected]"
  }
}

Autorisierungen

Authorization
string
header
erforderlich

Value for the Authorization header parameter.

Body

The new Customer resource

countryCode
unknown
erforderlich
email
string<email>
erforderlich

The email address used for e-mail communication. This is also the username for the customer login. This needs to be unique.

Required string length: 2 - 255
currencyCode
string | null

Can be empty. In this case the default currency of the tenant is used.

Beispiel:

"EUR"

customerGroup
any | null

The customer group of the customer.

Beispiel:

"ad8b3b1b-3b3b-4b3b-8b3b-3b3b3b3b3b3b"

contactPerson
any | null

The contact person of the customer.

Beispiel:

"ad8b3b1b-3b3b-4b3b-8b3b-3b3b3b3b3b3b"

timeZone
string | null
Standard:Europe/Berlin

The timezone of the customer. This is used for the communication with the customer or on generating documents like invoices, reminders, etc.

Beispiel:

"Europe/Berlin"

firstName
string | null

Can be empty if the customer is a company.

Required string length: 2 - 255
Beispiel:

"John"

lastName
string | null

Can be empty if the customer is a company.

Required string length: 2 - 255
Beispiel:

"Doe"

language
enum<string>
Standard:de

The language of the customer. This is used for the communication with the customer or on generating documents like invoices, reminders, etc.

Verfügbare Optionen:
de,
en
Beispiel:

"de"

invoiceEmail
string<email> | null

This email will be used for sending invoices to the customer. If not provided, we use the default e-mail address.

Required string length: 2 - 255
datevId
string | null

The ID of the customer in DATEV. If not provided, we will generate a datev id, when the "accounting.useDebitorAccounts" setting is set to true.

Required string length: 2 - 255
Beispiel:

"123456789"

gender
enum<string>

This field is needed, to fullfill a collection process on a personal customer.

Verfügbare Optionen:
male,
female,
diverse
Beispiel:

"male"

vatId
string | null
Required string length: 2 - 255
Beispiel:

"DE123456789"

companyName
string | null
Required string length: 2 - 255
Beispiel:

"Acme Inc."

commercialRegisterName
string | null

The name of the commercial register. This is needed tofullfill the collection processes on companies.

Beispiel:

"Amtsgericht Berlin (Charlottenburg)"

commercialRegisterNumber
string | null

The ID of the customer in the commercial register, e.g. HRB 123456. This is needed tofullfill the collection processes on companies.

Beispiel:

"HRB 123456"

phone
string | null
Required string length: 2 - 255
Beispiel:

"+49 123 456789"

customerNumber
string | null

Can be empty. In this case the customer number is generated automatically.

Required string length: 2 - 255
Beispiel:

"CUSTOMER-000"

street
string | null

The street of the customer. If not provided, we will use empty string.

Required string length: 2 - 255
Beispiel:

"Musterstraße 1"

houseNumber
string | null

The house number of the customer. If not provided, we will use empty string.

Maximum string length: 255
Beispiel:

"1a"

zip
string | null

The zip code of the customer. If not provided, we will use empty string.

Required string length: 2 - 255
Beispiel:

"12345"

city
string | null

The city of the customer. If not provided, we will use empty string.

Required string length: 2 - 255
Beispiel:

"Berlin"

addition
string | null

Additional address line of the customer. If not provided, we will use empty string.

Required string length: 2 - 255
Beispiel:

"c/o John Doe"

invoiceAddress
any | null

An invoice address for the customer. If not provided, we will use the default address.

taxExempt
enum<string>
Standard:auto

The tax exemption status of the customer.

Possible values:

  • exempt: The customer will never be charged with taxes.
  • auto: The customer will be charged with taxes based on their country and vat id status. If the customer is eligble for reverse-charge the customer will not be charged with taxes.
Verfügbare Optionen:
auto,
exempt
Beispiel:

"auto"

customFields
object

Custom fields for the entity. The keys are the field names and the values are the field values. They need to be configured under "/custom-fields" in the API documentation. The input is validated against the configuration. For more details see Custom Fields Guide

Beispiel:
{ "field1": "value1", "field2": "value2" }

Antwort

Customer resource created

countryCode
string
erforderlich
Beispiel:

"DE"

id
string
Beispiel:

"00000000-0000-0000-0000-000000000000"

customerNumber
string
Required string length: 2 - 255
Beispiel:

"CUSTOMER-000"

timeZone
string
Standard:Europe/Berlin
Beispiel:

"Europe/Berlin"

firstName
string | null

Can be empty if the customer is a company.

Required string length: 2 - 255
Beispiel:

"John"

lastName
string | null

Can be empty if the customer is a company.

Required string length: 2 - 255
Beispiel:

"Doe"

currencyCode
string

Can be empty. In this case the default currency of the tenant is used.

Beispiel:

"EUR"

companyName
string | null
Required string length: 2 - 255
Beispiel:

"Acme Inc."

vatId
string | null
Required string length: 2 - 255
Beispiel:

"DE123456789"

isVatIdValid
boolean

Indicates if the VAT ID is valid. This is only available for EU VAT IDs. We validate the VAT IDs each night and directly after change.

Beispiel:

true

taxExempt
enum<string>
Verfügbare Optionen:
auto,
exempt
datevId
string | null

The ID of the customer in DATEV

Required string length: 2 - 255
Beispiel:

"123456789"

commercialRegisterName
string | null

The name of the commercial register. This is needed tofullfill the collection processes on companies.

Beispiel:

"Amtsgericht Berlin (Charlottenburg)"

commercialRegisterNumber
string | null

The ID of the customer in the commercial register, e.g. HRB 123456. This is needed tofullfill the collection processes on companies.

Beispiel:

"HRB 123456"

status
enum<string>
Standard:STATUS_ACTIVE
Verfügbare Optionen:
STATUS_ACTIVE,
STATUS_ARCHIVED,
STATUS_SUSPENDED
Beispiel:

"STATUS_ACTIVE"

gender
enum<string>

This field is needed, to fullfill a collection process on a personal customer.

Verfügbare Optionen:
male,
female,
diverse
Beispiel:

"male"

phone
string | null
Required string length: 2 - 255
Beispiel:

"+49 123 456789"

language
enum<string>
Standard:de

The language of the customer. This is used for the communication with the customer or on generating documents like invoices, reminders, etc.

Verfügbare Optionen:
de,
en
Beispiel:

"de"

totalTurnOverRank
integer | null

The current customer rank, based on their revenue. Lower is better. This will calculate each night.

Beispiel:

10

createdAt
string<date-time>
Beispiel:

"2020-01-01T00:00:00+00:00"

emailAddresses
object[]
addresses
object[]
customerGroup
object

The customer group of the customer.

customFields
object

Custom fields for the entity. The keys are the field names and the values are the field values. They need to be configured under "/custom-fields" in the API documentation. The input is validated against the configuration. For more details see Custom Fields Guide

Beispiel:
{ "field1": "value1", "field2": "value2" }
businessCustomer
boolean
defaultAddress
object

The default address of the customer. This is the address that is used for billing if no other address is specified.

defaultInvoiceAddress
object

The invoice address of the customer. This is the address that is used for billing if defined. If not defined, the default address is used.

defaultEmailAddress
object

The default email address of the customer. This is the email address that is used for billing if no other email address is specified.

defaultInvoiceEmailAddress
object

The invoice email address of the customer. This is the email address that is used for billing if defined. If not defined, the default email address is used.

defaultPaymentMethod
object

The default payment method of the customer. This is the payment method that is used for billing.

contactPerson
object

The contact person of the customer.

isPartner
boolean

Indicates if the customer is a partner.

partner
object

The partner of the customer. If a partner is assigned, all existing and future subscriptions of the customer will be billed to the default payment method and invoice address of the partner.