Customers

The Customers API allows you to retrieve and manage your onboarded customers — those for whom you've planted trees, cleaned ocean waste, captured carbon, or made donations. This endpoint gives you access to each customer's details and enables you to build personalized experiences around their environmental contributions.

When you create an impact on behalf of a customer using their customer_email, they are automatically onboarded to your organization. You can then retrieve their profiles using the /customers endpoint and view their full impact history using the /customer_records endpoint.


GET/v1/customers

Retrieve your customers

This endpoint allows you to query list of your customers.

Optional query params

  • Name
    customer_email
    Type
    string
    Description

    You can provide the email of a specific customer whose details you want to retrieve or to check if the customer is a part of your organization.

  • Name
    limit
    Type
    integer
    Description

    Limit the number of customers returned. The default value is 10. The value must be between 0 and 1000.

  • Name
    cursor
    Type
    string
    Description

    The cursor from the response can be used as query parameter in the next request to fetch the subsequent list of customers. Refer to Pagination section for more details.

Request

GET
/v1/customers
curl --location 'https://api.1clickimpact.com/v1/customers' \
--header 'x-api-key: {PRODUCTION API KEY}'

Response

{
  "customers":
  [
    {
      "customer_id": "U1234",
      "customer_email": "sample-customer-1@email.com",
      "customer_name": "Sample Customer 1",
      "onboarded_on": "2024-06-12T15:22:14.753Z"
    },
    {
      "customer_id": "U789",
      "customer_email": "sample-customer-2@email.com",
      "customer_name": "Sample Customer 2",
      "onboarded_on": "2024-06-15T16:41:58.323Z"
    },
    {
      "customer_id": "U5678",
      "customer_email": "sample-customer-3@email.com",
      "customer_name": "Sample Customer 3",
      "onboarded_on": "2024-06-21T18:16:02.083Z"
    },
    {
      "customer_id": "U3456",
      "customer_email": "sample-customer-4@email.com",
      "customer_name": "Sample Customer 4",
      "onboarded_on": "2024-06-21T20:34:35.913Z"
    },
    {...},
    {...}
  ],
  "cursor": "fNJjcmV32dGVkTiOiIyMDI0LTA3LTidXNlcklE3UiVTk2OTQ0MDcwIpT"
}