0

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.

enter image description here

Thanks in advanced.

1
  • 1
    i'm pretty sure you need to use "id" instead of "customer_Id" Commented Sep 20, 2022 at 13:04

1 Answer 1

1

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();

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.