Skip to content

REST API Missing Product_Option values for Order Items #37567

Open
@mahmoud-abdelmalek

Description

@mahmoud-abdelmalek

Preconditions and environment

  • Magento version 2.4.4

Steps to reproduce

  1. In Magento Admin create a product with custom options -> Option Type -> Field
  2. In Magento Admin create a new Bundle product, add that product to Bundle Items
  3. Create and Save a Sales Order for the newly added Bundle Product
  4. Use Swagger or another development app to call salesOrderItemRepositoryV1 for Sale Order and return the response body
    GET /V1/orders/items?searchCriteria[filter_groups][0][filters][0][field]=order_id&searchCriteria[filter_groups][0][filters][0][value]={ORDER_ID}&searchCriteria[filter_groups][0][filters][0][condition_type]=eq

replace {ORDER_ID} with the created sale order id

Notice that the response body model shows product_option with Order Items structure. But the REST response does not contain the product_option property and its values. The same missing content occurs with salesOrderRepository V1 GET /V1/orders/{id}.

and sometimes you will get
{ "option_id": "82",
"option_value": "10218".
}
which doesn't have any meaning, the text entered in the field is missing and option_type or option_label is missing

When catalogProductRepositoryV1 GET /V1/products/{sku} is called for the Bundle products the response body correctly shows options

With Mag V1.9 SOAP API product_options is populated and the critical values are shown. This value is essential for controlling how the sales order is to be handled in our ERP systems

Expected result

REST API response body property product_option should be populated with values that include the text field value and it's label

Actual result

REST API response body property product_option is not included in the response body despite the model_schema showing it and the order containing bundle product with a custom field option

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions