1

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"
 }]
 }
asked Jun 28, 2016 at 12:31

1 Answer 1

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.

answered Jun 28, 2016 at 13:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.