Creating Customer / Contacts via API

Hello,

we are trying to create a customer with the following values via the api - the POST request is executed correctly, but not all data is passed.

For the beginning we are trying to set the:

  • Name of the Contact
  • Mail-Adress of the Contact
  • Company Business Adress Information

Can someone explain, what a correct request body should look like for the mentioned informations to be created in awork?

We tried the information provided in: awork API
Our current request body is:

{
"name": "Testcompany",
 "Has image": false,
  "Company contact infos": [
    {
      "Type": "address",
      "Sub type": "central",
      "Address line 1": "Testweg 36",
      "ZIP code": "66666",
      "City": "Munich",
      "State": "Bayern",
      "Country": "DE"
    },
    {
      "Type": "email",
      "Sub type": "central",
      "Value": "info@test.de"
    }
  ]
}

Thanks in advance!

Hi @tim.lindlar, sorry for the late response. You need to create the company and contact info separately. First create the company with POST /companies, then take the company id our API returns, then call POST /companies/{companyId}/contactInfos to send the various contact details of this company.

I hope this helps.