Log in
Repository

CustomerRepositoryInterface

Magento\Customer\Api\CustomerRepositoryInterface

What it does

This interface defines the contract for managing customer data in Magento 2.

Developers use this repository to create, read, update, and delete customer records programmatically, retrieve customers by email or ID, and search for customers using specific criteria.

It's the primary API for customer operations and should be used via dependency injection whenever working with customer data.

Public Methods

  • save()
  • get()
  • getById()
  • getList()
  • delete()
  • deleteById()