Magento 2 REST API Customer Custom Attribute

Viewed 4322

The Magento 2 REST API Documentation explains a way to set custom_attributes on a customer when updating or creating it. http://devdocs.magento.com/swagger/index_20.html#/

Unfortunately I couldn't get this to work...

My POST and PUT JSON request data is :

{
    "customer": {
        "custom_attributes": [
            {
                "attribute_code": "firstname",
                "value": "TEST"
            }
        ],
        "email": "someone@exaxmple.com",
        "extension_attributes": [],
        "firstname": "Someone",
        "gender": null,
        "lastname": "Else",
        "middlename": null,
        "taxvat": null,
        "website_id": "1"
    }
}

The Customer is created but the Firstname is not "TEST". Is there anyone who had the same problem and fixed it? Please let me know how.

1 Answers
Related