Skip to main content
POST
/
accounting
/
contacts
cURL
curl --request POST \
  --url https://api.maesn.dev/accounting/contacts \
  --header 'Content-Type: application/json' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "addresses": [
    {
      "addressLine1": "Lucky street 1",
      "addressLine2": "2nd floor",
      "city": "Berlin",
      "countryCode": "DE",
      "postalCode": "10243",
      "type": "BILLING"
    }
  ],
  "bankAccount": {
    "bic": "COBADEFFXXX",
    "holder": "John Doe",
    "iban": "DE89370400440532013000",
    "isMainAccount": true,
    "name": "Sparkasse",
    "sepa": true
  },
  "companyName": "maesn",
  "contactType": "CONTACT_PERSON",
  "contactPersons": [
    {
      "emailAddresses": [
        {
          "email": "john.doe@company.com",
          "type": "BUSINESS"
        }
      ],
      "firstName": "John",
      "lastName": "Doe",
      "phoneNumbers": [
        {
          "number": "+49 7163307056",
          "type": "MOBILE"
        }
      ],
      "salutation": "Mr"
    }
  ],
  "documentId": "Z1248601M",
  "emailAddresses": [
    {
      "email": "john.doe@company.com",
      "type": "BUSINESS"
    }
  ],
  "number": "1042",
  "phoneNumbers": [
    {
      "number": "+49 7163307056",
      "type": "MOBILE"
    }
  ],
  "projectId": "3",
  "vatId": "DE123456789"
}'
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 123,
      "perPage": 123,
      "currentPage": 123,
      "totalPages": 123
    }
  },
  "data": {
    "id": "92c4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
    "addresses": [
      {
        "addressLine1": "Lucky street 1",
        "addressLine2": "2nd floor",
        "city": "Berlin",
        "countryCode": "DE",
        "postalCode": "10243",
        "type": "BILLING"
      }
    ],
    "companyName": "maesn",
    "contactType": "CONTACT_PERSON",
    "contactPersons": [
      {
        "emailAddresses": [
          {
            "email": "john.doe@company.com",
            "type": "BUSINESS"
          }
        ],
        "firstName": "John",
        "lastName": "Doe",
        "phoneNumbers": [
          {
            "number": "+49 7163307056",
            "type": "MOBILE"
          }
        ],
        "salutation": "Mr"
      }
    ],
    "documentId": "Z1248601M",
    "emailAddresses": [
      {
        "email": "john.doe@company.com",
        "type": "BUSINESS"
      }
    ],
    "number": "1042",
    "phoneNumbers": [
      {
        "number": "+49 7163307056",
        "type": "MOBILE"
      }
    ],
    "projectId": "3",
    "updatedDate": "2018-01-01T13:00:00.000Z",
    "vatId": "DE123456789"
  }
}

Field support per integration

Please ensure the query parameter environmentName is accurately populated with the appropriate environment. You can obtain this value by using the GET Environments endpoint available under the Authentication section.
Supported Request Parameters:
contactType
enum
required
Available options: CONTACT_PERSON, COMPANY
companyName
string
contactPersons
ContactPerson[]
addresses
Address[]
emailAddresses
EmailAddress[]
phoneNumbers
PhoneNumber[]
Please note that bexio doesn’t allow contact persons per company.
Supported Request Parameters:
contactType
enum
required
Available options: CONTACT_PERSON, COMPANY
companyName
string
contactPersons
ContactPerson[]
addresses
Address[]
emailAddresses
EmailAddress[]
phoneNumbers
PhoneNumber[]
Supported Request Parameters:
companyName
string
contactPersons
ContactPerson[]
addresses
Address[]
emailAddresses
EmailAddress[]
phoneNumbers
PhoneNumber[]
Supported Request Parameters:
contactType
enum
Available options: CONTACT_PERSON, COMPANY
companyName
string
contactPersons
ContactPerson[]
addresses
Address[]
emailAddresses
EmailAddress[]
phoneNumbers
PhoneNumber[]
If you’re not using the Interactive Authentication Flow, make sure the query parameter companyId is correctly populated. You can obtain this value by using the GET Companies endpoint available under the Authentication section.
Supported Request Parameters:
contactType
enum
required
Available options: CONTACT_PERSON, COMPANY
companyName
string
contactPersons
ContactPerson[]
addresses
Address[]
emailAddresses
EmailAddress[]
phoneNumbers
PhoneNumber[]
Supported Request Parameters:
companyName
string
contactPersons
ContactPerson[]
addresses
Address[]
emailAddresses
EmailAddress[]
phoneNumbers
PhoneNumber[]
vat
string
Please note that Xero allows a maximum of six contact persons per company.
Supported Request Parameters:
contactType
enum
required
Available options: CONTACT_PERSON, COMPANY
companyName
string
contactPersons
ContactPerson[]
addresses
Address[]
phoneNumbers
PhoneNumber[]

Headers

X-API-KEY
string
required

API key

X-ACCOUNT-KEY
string
required

Account key

Query Parameters

companyId
string
environmentName
string

Body

application/json
addresses
object[]
bankAccount
object
companyName
string
Example:

"maesn"

contactType
enum<string>
Available options:
CONTACT_PERSON,
COMPANY,
UNDEFINED
Example:

"CONTACT_PERSON"

contactPersons
object[]
documentId
string
Example:

"Z1248601M"

emailAddresses
object[]
number
string
Example:

"1042"

phoneNumbers
object[]
projectId
string
Example:

"3"

vatId
string
Example:

"DE123456789"

Response

200 - application/json
meta
object
data
object
I