KashierDevelopersKashier Developers

List all customers

curl -X GET "https://test-api.kashier.io/v2/customers"
{  "body": {    "customers": [      {        "_id": "67ba0311bf4f31001203c6c2",        "name": "John Doe",        "phoneNumber": "1123456789",        "emailAddress": "[email protected]",        "customerId": "C-1740243729820",        "merchantId": "MID-XXXXX-XXX",        "customFields": [          {            "name": "custom-key-1",            "value": "custom-value-1"          },          {            "name": "custom-key-2",            "value": "custom-value-2"          }        ],        "createdAt": "2025-02-22 17:02:10.098000+00:00",        "updatedAt": "2025-02-25 12:31:40.474000+00:00",        "id": "67ba0311bf4f31001203c6c2"      },      {        "_id": "67b9f78287c9970012383912",        "name": "Jane Doe",        "phoneNumber": "1123456780",        "emailAddress": "",        "customerId": "C-1740240770780",        "merchantId": "MID-XXXXX-XXX",        "customFields": [          {            "name": "custom-key-1",            "value": "custom-value-2"          }        ],        "createdAt": "2025-02-22 16:12:51.254000+00:00",        "updatedAt": "2025-02-25 08:32:06.998000+00:00",        "id": "67b9f78287c9970012383912"      }    ],    "totalCustomers": 2,    "limit": 20,    "totalPages": 1,    "page": 1,    "pagingCounter": 1,    "hasPrevPage": false,    "hasNextPage": false,    "prevPage": null,    "nextPage": null  },  "message": "success"}

Retrieves the merchant's customers. All parameters are optional and can be combined; results are paginated.

Authorization

secretKey
Authorization<token>

Merchant secret key used to identify the merchant, obtained from Kashier's dashboard. Pass the raw secret key value in the Authorization header (NOT a "Bearer" token).

In: header

Query Parameters

page?integer

Current page number.

limit?integer

Number of records per page.

search?string

Search for a customer by name, phone number, or email address.

sortBy?string

Field to sort by: customer name, phone number, or email address.

sortType?integer

Sorting direction: 1 = ascending, -1 = descending.

Value in

  • 1
  • -1
startDate?string

Only return customers created after this date. Example: 10-12-2024

endDate?string

Only return customers created before this date. Example: 10-12-2024

Response Body

application/json

application/json

application/json

application/json

application/json

GET
/v2/customers