Query & expand

This topic describes how to query and expand Rebilly API responses.

Use the ?expand parameter to expand and include embedded objects within the _embedded property of the response. The _embedded property contains an array of objects keyed by the expand parameter values. To expand multiple objects, pass them as a comma-separated list of objects. Expand may be used on GET, PATCH, POST, PUT requests.

Example request containing multiple objects:


Example response:

"_embedded": [
    "recentInvoice": {...},
    "customer": {...}

Filter data

Use the ?filter parameter on a collection to define which records must be displayed in the response.

Format description:

  • Fields and values in the filter are separated with : : ?filter=firstName:John .
  • Sub-fields are separated with . : ?filter=billingAddress.country:US .
  • Multiple filters are separated with ; : ?filter=firstName:John;lastName:Doe .
    They are joined with AND logic. Example: firstName:John AND lastName:Doe .
  • To use multiple values, use , as values separators: ?filter=firstName:John,Bob .
    Multiple values specified for a field are joined with OR logic. Example: firstName:John OR firstName:Bob .
  • To negate the filter, use ! : ?filter=firstName:!John .
  • To negate multiple values, use: ?filter=firstName:!John,!Bob . This filter rule excludes all Johns and Bobs from the response.
  • To use range filters, use: ?filter=amount:1..10 .
  • To use a gte (greater than or equals) filter, use: ?filter=amount:1.. . This also works for date-time based fields.
  • To use a lte (less than or equals) filter, use: ?filter=amount:..10 . This also works for date-time based fields.
  • To create specified values lists and use them in filters, use: ?filter=firstName:@yourListName .
    You can also exclude list values: ?filter=firstName:!@yourListName .
    Use value lists to compare against a list of data when setting conditions for rules or binds, or applying filters to data table segments. Commonly used lists contain values related to conditions that target specific properties such as: customers, transactions, or Bank Identification Numbers (BINs).
  • Date-time based fields accept values formatted using RFC 3339. Example: ?filter=createdTime:2021-02-14T13:30:00Z .