KashierDevelopersKashier Developers

List all customers

curl -X GET "https://test-api.kashier.io/v2/customers"
{  "body": {    "customers": [      {        "_id": "507f1f77bcf86cd799439044",        "name": "John Doe",        "phoneNumber": "01000000000",        "emailAddress": "[email protected]",        "customerId": "C-XXXXXXXXXXXXX",        "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": "507f1f77bcf86cd799439044"      },      {        "_id": "507f1f77bcf86cd799439045",        "name": "Jane Doe",        "phoneNumber": "01000000000",        "emailAddress": "",        "customerId": "C-XXXXXXXXXXXXX",        "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": "507f1f77bcf86cd799439045"      }    ],    "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>

Your secret key from the Kashier dashboard. Send the raw key value in the Authorization header, without a Bearer prefix.

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