3

I have been following the Magento documents about API's.

https://devdocs.magento.com/swagger/index_20.html#/

I am using this API:

catalogProductAttributeOptionManagementV1

Using Postman I POST via API:

web/rest/es/V1/products/attributes/sgi_test/options

With the body:

{
    "option": {
        "value": "12",
        "sort_order": 0,
        "is_default": true,
        "store labels": [
            {
                "store_id": 1,
                "label": "U"
            }
        ]
    }
}

And it returns me true but it's not giving me the ID.

What I am seeking for is the ID in order to save the product created into SAP. Could I use another API? Or modify this one and add a function to get the ID?

2
  • Have you ever found a solution on this? I am having the exact same issue on Magento 2.2.11 Nov 24, 2020 at 15:10
  • Hey bud, I honestly don't remember, it was a long time ago. Try browsing between the different methods, maybe there's a list method you can use to retrieve the ID.
    – Raül
    Nov 24, 2020 at 21:06

0

Your Answer

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

Browse other questions tagged or ask your own question.