I have added a custom attribute say child_first_name to customer entity. When I try to access through rest API, I can able to get the attribute in the result-
snip..
{
"custom_attributes": [ {
"attribute_code": "child_first_name",
"value": "No name for student"
}]
}
However is it possible to group custom attributes like address in the api result. For example-
snip..
{
"child_info": [ {
"child_first_name": "some name"
}]
}
1 Answer 1
In short, no. The API uses that form so that the schema (keys) are always known and predictable, even if the data itself varies. This isn't particularly significant for REST/JSON, but it's very significant for SOAP (XML), which has a pregenerated WSDL defining the schema.