Skip to main content
GET
/
api
/
v1
/
customers
JavaScript SDK
import { init } from "metrifox-js";

const metrifoxClient = init({
  apiKey: process.env.METRIFOX_API_KEY
});

// Get all customers with optional pagination
const response = await metrifoxClient.customers.list({
  page: 1,
  per_page: 25
});
{
  "statusCode": 200,
  "message": "Customers fetched",
  "meta": {
    "current_page": 1,
    "prev_page": null,
    "next_page": null,
    "per_page": 25,
    "total_pages": 1,
    "total_records": 2
  },
  "data": [
    {
      "id": "764c80e3-ed59-44a5-ba07-7ee5ba547774",
      "primary_email": "[email protected]",
      "primary_phone": "+1234567890",
      "legal_name": "Acme Corporation",
      "display_name": "Acme Corp",
      "legal_number": null,
      "tax_identification_number": null,
      "logo_url": null,
      "website_url": null,
      "account_manager": null,
      "first_name": null,
      "middle_name": null,
      "last_name": null,
      "full_name": "Acme Corporation",
      "billing_email": "[email protected]",
      "timezone": "America/New_York",
      "language": "en",
      "currency": "USD",
      "tax_status": "TAXABLE",
      "address_line1": "123 Business Ave",
      "address_line2": null,
      "city": "New York",
      "state": "NY",
      "country": "United States",
      "zip_code": "10001",
      "shipping_address_line1": null,
      "shipping_address_line2": null,
      "shipping_city": null,
      "shipping_state": null,
      "shipping_country": null,
      "shipping_zip_code": null,
      "created_at": "2025-08-22T13:15:18.434Z",
      "updated_at": "2025-08-22T13:15:18.434Z",
      "customer_type": "BUSINESS",
      "customer_key": "acme-corp-001",
      "phone_numbers": [],
      "email_addresses": [],
      "billing_configuration": {},
      "tax_identifications": [],
      "contact_people": [],
      "payment_terms": [],
      "metadata": {},
      "date_of_birth": null,
      "documents": {}
    },
    {
      "id": "864c80e3-ed59-44a5-ba07-7ee5ba547775",
      "primary_email": "[email protected]",
      "primary_phone": "+1987654321",
      "legal_name": null,
      "display_name": "Jane Doe",
      "legal_number": null,
      "tax_identification_number": null,
      "logo_url": null,
      "website_url": null,
      "account_manager": null,
      "first_name": "Jane",
      "middle_name": "Marie",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "billing_email": "[email protected]",
      "timezone": "America/Los_Angeles",
      "language": "en",
      "currency": "USD",
      "tax_status": "TAXABLE",
      "address_line1": "123 Main Street",
      "address_line2": "Apt 4B",
      "city": "Los Angeles",
      "state": "CA",
      "country": "United States",
      "zip_code": "90210",
      "shipping_address_line1": null,
      "shipping_address_line2": null,
      "shipping_city": null,
      "shipping_state": null,
      "shipping_country": null,
      "shipping_zip_code": null,
      "created_at": "2025-08-22T14:20:30.123Z",
      "updated_at": "2025-08-22T14:20:30.123Z",
      "customer_type": "INDIVIDUAL",
      "customer_key": "jane-doe-001",
      "phone_numbers": [],
      "email_addresses": [],
      "billing_configuration": {},
      "tax_identifications": [],
      "contact_people": [],
      "payment_terms": [],
      "metadata": {},
      "date_of_birth": "1985-06-15",
      "documents": {}
    }
  ]
}

Authorizations

x-api-key
string
header
required

Query Parameters

page
integer

Page number

per_page
integer

Number of records per page

Response

Customers fetched

statusCode
integer
Example:

200

message
string
Example:

"Customers fetched"

meta
object
data
object[]