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.

HeaderValue
X-API-KEYYOUR_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

Defines pagination settings.

FieldTypeRequiredDescription
pageNumberIntegerYesThe page number to retrieve.
pageSizeIntegerYesThe number of records requested per page.

Example:

{
  "pageNumber": 0,
  "pageSize": 10
}

2. searchCriteria

Defines the user search filters.

FieldTypeRequiredDescription
textStringNot specifiedSearch text used to filter users.
activeBooleanNot specifiedFilters 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

FieldTypeDescription
codeNumberResponse code returned by the API.
messageStringResponse message.
errorCodeStringError code field returned by the API.
data.totalPagesNumberTotal number of available pages.
data.totalElementsNumberTotal number of matching records.
data.sizeNumberPage size represented in the response.
data.contentArrayList of matching user records. The individual user object schema is not provided in the example.
data.numberNumberCurrent page number.
data.pageableObjectPagination configuration and metadata.
data.sortArraySorting metadata.
data.numberOfElementsNumberNumber of records in the current page.
data.firstBooleanIndicates whether the current page is the first page.
data.lastBooleanIndicates whether the current page is the last page.
data.emptyBooleanIndicates 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 pageProperties and searchCriteria.
  • Use pageNumber and pageSize to control pagination.
  • Set active to true or false when 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.

Did this page help you?