Search Partners API
Search, filter, and retrieve partner records using configurable search criteria and pagination. This endpoint is available to authorized Super Admin and Partner users.
Overview
The Search Partners API retrieves partner records based on the specified search criteria and pagination settings. The response returns a paginated collection of results along with pagination metadata.
HTTP Method: GET
Endpoint: /api/v1/partner/search
Access Levels: SUPER_ADMIN, PARTNER
Authentication
Include your API key in the request headers.
| Header | Value |
|---|---|
X-API-KEY | YOUR_API_KEY |
Accept | */* |
Query Parameters
This endpoint requires two query parameters: pageProperties and searchCriteria. Both are defined as objects in the API specification.
1. pageProperties
pagePropertiesDefines the pagination settings for the search request.
| Field | Type | Example | Description |
|---|---|---|---|
pageNumber | Integer | 0 | The page number to retrieve. |
pageSize | Integer | 10 | The number of records requested per page. |
Example object:
{
"pageNumber": 0,
"pageSize": 10
}2. searchCriteria
searchCriteriaDefines the criteria used to search and filter partner records.
| Field | Type | Example | Description |
|---|---|---|---|
text | String | "Partner" | Search text used to identify matching partner records. |
active | Boolean | true | Filters partners by their active status. |
Example object:
{
"text": "Partner",
"active": true
}cURL Example
The API specification defines both parameters as query objects but does not specify their exact URL serialization. Use Swagger's Try it out feature to generate the correct request URL and query format.
curl -X GET "https://app-api.edfapay.com/api/v1/partner/search" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: */*"Add the pageProperties and searchCriteria query parameters using the format generated by Swagger.
Successful Response
200 — OK
Returns a paginated response containing the matching partner records and pagination metadata.
Response structure:
{
"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 | Description |
|---|---|
code | Response code returned by the API. |
message | Response message. |
errorCode | Error identifier, if provided. |
data.totalPages | Total number of result pages. |
data.totalElements | Total number of matching records. |
data.size | Page size reported in the response. |
data.content | Array containing the matching partner records. The individual record schema is not specified in the provided API definition. |
data.number | Current page number reported by the API. |
data.pageable | Pagination configuration and metadata. |
data.sort | Sorting metadata. |
data.numberOfElements | Number of records in the current page. |
data.first | Indicates whether the current page is the first page. |
data.last | Indicates whether the current page is the last page. |
data.empty | Indicates whether the current page contains no records. |
Error Response
400 — Bad Request
Returned when the request cannot be processed because of invalid query parameters or other request-related validation errors.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {}
}Implementation Notes
- Provide both required query objects:
pagePropertiesandsearchCriteria. - Use
pageNumberandpageSizeto control pagination. - Use
textandactiveto specify the search criteria. - Follow the query serialization generated by Swagger rather than assuming that the objects should be sent as JSON in the URL.
- The provided API definition does not specify the individual fields returned for each partner in
data.content.
Updated 25 days ago