Restful API: Metafield creation with options in it issue.
Hello,
I am trying to create a metafield inside the crm via restful api with all the countries but, I dont seem to find the correct way to create the json to populate the field with the options.
the current json body looks like this:
{
"type": "SELECT",
"name": "country",
"label": "Country",
"description": "A field to select a country.",
"icon": "IconWorld",
"isNullable": true,
"objectMetadataId": "{{$randomUUID}}",
"options": [
{
"id": "{{$randomUUID}}",
"color": "orange",
"label": "Afghanistan",
"value": "AFGHANISTAN",
"position": 0
},
{
"id": "{{$randomUUID}}",
"color": "pink",
"label": "Aland Islands",
"value": "ALAND ISLANDS",
"position": 1
}
]
}
but, the response I get is:
{
"statusCode": 400,
"messages": [
"Bad Request Exception"
],
"error": "Bad Request"
}
any clue why?
2 Replies
Hello @Denis, checking
I need to update documentation on that
GitHub
[Open Api] Update documentation to create field with an enum · Issu...
See this help post on discord -> https://discord.com/channels/1130383047699738754/1307654103672819794 { "type": "SELECT", "name": "country", "label&q...