Skip to content

Update the logged customer account

Endpoint: https://my-store.youcan.shop/api/customers/account

Method: PUT

Parameters

Param NameParam TypeDescriptionRequired
emailstringCustomer emailoptional
passwordstringCustomer passwordoptional
password_confirmationstringCustomer password configurationwith password
first_namestringCustomer first nameoptional
last_namestringCustomer last nameoptional
countrystringCustomer countryoptional
regionstringCustomer regionoptional
citystringCustomer cityoptional
notesstringNotesoptional

Response

To authenticate you get the customer token for the Login endpoint

[401] Unauthorized

json
{
    "status": 401,
    "detail": "Unauthenticated.",
    "meta": []
}

[422] Unprocessable Entity

json
{
    "status": 422,
    "detail": "The given data was invalid.",
    "meta": {
        "fields": {
            "first_name": [
                "The first name field is required."
            ],
            "last_name": [
                "The last name field is required."
            ],
            "phone": [
                "The phone already exists in this store."
            ],
            "email": [
                "The email already exists in this store."
            ]
        }
    }
}

[200] OK

json
{
    "message": "Customer account updated successfully",
    "type": "success",
    "data": null
}