You can filter results returned from the API using a standard URI format.

🚧

Note

You can only filter on base object attributes. Filtering through non-base attributes is not supported and returns everything.

You can use multiple filter conditions in a single request. For example:
/products?filter=eq(ConfigurationType:'Standalone')&filter=eq(Active:true)

📘

Info

Multiple conditions can be combined using the logical operator AND. The results returned only match ALL criteria specified in the request.

OperatorDescription
eqEquals. Checks if the values of two operands are equal. If they are, the condition is true.
likeLike. Checks if the operand contains the specified string. Wildcards are supported.
gtGreater than. Checks if the value of the first operand is greater than that of the second. If they are, the condition is true.
geGreater than or equal to. Checks if the value of the first operand is greater than or equal to that of the second. If they are, the condition is true.
ltLess than. Checks if the value of the first operand is less than that of the second. If they are, the condition is true.
leLess than or equal to. Checks if the value of the first operand is less than or equal to that of the second. If they are, the condition is true.
inIn. Checks if the operand is contained in the specified string value.
noteqNot Equal. Checks if the value of two operands are equal. If they are not, the condition is true.
notinNot In. Checks if the operand is not contained in the specified string value.

Passing an incorrectly formatted filter or using an unsupported operator returns a 400 response with the following error:

{
  "errors": [
    {
      "Title": "Bad Request",
      "Detail": "Could not parse the supplied filter",
      "Source" : "client",
      "Link" : "https://support.conga.com"
    }
  ]
}

Supported Characters

As filters are passed as URL query string parameters, we must ensure all filters are URL safe and are strict about the characters that can be used in a filter.

CharactersCan be used in filter?
A-Z (upper & lower case)Yes
0-9Yes
$ - _ * . 'Yes
(Space)Yes (an unencoded + is also treated as a space).
+Only when URL encoded (%2B).

Passing unsupported characters returns a 400 response with the following error:

{
  "errors": [
    {
      "Title": "Bad Request",
      "Detail": "The supplied filter contained unsupported characters",
      "Source" : "client",
      "Link" : "https://support.conga.com"
    }
  ]
}

Supported Date Formats

Specify the date in yyyy-mm-dd format, for example 2022-04-27. You can also specify the date as an integer number of milliseconds since 1970-01-01 00:00:00, also known as Unix epoch time. For example, 640912546584.

URL Encoding Filters

We recommend URL encoding filters. For ease of use, you can encode the full filter, so filter=eq(ConfigurationType:'Standalone') becomes filter=eq%28ConfigurationType%3A%27Standalone%27%29.

Examples

Example: The eq operator

In the following example, we request all standalone products from the catalog by encoding the following filter:

filter=eq(ConfigurationType:'Standalone')
curl --request GET \
     --url 'https://rlp-dev.congacloud.io/api/revenue-admin/v1/products?filter=eq%28ConfigurationType%3A%27Standalone%27%29'
fetch('https://rlp-dev.congacloud.io/api/revenue-admin/v1/products?filter=eq%28ConfigurationType%3A%27Standalone%27%29', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Example: The like operator

In the following example, we request all products from the catalog that start with Conga by encoding the following filter:

filter=like(Name:'Conga*')
curl --request GET \
     --url 'https://rlp-dev.congacloud.io/api/revenue-admin/v1/products?filter=like%28Name%3A%27Conga%2A%27%29'
fetch('https://rlp-dev.congacloud.io/api/revenue-admin/v1/products?filter=like%28Name%3A%27Conga%2A%27%29', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Example: The in operator

In the following example, we request all price list items in a price list that have a per-unit or tiered-rate price method by encoding the following filter:

filter=in(PriceMethod:'Per Unit','Tiered Rate')
curl --request GET \
     --url 'https://rlp-dev.congacloud.io/api/revenue-admin/v1/price-lists/1234/prices?filter=in%28PriceMethod%3A%27Per%20Unit%27%2C%27Tiered%20Rate%27%29'
fetch('https://rlp-dev.congacloud.io/api/revenue-admin/v1/price-lists/1234/prices?filter=in%28PriceMethod%3A%27Per%20Unit%27%2C%27Tiered%20Rate%27%29', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Example: Chaining the ge and le operators

In the following example, we request all price lists with an effective date on or after January 1, 2022 and an expiration date on or before December 31, 2022.

filter=ge(EffectiveDate:'2022-01-01T05:00:00.000Z')&filter=le(ExpirationDate:'2022-12-31T05:00:00.000Z')
curl --request GET \
     --url 'https://rlp-dev.congacloud.io/api/revenue-admin/v1/price-lists?filter=gte%28EffectiveDate%3A%272022-01-01T05%3A00%3A00.000Z%27%29&filter=lte%28ExpirationDate%3A%272022-12-31T05%3A00%3A00.000Z%27%29'
fetch('https://rlp-dev.congacloud.io/api/revenue-admin/v1/price-lists?filter=gte%28EffectiveDate%3A%272022-01-01T05%3A00%3A00.000Z%27%29&filter=lte%28ExpirationDate%3A%272022-12-31T05%3A00%3A00.000Z%27%29', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));