What is the Json Format for adding custom fields to a case from V2 API

35 views
Skip to first unread message

Rajveer singh jhala

unread,
Nov 26, 2018, 4:26:26 AM11/26/18
to Capsule API
Hello All,

Can anyone tell us the JSON format to add custom field from V2 API. Right now i am using below format but it is giving error.

$json_array = [
"kase" => [
"id" => xxxxxx,
"party" => [
"id" => xxxxxx,
"name" => "Workout Email",
],
"owner" => [
"id" => xxxxxx,
"username" => "Workout"
],
"description" => "Scope and design web site shopping cart",
"name" => "testds1 Consulting",
"fields" => [
"definition"=>[ ["name"=>"Employee Name","value"=> "ds ds test"] ]
]
]
];


it is giving error

"errors":[{"message":"invalid type for field","resource":"kase","field":"fields"}]}

Tom Bell

unread,
Nov 26, 2018, 4:39:49 AM11/26/18
to Capsule API
Hello Rajveer,

You will need to include the field definition ID in the field object (https://developer.capsulecrm.com/v2/operations/Custom_Field#listFields) for more information about the format of the object to put in the fields array you can check our documentation here https://developer.capsulecrm.com/v2/models/field_value

Thanks,
Tom - Capsule
Reply all
Reply to author
Forward
0 new messages