Python SDK
from metrifox_sdk import MetrifoxClient
client = MetrifoxClient(api_key="your_api_key")
# Get all customers with optional pagination
response = client.customers.list({
"page": 1,
"per_page": 25
})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
});
require 'metrifox-sdk'
# Initialize with configuration
METRIFOX_SDK = MetrifoxSDK.init({ api_key: "your-api-key" })
# Get all customers with optional pagination
response = METRIFOX_SDK.customers.list({
page: 1,
per_page: 25
})
curl --request GET \
--url https://{defaultHost}/api/v1/customers \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/api/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/api/v1/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{defaultHost}/api/v1/customers")
.header("x-api-key", "<api-key>")
.asString();{
"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": "john@acme.com",
"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": "billing@acme.com",
"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": "jane.doe@example.com",
"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": "jane.doe@example.com",
"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": {}
}
]
}{
"message": "<string>",
"errors": {}
}Customers
Get Customers
Retrieve all your customer details
GET
/
api
/
v1
/
customers
Python SDK
from metrifox_sdk import MetrifoxClient
client = MetrifoxClient(api_key="your_api_key")
# Get all customers with optional pagination
response = client.customers.list({
"page": 1,
"per_page": 25
})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
});
require 'metrifox-sdk'
# Initialize with configuration
METRIFOX_SDK = MetrifoxSDK.init({ api_key: "your-api-key" })
# Get all customers with optional pagination
response = METRIFOX_SDK.customers.list({
page: 1,
per_page: 25
})
curl --request GET \
--url https://{defaultHost}/api/v1/customers \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/api/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/api/v1/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{defaultHost}/api/v1/customers")
.header("x-api-key", "<api-key>")
.asString();{
"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": "john@acme.com",
"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": "billing@acme.com",
"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": "jane.doe@example.com",
"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": "jane.doe@example.com",
"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": {}
}
]
}{
"message": "<string>",
"errors": {}
}⌘I

