List customers
GET
/customers
const url = 'https://api.getdpd.com/v2/customers?date_min=2024-01-01&date_max=2024-12-31';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.getdpd.com/v2/customers?date_min=2024-01-01&date_max=2024-12-31' \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”email
string
Matches the start of the address, not case sensitive.
first_name
string
Matches the start of the name, not case sensitive.
last_name
string
Matches the start of the name, not case sensitive.
product_id
integer
Only customers who bought this product.
receives_newsletters
boolean
Only customers who do (or don’t) get your product update emails.
date_min
string
Created after this date (anything PHP’s strtotime() accepts).
date_max
string
Created before this date (anything PHP’s strtotime() accepts).
page
integer
Page number, 100 records per page. Leave it off to try to get every record.
Responses
Section titled “Responses”The matching customers.
Media typeapplication/json
Array<object>
object
id
integer
firstname
string
lastname
string
email
string
receives_email
Whether the customer gets your product update emails.
boolean
created_at
UNIX timestamp (seconds).
integer
updated_at
UNIX timestamp (seconds).
integer
Example generated
[ { "id": 1, "firstname": "example", "lastname": "example", "email": "example", "receives_email": true, "created_at": 1, "updated_at": 1 }]The username or API password is wrong.
Nothing found: the record doesn’t exist or isn’t yours, the list is empty, or the page is past the last one.
Media typeapplication/json
object
status
string
Example
{ "status": "NOTFOUND"}