# mba-cli customer

> Read customers (key-scoped)

Read customers (key-scoped)

CLI version: `0.3.2`

## Commands

### mba-cli customer get

Get one customer by id

Retrieve customer by ID

Fetches detailed customer information using their unique identifier. Returns complete profile including team associations, Xero integration status, and custom field values. This endpoint is similar to the get_all_customers endpoint, but it only returns a single customer.

Get one customer by id

Flags:

- `--id` (string): Customer record id

API endpoints:

- GET /customers/{id} — https://mybusinessapp.co.za/developers/api/customer#tag/Customer/get_single_customer

### mba-cli customer ls

List customers (default: page 1, 20 per page)

List all customers with pagination and filtering

Retrieves a paginated list of customers with optional team-based filtering. Supports customizable page size and team-specific views. Returns customer profiles with their associated metadata and team relationships. Allows filtering by date range based on when customers were created using from date and to date parameters. Custom-field filters use the repeatable cf_<fieldId>=<value> convention, where fieldId is a custom_field_definitions.id.

List customers (default: page 1, 20 per page)

Flags:

- `--all` (bool, default `false`): Return all rows (paginate=false)
- `--from-date` (string): Query parameter fromDate (from the API spec)
- `--has-addresses` (bool): Query parameter hasAddresses (from the API spec)
- `--has-bookings` (bool): Query parameter hasBookings (from the API spec)
- `--has-pets` (bool): Query parameter hasPets (from the API spec)
- `--is-difficult` (bool): Query parameter isDifficult (from the API spec)
- `--is-late-payer` (bool): Query parameter isLatePayer (from the API spec)
- `--limit` (int, default `20`): Query parameter limit (from the API spec)
- `--max-bookings` (int): Query parameter maxBookings (from the API spec)
- `--max-pets` (int): Query parameter maxPets (from the API spec)
- `--min-bookings` (int): Query parameter minBookings (from the API spec)
- `--min-pets` (int): Query parameter minPets (from the API spec)
- `--page` (int, default `1`): Query parameter page (from the API spec)
- `--paginate` (bool, default `true`): Query parameter paginate (from the API spec)
- `--query` (string): Query parameter query (from the API spec)
- `--team-id` (string): Query parameter teamId (from the API spec)
- `--team-ids` (string): Query parameter teamIds (from the API spec)
- `--to-date` (string): Query parameter toDate (from the API spec)

API endpoints:

- GET /customers — https://mybusinessapp.co.za/developers/api/customer#tag/Customer/get_all_customers

### mba-cli customer search

Text-search customers

Search customers with text matching, pagination and filtering

Performs semantic text search across customer records with pagination and team filtering. Matches against names, emails, phone numbers, user ID, customer EFT reference and other relevant fields. Supports advanced filtering and sorting options, including filtering by when customers were created using a date range. This endpoint is similar to the get_all_customers endpoint, but it only returns a list of customers that match the search query. Custom-field filters use the repeatable cf_<fieldId>=<value> convention, where fieldId is a custom_field_definitions.id.

Text-search customers

Flags:

- `--all` (bool, default `false`): Return all rows (paginate=false)
- `--from-date` (string): Query parameter fromDate (from the API spec)
- `--has-addresses` (bool): Query parameter hasAddresses (from the API spec)
- `--has-bookings` (bool): Query parameter hasBookings (from the API spec)
- `--has-pets` (bool): Query parameter hasPets (from the API spec)
- `--is-difficult` (bool): Query parameter isDifficult (from the API spec)
- `--is-late-payer` (bool): Query parameter isLatePayer (from the API spec)
- `--limit` (int, default `20`): Query parameter limit (from the API spec)
- `--max-bookings` (int): Query parameter maxBookings (from the API spec)
- `--max-pets` (int): Query parameter maxPets (from the API spec)
- `--min-bookings` (int): Query parameter minBookings (from the API spec)
- `--min-pets` (int): Query parameter minPets (from the API spec)
- `--page` (int, default `1`): Query parameter page (from the API spec)
- `--paginate` (bool, default `true`): Query parameter paginate (from the API spec)
- `--query` (string): Query parameter query (from the API spec)
- `--team-id` (string): Query parameter teamId (from the API spec)
- `--team-ids` (string): Query parameter teamIds (from the API spec)
- `--to-date` (string): Query parameter toDate (from the API spec)

API endpoints:

- GET /customers/search — https://mybusinessapp.co.za/developers/api/customer#tag/Customer/search_all_customers

---

[Rendered page](https://mybusinessapp.co.za/developers/cli/reference/customer)

© MyBusinessApp (Pty) Ltd. Proprietary documentation — do not republish.
