v2 is generally available. See what changed
Skip to content
Acme Commerce API Menu

List customers

GET /api/v2/customers Requires authentication 60 requests per minute v2

Send a bearer token in the Authorization header.

Returns a paginated list of customers, newest first. Use status to narrow the list, and q to search across name and email.

Full URL: https://api.acme.example/api/v2/customers

Changed since v1

  • accepts a new optional query parameter q

Query parameters

Name Type Required Description
per_page integer no Results per page, 1–100.
page integer no Page number, 1-indexed.
status string, one of active, invited, archived no Only customers in this state.
q string, maxLength 120 no Free-text search over name and email.

Responses

200 A page of customers.

Field Type Description
data array
data[].id integer
data[].email string<email>
data[].name string
data[].status string, one of active, invited, archived
data[].created_at string<date-time>

401 Missing or expired bearer token.

Example request

cURL
curl -X GET 'https://api.acme.example/api/v2/customers' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
JavaScript
const response = await fetch('https://api.acme.example/api/v2/customers', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Accept': 'application/json'
  }
});

const data = await response.json();
PHP (Laravel)
use Illuminate\Support\Facades\Http;

$response = Http::withHeaders([
    'Authorization' => 'Bearer YOUR_TOKEN',
    'Accept' => 'application/json',
])->get('https://api.acme.example/api/v2/customers');

$data = $response->json();
PHP (Guzzle)
use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('GET', 'https://api.acme.example/api/v2/customers', [
    'headers' => [
        'Authorization' => 'Bearer YOUR_TOKEN',
        'Accept' => 'application/json',
    ],
]);

$data = json_decode((string) $response->getBody(), true);

Example response

200
{
    "data": [
        {
            "id": 1,
            "email": "jane@example.com",
            "name": "Jane Doe",
            "status": "active",
            "created_at": "2026-01-15T09:30:00Z"
        },
        {
            "id": 2,
            "email": "sam@example.com",
            "name": "Sam Reyes",
            "status": "invited",
            "created_at": "2026-01-14T16:02:11Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 2
    }
}

Free while you are building.

Get an API key

This page as Markdown, or the whole API as OpenAPI. Ask ChatGPT Ask Claude