Question

API Request message with value and array in one identical item

  • 16 November 2023
  • 0 replies
  • 29 views

  • Transonic 0.8
  • 0 replies

My request message looks like this:

 

{
    "fieldValues": [
        {
            "fieldTypeId": "TagForTypeCode",
            "value": "Fuel"
        },
        {
            "fieldTypeId": "TagForTypeDescription",
            "value": {
                "en": "Description",
                "nl-NL": "Omschrijving"
            }
    ]
}

Sometimes the item fieldValues has a fieldTypeId with a value with a string (“Fuel”) and sometimes the item fieldValues has a fieldTypeId with a value with an array (“en” and “nl-NL”).

Whenever I try to pass a value to the array, Tosca won't fill it:
 


Technical View:

{
"fieldValues": [
{
"fieldTypeId": "TagForTypeCode",
"value": "Fuel"
},
{
"fieldTypeId": "TagForTypeDescription",
"value": ""
}
]
}

 

Whenever I try to run it, I get the following error that the message generation has failed:

 

How can I add data into this array?


0 replies

Be the first to reply!

Reply