7

I'm trying to retrieve orders from the REST API in Magento Enterprise 2.3.1, and that's easy enough with endpoints like /rest/default/V1/orders, but while I can see the values for custom options of the items in the order, I can't see their labels. For example:

"product_option": {
    "extension_attributes": {
        "custom_options": [
            {
                "option_id": "3730",
                "option_value": "Some text value."
            },
            {
                "option_id": "3731",
                "option_value": ""
            }
        ]
    }
}

It's great that I can see that for one of the custom options, the customer said "Some text value.", but I'd really like to know what it was they were responding to. What I'd expect to see for each custom option is something like:

{
    "option_id": "3728",
    "option_label": "What's your favorite Star Trek ship?"
    "option_value": "U.S.S. Excelsior"
} 

So far, any time I can find a way to load an order via the REST API, it is returned this way, and I don't see any other way to get the custom option label.

It's hard to believe I'm the first person to come across this - am I just missing something obvious?

6
  • Hello @mike did you got the above solution ? Nov 19 '19 at 5:58
  • No, as of yet I have no idea. I've been working on some other stuff though, and need to get back to this.
    – Mike
    Jan 9 '20 at 12:59
  • Hello @mike Have you got the solution? Apr 29 '20 at 10:25
  • I haven't revisited this in a while, but I haven't seen anything about it, either.
    – Mike
    May 1 '20 at 18:31
  • Any update on this? Did you get this resolved? Sep 8 '20 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.