Navigation

  • index
  • routing table |
  • next |
  • previous |
  • GoPoints API »

Object Search¶

  • Search for Objects

Search for Objects¶

GET /(company_code)/v2/search¶

Search for objects

Get data found by search query.

Search can include objects of these types: account, entry, file, profile, transaction, record, notice, disclaimer, log. Only some of the types may be allowed for authorized user. By default, account, entry, and profile types are included if allowed. Client application can limit search to certain types using type request field. notice, disclaimer, and log types are exclusive. If any of these types is used, it must be the only requested object type.

By default, search results are sorted by descending timestamp for timestamp-based data or by relevance otherwise. Different sort order can be requested using sort field. It can contain a field name (lname), a field name and direction (lname:asc or lname:desc), or a comma-separated list of field names and directions (date_of_birth:desc,lname,fname).

Request Headers:
 
  • Authorization – Bearer <session_token>, or Signature <signature>
Query Parameters:
 
  • query (string) – Search query (Elasticsearch query language is supported)
  • type (string) – (Optional) Code of object type to include, or comma-separated list of type codes
  • fields (string) – (Optional) If searching for objects of exactly one type: comma-separated list of field names to include in response
  • sort (string) – (Optional) Sort order, field name with optional direction, or comma-separated list of field names with optional direction
  • size (integer) – Pagination: Number of results to return
  • from (integer) – (Optional) Pagination: Number of results to skip (defaults to 0)
Response JSON Object:
 
  • status (string) – success or error
  • total (integer) – Total number of results found
  • data (array) – Data objects of search results
  • error_code (string) – (Optional) If status is error: one of error codes listed below

Found object data fields

Each object in data response array has the following fields:

Field name Type Description
type string Object type code
data object Object data fields

Error codes used

  • auth.header.missing
  • auth.header.invalid
  • auth.token.invalid
  • auth.token.expired
  • auth.session.invalid
  • auth.user.restricted
  • auth.user.closed
  • auth.user.denied
  • auth.restricted
  • search.type.restricted
  • request.validation.failed

See Error Codes for details.

Table Of Contents

  • Object Search
    • Search for Objects

Related Topics

  • Documentation index
    • Previous: Transaction Objects
    • Next: Authentication & Authorization

This Page

  • Show Source

Quick search

© Copyright 2016-2018, Loyalty and Media Group LLC. Created using Sphinx 1.7.7.