Quantcast
Channel: Microsoft Dynamics NAV Forum - Recent Threads
Viewing all articles
Browse latest Browse all 29197

Create Customer via API (Dynamics NAV 2018 BE localization)

$
0
0

Hello,

I am trying to create a Customer via API using Dynamics NAV 2018 BE localization.

I POST this to the customers endpoint:

{
  "displayName": "Test Customer Name 2",
  "type": "Company",
  "address": {
    "street": "Rue Osseghem, 69",
    "city": "BRUXELLES (MOLENBEEK-ST.-JEAN)",
    "state": "",
    "countryLetterCode": "BE",
    "postalCode": "1080"
  },
  "phoneNumber": "0491111111",
  "email": "zxxz@test.be",
  "website": "https://www.company2.be/",
  "taxLiable": true,
  "taxAreaId": "b6f66331-9a4d-4ba2-93f1-8264fa1d4160",
  "taxRegistrationNumber": "BE 0400 200 000",
  "currencyId": "00000000-0000-0000-0000-000000000000",
  "currencyCode": "EUR",
  "paymentTermsId": "50545c77-70a1-49ef-b562-b59be3e9d462",
  "paymentTerms": {
    "code": "FM",
    "description": "Mois en cours"
  },
  "paymentMethodId": "0c91ced9-43cb-4881-a730-fd2676166378",
  "paymentMethod": {
    "code": "BANQUE",
    "description": "Virement bancaire"
  },
  "shipmentMethodId": "34387235-adf1-443f-bf65-6687eaa7f53f",
  "shipmentMethod": {
    "code": "EXW",
    "description": "A l'usine"
  },
  "blocked": " ",
  "balance": 0,
  "overdueAmount": 0,
  "totalSalesExcludingTax": 0
}


But I get the following error (HTTP 400):

{
    "error": {
        "code": "Application_DialogException",
        "message": "You must use Enterprise No. for Belgian customers."
    }
}


I thought the taxRegistrationNumber would do but apparently that's not the case...

 I am referring to the official documentation

What field should I use to POST the Enterprise No.?

Any help is much appreciated!

Thanks,

Giovanni


Viewing all articles
Browse latest Browse all 29197

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>