- Get Started
- Product
- Build
- User Guide
- Cloud
- Get Started
- Product
- Build
- Tools
- Reference
- User Guide
- Cloud
This documentation provides a reference to the sdk.admin.customer
set of methods used to send requests to Medusa's Admin API routes.
This method creates a customer. It sends a request to the Create Customer API route.
Promise
Promise<AdminCustomerResponse>This method updates a customer's details. It sends a request to the Update Customer API route.
id
stringPromise
Promise<AdminCustomerResponse>This method retrieves a paginated list of customers. It sends a request to the List Customers API route.
To retrieve the list of customers:
To configure the pagination, pass the limit
and offset
query parameters.
For example, to retrieve only 10 items and skip 10 items:
Using the fields
query parameter, you can specify the fields and relations to retrieve
in each customer:
Learn more about the fields
property in the API reference.
Promise
Promise<AdminCustomerListResponse>This method retrieves a customer by its ID. It sends a request to the Get Customer API route.
To retrieve a customer by its ID:
To specify the fields and relations to retrieve:
Learn more about the fields
property in the API reference.
id
stringPromise
Promise<AdminCustomerResponse>This method deletes a customer by its ID. It sends a request to the Delete Customer API route.
id
stringPromise
Promise<AdminCustomerDeleteResponse>This method manages customer groups for a customer. It sends a request to the Manage Customers API route.
id
stringbody
AdminBatchLinkPromise
Promise<AdminCustomerResponse>This method creates a customer address. It sends a request to the Create Customer Address API route.
id
stringPromise
Promise<AdminCustomerResponse>This method updates a customer address. It sends a request to the Update Customer Address API route.
id
stringaddressId
stringPromise
Promise<AdminCustomerResponse>This method deletes a customer address. It sends a request to the Delete Customer Address API route.
id
stringaddressId
stringPromise
Promise<AdminCustomerResponse>This method retrieves a customer address by its ID. It sends a request to the Get Customer Address API route.
id
stringaddressId
stringPromise
Promise<AdminCustomerResponse>This method retrieves a list of customer addresses. It sends a request to the List Customer Addresses API route.
id
stringPromise
Promise<AdminCustomerResponse>