Zum Inhalt

Create Customer

Create a Customer object in Business Central.

HTTP request

Replace the URL prefix for Business Central depending on environment following the guideline.

POST {businesscentralPrefix}/companies({id})/customersWebCon

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json

Request body

In the request body, supply a JSON representation of CustomerWebCon object.

Response

If successful, this method returns 201 Created response code and a customer object in the response body.

Example

Request

Here is an example of a request.

POST https://{businesscentralPrefix}/companies({id})/customersWebCon
Content-type: application/json

{
    "displayName": "TSO-DATA GmbH",
    "type": "Company",
    "addressLine1": "Preußenweg 10",
    "city": "Osnabrück",
    "postalCode": "49086",
    "phoneNumber": "054113950",
    "email": "info@tso.de",
    "website": "https://tso.de/",
    "taxAreaId": "93592a39-dcd8-ed11-a7cd-000d3a392f9f",
    "taxRegistrationNumber": "DE117647926",
    "currencyCode": "EUR",
    "languageCode": "DEU",
    "generalBusinessPostingGroupCode": "INLAND",
    "customerPostingGroup": "INLAND",
    "vatBusinessPostingGroup": "INLAND"
}

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": "87136c50-2b4b-ee11-a0d4-ed2bcbb47b87",
    "number": "D00130",
    "displayName": "TSO-DATA GmbH",
    "name2": "",
    "type": "Company",
    "addressLine1": "Preußenweg 10",
    "addressLine2": "",
    "city": "Osnabrück",
    "state": "",
    "country": "",
    "postalCode": "49086",
    "phoneNumber": "054113950",
    "mobilePhoneNumber": "",
    "email": "info@tso.de",
    "website": "https://tso.de/",
    "searchName": "TSO-DATA GMBH",
    "balanceDue": 0,
    "creditLimit": 0,
    "taxLiable": false,
    "taxAreaId": "93592a39-dcd8-ed11-a7cd-000d3a392f9f",
    "taxAreaDisplayName": "Inländ. Debitoren und Kreditoren",
    "taxRegistrationNumber": "DE117647926",
    "currencyId": "00000000-0000-0000-0000-000000000000",
    "currencyCode": "EUR",
    "paymentTermsId": "d1532a39-dcd8-ed11-a7cd-000d3a392f9f",
    "shipmentMethodId": "aa562a39-dcd8-ed11-a7cd-000d3a392f9f",
    "paymentMethodId": "00000000-0000-0000-0000-000000000000",
    "blocked": " ",
    "languageCode": "DEU",
    "responsibilityCenter": "",
    "generalBusinessPostingGroupCode": "INLAND",
    "customerPostingGroup": "INLAND",
    "vatBusinessPostingGroup": "INLAND",
    "customerPriceGroup": "",
    "customerDiscoutGroup": "",
    "allowLineDiscount": true,
    "invoiceDiscountCode": "D00130",
    "lastModifiedDateTime": "2023-09-04T13:59:51.033Z"
}

See also

Tips for working with the APIs
customer
Get customer
Delete customer
Update customer