cancel
Showing results for 
Search instead for 
Did you mean: 

override api returns

override api returns

Hey there,

I am looking for a way to add fields in the api responsse V1/orders

In V1/orders, products' options are displayed like this : 

"product_option": {
   "extension_attributes": {
      "custom_options": [
         {
            "option_id": "23",
            "option_value": "86"
         },
         {
            "option_id": "24",
            "option_value": "87"
         }
      ]
   }
}

I would like to also get here the option_type_title and option_type_price.
I know I can find them in /V1/products/{sku} but having to call multiple requests to get these data is not convenient.

Also, is it possible to get the product array 
"custom_attributes"?

I added a custom attribute to my product on backend, but I face the same issue : I can find it in /V1/products/{sku} but not in V1/orders

Many thanks!