Skip to content

Setting Custom Property in customer using APi in Magento

I’m passing a custom property value using an API. The problem is that I am sending “Device Registration” as the origin ( custom property ) but the value that is being set in as “D365FO” why is this happening I’m not sure

{
    "customer": {
        "email": "[email protected]",
        "firstname": "Hoor",
        "lastname": "Iqbal",
        "store_id": 1,
        "website_id": 1,
        "custom_attributes": [
        {
            "attribute_code": "origin",
            "value": "Device registration"
        }
            ]
    },
    "password": "Test@hoor28"
    
}

and this is the response

{
    "id": 40159,
    "group_id": 1,
    "created_at": "2024-07-05 13:24:37",
    "updated_at": "2024-07-05 13:24:37",
    "created_in": "Hookah-Shisha",
    "email": "[email protected]",
    "firstname": "Hoor",
    "lastname": "Iqbal",
    "store_id": 1,
    "website_id": 1,
    "addresses": [],
    "disable_auto_group_change": 0,
    "extension_attributes": {
        "company_attributes": {
            "customer_id": 40159,
            "company_id": 0,
            "status": 1
        },
        "is_subscribed": false
    },
    "custom_attributes": [
        {
            "attribute_code": "yotpo_force_cart_reload",
            "value": "0"
        },
        {
            "attribute_code": "age_verification_override",
            "value": "0"
        },
        {
            "attribute_code": "is_ageverified",
            "value": "0"
        },
        {
            "attribute_code": "migrate_customer",
            "value": "0"
        },
        {
            "attribute_code": "is_sales_verified",
            "value": "0"
        },
        {
            "attribute_code": "yotpo_accepts_sms_marketing",
            "value": "0"
        },
        {
            "attribute_code": "origin",
            "value": "D365FO"
        },
        {
            "attribute_code": "update_by",
            "value": "Magento"
        }
    ]
}