Search API

The Search API allows you to retrieve the results of searches across various "scopes" of data. See Search Query and Filters for supported scopes. Search results are delivered in reverse chronological order by default.

Attribute

Name Type Description
object string

The string search.

location string

API path to retrieve the current search object.

data Array

The array of search results.

filters Object

The search parameters.

order string

The order of the search results returned.

page integer

The page number of the current results.

per_page integer

The items per page as sent to the request.

query string

The search query.

scope string

The search "scope" or type of data searched.

total integer

Total amount of data (records) of search results.

total_pages integer

Total number of pages of search results.

Conduct a search

- GET https://api.omise.co/search

Returns search results based on input parameters. Note: the pagination mechanism for search results is different from that for lists. Use page and per_page instead of offset and limit.

Request Parameter

Name Type Description
scope string

(required) The scope you are searching. One of charge, dispute, recipient, customer, refund, transfer, and link. See available options in Search Query and Filters

order string

(optional, default: reverse_chronological) The order of the list returned: chronological (from earliest to latest), reverse_chronological (from latest to earliest).

query string

(optional, default: 'empty string') Search text within the scope. See more in Search Query and Filters.

filters Object

(optional, default: {empty object}) Search text on specific key within the scope. See more in Search Query and Filters.

page integer

(optional, default: 1) Page number of search results.

per_page integer

(optional, default: 30, maximum: 100) Number of items per page of search results.

Example

  • Retrieve a search with query and filters