I have contacts with an Alphanumeric/CheckBox custom field on, and I have relationships with an Alphanumeric/CheckBox custom field on. (The former is legacy and is copied into the latter.) These seem to be returned differently when using the getsingle API call. Why is this?
For example:
$ drush -u <uid> cvapi Contact.getsingle id=<cid> contact_type=Individual contact_sub_type=Student return=custom_42
Array
(
...
[custom_42] => Array
(
[0] => Fundraise_Donate_for_specific_school_needs
[1] => Apply_to_become_a_Governor
[2] => Be on a poster displayed in your old school/college
)
...
)
but:
$ drush -u <uid> cvapi Relationship.getsingle id=<rid> relationship_type_id=21 return=custom_112
Array
(
...
[custom_112] => Array
(
[Fundraise_Donate_for_specific_school_needs] => 1
[Apply_to_become_a_Governor] => 1
[Be on a poster displayed in your old school/college] => 1
)
...
)
CustomValue.get, however, returns the same format for the Contact and the Relationship field, and that format is more like the Contact one above.