JSON Structure

0
Hello! I'm trying to use the API of the Dutch Chamber of Commerce. I have pasted the JSON structure below. The curious thing when I'm importing this into a import mapping, is that the address is not recognized (see screenshot). What am I doing wrong and how can I solve this? Thanks in advance. {   "apiVersion": "2.0",   "meta": {},   "data": {     "itemsPerPage": 10,     "startPage": 1,     "totalItems": 2,     "items": [       {         "kvkNumber": "68727720",         "rsin": "857567433",         "tradeNames": {           "shortBusinessName": "Test NV Katrien",           "currentStatutoryNames": [             "Test NV Katrien"           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": true,         "isLegalPerson": true,         "isBranch": false,         "isMainBranch": false       },       {         "kvkNumber": "68727720",         "branchNumber": "000037143557",         "rsin": "857567433",         "tradeNames": {           "businessName": "Test NV Katrien",           "shortBusinessName": "Test NV Katrien",           "currentTradeNames": [             "Test NV Katrien"           ],           "currentStatutoryNames": [             "Test NV Katrien"           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": true,         "isLegalPerson": false,         "isBranch": true,         "isMainBranch": true,         "addresses": [           {             "type": "vestigingsadres",             "street": "Rietdekkershof",             "houseNumber": "8",             "houseNumberAddition": "",             "postalCode": "9646AS",             "city": "Veendam",             "country": "Nederland"           }         ]       }     ]   } }
asked
1 answers
1

My guess is Mendix just uses the first 'Item' element to read the maping. The first element in your example does not have an adress, only the second item does. Try importing with this:

{
  "apiVersion": "2.0",
  "meta": {},
  "data": {
    "itemsPerPage": 10,
    "startPage": 1,
    "totalItems": 2,
    "items": [
      {
        "kvkNumber": "68727720",
        "branchNumber": "000037143557",
        "rsin": "857567433",
        "tradeNames": {
          "businessName": "Test NV Katrien",
          "shortBusinessName": "Test NV Katrien",
          "currentTradeNames": [
            "Test NV Katrien"
          ],
          "currentStatutoryNames": [
            "Test NV Katrien"
          ]
        },
        "hasEntryInBusinessRegister": true,
        "hasNonMailingIndication": true,
        "isLegalPerson": false,
        "isBranch": true,
        "isMainBranch": true,
        "addresses": [
          {
            "type": "vestigingsadres",
            "street": "Rietdekkershof",
            "houseNumber": "8",
            "houseNumberAddition": "",
            "postalCode": "9646AS",
            "city": "Veendam",
            "country": "Nederland"
          }
        ]
      }
    ]
  }
}

answered