Customers

As the name suggests, this endpoint allows you to retrieve list of your customer. On this page, we'll dive into how you can retrieve your customer details programmatically. If you made an impact on behalf of your customers, those customers get automatically onboarded to your organization. You can retrieve the list of all your customers and their impact records using the /customers and /customer_records endpoints.


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"
}