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

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

// Get a customer by key
const customerKey = "acme-corp-001";
const response = await metrifoxClient.customers.get(customerKey);
{
  "message": "Customer fetched",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "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": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "customer_type": "BUSINESS",
    "customer_key": "acme-corp-001",
    "phone_numbers": [],
    "email_addresses": [
      {
        "email": "[email protected]",
        "is_primary": true
      }
    ],
    "billing_configuration": {},
    "tax_identifications": [],
    "contact_people": [],
    "payment_terms": [],
    "metadata": {},
    "date_of_birth": null,
    "documents": {},
    "mid_cycle_invoice_consolidation": false
  }
}

Authorizations

x-api-key
string
header
required

Path Parameters

customer_key
string
required

Unique identifier of the customer in your application to retrieve

Response

Customer fetched

message
string
Example:

"Customer fetched"

data
object