Search Users API
Searches and retrieves users based on text and active-status criteria, with pagination support. Available to SUPER_ADMIN, PARTNER, MERCHANT, and BRANCH roles.
Overview
The Search Users API retrieves a paginated list of users based on the supplied search criteria.
- HTTP Method:
GET - Endpoint:
/api/v1/users/search - Access Levels:
SUPER_ADMIN,PARTNER,MERCHANT,BRANCH
Authentication
Include your API key in the request headers.
| Header | Value |
|---|---|
X-API-KEY | YOUR_API_KEY |
Accept | */* |
Production Base URL: https://app-api.edfapay.com
Query Parameters
This endpoint requires two query parameters, both represented as objects in the Swagger documentation.
1. pageProperties
pagePropertiesDefines pagination settings.
| Field | Type | Required | Description |
|---|---|---|---|
pageNumber | Integer | Yes | The page number to retrieve. |
pageSize | Integer | Yes | The number of records requested per page. |
Example:
{
"pageNumber": 0,
"pageSize": 10
}2. searchCriteria
searchCriteriaDefines the user search filters.
| Field | Type | Required | Description |
|---|---|---|---|
text | String | Not specified | Search text used to filter users. |
active | Boolean | Not specified | Filters users by active status. |
Example:
{
"text": "User",
"active": true
}The supplied API specification does not define the exact matching behavior for text or the default behavior when either field is omitted.
Request Example
cURL
Because pageProperties and searchCriteria are documented as query objects, their exact URL serialization should be confirmed using Swagger's Try it out feature. The following is a template; replace the query placeholders with the serialization generated by Swagger.
curl --request GET \
--url 'https://app-api.edfapay.com/api/v1/users/search?<QUERY_PARAMETERS>' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'Accept: */*'No request body is specified for this endpoint.
Responses
200 OK
Returns a paginated result containing the matching users and pagination metadata.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {
"totalPages": 0,
"totalElements": 0,
"size": 0,
"content": [
{}
],
"number": 0,
"pageable": {
"offset": 0,
"paged": true,
"pageNumber": 0,
"pageSize": 0,
"sort": [
{
"direction": "string",
"nullHandling": "string",
"ascending": true,
"property": "string",
"ignoreCase": true
}
],
"unpaged": true
},
"sort": [
{
"direction": "string",
"nullHandling": "string",
"ascending": true,
"property": "string",
"ignoreCase": true
}
],
"numberOfElements": 0,
"first": true,
"last": true,
"empty": true
}
}Response Fields
| Field | Type | Description |
|---|---|---|
code | Number | Response code returned by the API. |
message | String | Response message. |
errorCode | String | Error code field returned by the API. |
data.totalPages | Number | Total number of available pages. |
data.totalElements | Number | Total number of matching records. |
data.size | Number | Page size represented in the response. |
data.content | Array | List of matching user records. The individual user object schema is not provided in the example. |
data.number | Number | Current page number. |
data.pageable | Object | Pagination configuration and metadata. |
data.sort | Array | Sorting metadata. |
data.numberOfElements | Number | Number of records in the current page. |
data.first | Boolean | Indicates whether the current page is the first page. |
data.last | Boolean | Indicates whether the current page is the last page. |
data.empty | Boolean | Indicates whether the current page contains no records. |
400 Bad Request
The request could not be processed because of invalid or malformed query parameters.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {}
}Integration Notes
- Supply both
pagePropertiesandsearchCriteria. - Use
pageNumberandpageSizeto control pagination. - Set
activetotrueorfalsewhen filtering by user status. - Use Swagger's Try it out feature to verify the required query-object serialization before implementing the request.
- The published response example does not specify the individual fields returned for each user in
data.content.
Updated 25 days ago