How add fields in API

Hello, How add informations in API

CURL Command

curl --user “APITest\API.User” --header “Content-Type: application/json” --request POST --data ‘{“name”:“Contact Name Import”,“fields”:{“FirstName”:"{{Contact.Field(C_FirstName)}}"},“identifierFieldName”:“FirstName”}’ https://secure.p03.eloqua.com/api/bulk/2.0/contacts/imports

result :

Thanks for help

Hi.
Create a variable using “set value” step and set its contents to JSON format as needed for “fields” param.
Eg:

{“FirstName”:"{{Contact.Field(C_FirstName)}}"}

Then, add another field in the API action grid with key “fields” and value as binding of the variable created above.

Thanks sid,

fields is the variable name and variable value, is that right?

I have a problem when adding, the variable empties when I click on another location

Instead of Set Value I suggest using the Group step, and then inside you put Set Value for each field you want

Variable name can be anything. Key in API should be fields.
Check the value you are pasting… if its not a valid JSON, Wappler empties it.
The quotes are incorrect from what I can see.

Alternatively, you can use Group Step as Apple has suggested.

Thanks but how use Group ?

If you search the forum you find this topic:

thank Apple

Hi Apple

How to go from what I just did, on the left, to the desired result on the right

My Appconnect

Thanks

Hi kryo,

fieldValues need to be a List instead of Group, can you try? And then you need to add the elements (Groups) to the List

Thanks Apple, so it didn’t work, so I directly entered the Json code, integrating my variables, thanks again everyone