I want to return value from magento2 when creating an attribute option, I make such a request with method POST

              "label": "Pavel",
              "value": "option_x",
              "sort_order": 0,
              "is_default": true


The response value comes from the value of my request, that is, option_x, can I somehow set the id value that will be returned from the created option ? I want the id created option from magento to be returned to me

  • Can you please describe your requirement in detail. what you are looking? – Dhiren Vasoya Aug 27 '19 at 14:06
  • When I create an attribute, I want to return the value of the created attribute from magento, that is, its value in magento2, to write it to the database without making 2 requests for receiving and publishing – Паша Иванов Aug 27 '19 at 14:12

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.