Create Contact
Create a Contact object in Business Central.
HTTP request
Replace the URL prefix for Business Central depending on environment following the guideline.
POST {businesscentralPrefix}/companies({id})/contactsKTG
Request headers
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. |
| Content-Type | application/json |
Request body
In the request body, supply a JSON representation of ContactWebCon object.
Response
If successful, this method returns 201 Created response code and a contact object in the response body.
Example
Request
Here is an example of a request.
POST https://{businesscentralPrefix}/companies({id})/contactsKTG
Content-type: application/json
{
"number" : "108001",
"type" : "Company",
"displayName": "TSO-DATA GmbH",
"addressLine1": "Preußenweg 10",
"city": "Osnabrück",
"country": "DE",
"postalCode": "49076",
"responsibilityCenter": "HAMBURG",
}
Response
Here is an example of the response.
Note
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "b9c313c7-b53a-ee11-a0d1-af40da4af105",
"number": "108001",
"type": "Company",
"displayName": "TSO-DATA GmbH",
"name2": "",
"firstName": "",
"middleName": "",
"surname": "",
"companyNumber": "108001",
"companyName": "TSO-DATA GmbH",
"contactBusinessRelation": "None",
"addressLine1": "Preußenweg 10",
"addressLine2": "",
"city": "Osnabrück",
"state": "",
"country": "DE",
"postalCode": "49076",
"phoneNumber": "",
"mobilePhoneNumber": "",
"email": "",
"website": "",
"searchName": "TSO-DATA GMBH",
"privacyBlocked": false,
"taxRegistrationNumber": "",
"lastInteractionDate": "0001-01-01",
"lastModifiedDateTime": "2023-08-14T15:18:11.01Z",
"customerTemplateId": "00000000-0000-0000-0000-000000000000",
"customerTemplateCode": "DEBITOR UNTERNEHMEN",
"currencyCode": "",
"languageCode": "",
"responsibilityCenter": "HAMBURG",
"salutationCode": "MANDANT",
"onlinePassword": "",
"onlineLogin": ""
}
See also
Tips for working with the APIs
contact
Get contact
Delete contact
Update contact