Post a custom property to a reconciliation

Hi! I am trying to create an import using the api-documenatation and have not problems doing this for normal custom properties. However, I cannot figure out how to import where the custom input is in a fori-loop. The property I am trying to import data to looks like this in debug mode:

{
“namespace”: “trading_company”,
“key”: “trading_company_1”,
“value”: {
“namn”: “namn 2”,
“orgnr”: “556677-0002”,
“end_year”: “31/12/2023”,
“start_year”: “01/01/2023”,
“noSwedishId”: true
},

How should this be entered in the api-documenation tool to get the data imported?

Hi @Bjorn_Lindroth

In this case, you’ll have to split up the different inputs in a properties array to assign values to each different namespace/key combination.

In your example this would mean that the call would have the following parameters:

{
“properties[namespace]” : “trading_company”,
“properties[key]”: “trading_company_1.namn”,
“properties[value]” : “namn2”
“properties[namespace]” : “trading_company”,
“properties[key]”: “trading_company_1.orgnr”,
“properties[value]” : “556677-0002”
“properties[namespace]” : “trading_company”,
“properties[key]”: “trading_company_1.end_year”,
“properties[value]” : “31/12/2023”,
“properties[namespace]” : “trading_company”,
“properties[key]”: “trading_company_1.start_year”,
“properties[value]” : “01/01/2023”,
“properties[namespace]” : “trading_company”,
“properties[key]”: “trading_company_1.noSwedishId”,
“properties[value]” : true
}

The API developer pages only allows for one set of namespace and key to be used in the request, but in your application you would add the full set in the body parameters of your request.

Does this help you further?

Thanks! I think that covers what we need for now so I will continue setting up the import and think I will be able to get all we need now up and running.