Getting this error: {"message":"Property "CustomerId" does not have accessor method "getCustomerId" in class "Magento\Customer\Api\Data\CustomerInterface".
Customer is not exist so getting this error.
Thanks in advanced.
Getting this error: {"message":"Property "CustomerId" does not have accessor method "getCustomerId" in class "Magento\Customer\Api\Data\CustomerInterface".
Customer is not exist so getting this error.
Thanks in advanced.
If you review the interface Magento specifies in the error message, you'll see there is indeed no getCustomerId
accessor method. The correct accessor method is getId
:
interface CustomerInterface extends \Magento\Framework\Api\CustomAttributesDataInterface
{
...
/**
* Get customer id
*
* @return int|null
*/
public function getId();