T
Twenty5d ago
Denis

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
martmull
martmull3d ago
Hello @Denis, checking
- "value":"ALAND ISLANDS",
+ "value":"ALAND_ISLANDS",
- "value":"ALAND ISLANDS",
+ "value":"ALAND_ISLANDS",
I need to update documentation on that
Want results from more Discord servers?
Add your server