Search recipients
Search recipients by various criteria including name, email, type, bank account details, and metadata. The Search API provides powerful full-text search capabilities across all recipients.
Request Parametersโ
Recommended - 2 fieldsRecommended Parameters
`query`STRING(optional)
Search query string. Searches across recipient name, email, description, bank account details, and metadata. Supports multiple words (AND logic) and partial matches.
`filters`OBJECT(optional)
Filter criteria to narrow search results. Common filters include type, active status, verified status, and created date ranges.
Optional - 3 fieldsPagination Parameters
Responsesโ
200
Successful searchSearch completed successfully. Returns a search result object with matching recipients in the data array.
Response includes:
data- Array of recipient objects matching the search criteriatotal- Total number of results matching the searchtotal_pages- Number of pages availablepage- Current page numberper_page- Number of results per pageorder- Sort order applied (chronological or reverse_chronological)
400
Bad requestRequest validation failed. Check the error message for details.
Common causes:
- Invalid page number (below 1)
- Invalid per_page value (above 100 or below 1)
- Malformed filters object
- Invalid filter field names
401
UnauthorizedAuthentication failed. Invalid or missing API key.
Common causes:
- Missing Authorization header
- Invalid secret key
- Using public key instead of secret key
- Incorrect HTTP Basic Auth format
404
Not foundSearch endpoint not found or unavailable.
Common causes:
- Incorrect endpoint URL
- Search feature not enabled for account
5xx
Server errorServer-side error occurred. These are rare but should be handled gracefully.
How to handle:
- Retry the request with exponential backoff
- Check status.omise.co for service incidents
- See Error Handling for detailed guidance
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/recipients/search \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-G \
-d "query=john doe" \
-d "filters[type]=individual" \
-d "filters[verified]=true"
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
results = Omise::Recipient.search({
query: 'john doe',
filters: {
type: 'individual',
verified: true
}
})
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
results = omise.Recipient.search(
query='john doe',
filters={
'type': 'individual',
'verified': True
}
)
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const results = await omise.recipients.search({
query: 'john doe',
filters: {
type: 'individual',
verified: true
}
});
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$results = OmiseRecipient::search([
'query' => 'john doe',
'filters' => [
'type' => 'individual',
'verified' => true
]
]);
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
Map<String, Object> filters = new HashMap<>();
filters.put("type", "individual");
filters.put("verified", true);
SearchResult<Recipient> results = client.recipients()
.search()
.query("john doe")
.filters(filters)
.send();
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var results = await client.Recipients.Search(new SearchRequest
{
Query = "john doe",
Filters = new Dictionary<string, object>
{
{ "type", "individual" },
{ "verified", true }
}
});
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
results, _ := client.Recipients().Search(&operations.SearchRecipients{
Query: "john doe",
Filters: map[string]interface{}{
"type": "individual",
"verified": true,
},
})
Error and result codesโ
Common Error Codesโ
| Code | Description | Resolution |
|---|---|---|
bad_request | Missing or invalid parameters | Check that parameters are valid |
authentication_failure | Invalid API key | Verify your secret key is correct |
Search Filter Optionsโ
| Filter | Type | Description |
|---|---|---|
type | string | Recipient type (individual, corporation) |
verified | boolean | Whether recipient is verified (true/false) |
active | boolean | Whether recipient is active (true/false) |
bank_account_brand | string | Bank code (bbl, kbank, scb, etc.) |
created | object | Date range filter (e.g., {gte: '2025-01-01', lte: '2025-01-31'}) |
API Credentials
Try it outโ
Recommended - 2 fields
Additional - 3 fields
Your IP:
...Loading...