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

Paginated search results.

filters Object

Search filters (see search query and filters).

order string

Search results order.

page integer

Page for paginated results.

per_page integer

Records per page for paginated results.

query string

Search query (see search query and filters).

scope string

Search scope (type of data) searched.

total integer

Number of records returned.

total_pages integer

Number of pages of records returned.

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) 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) Order of list to return: chronological (from earliest to latest), reverse_chronological (from latest to earliest).

query string

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

filters Object

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

page integer

(optional, default: 1) Page of paginated results.

per_page integer

(optional, default: 30, maximum: 100) Number of records per page of paginated results.

Example

  • Retrieve a search with query and filters