Skip to main content

 

 

Coupa Success Portal

API Response Filters

Feature overview

API response filters simplify the response output and improve performance dramatically. Coupa Admins can create and manage API response filters to get expenses, requisitions, invoices, purchase orders, and user resources. You can designate a default filter for one or more of those resources to automatically apply that filter to all calls on that controller. You can test the API filter from the same API Filter detail page used for configuration and it also keeps a history of changes made to the filter.

What we were thinking

Coupa's default API responses can have more information than your third-party systems need. They can return many levels of associations that your service may not need.

Your API response filters can reduce the output of the call response so it sends just what your service needs without the overhead required to handle more than what your external service needs. 

API response filters can be created for the following resources:

  • Invoices
  • Orders
  • Users
  • Expense headers
  • Expense lines
  • Requisitions

The API Filter creation page allows quick iteration and it maintains a history of changes,so you can quickly test your filter, check the response, and modify it to get just what you need.

How it works

When Coupa API filters are used to constrain the volume of data needed for the response, less data sent means lower latency in response time. Simplifying the output to what is needed for system integration reduces both the initial human evaluation time and later the computing time for parsing and processing. 

Coupa Admins and systems integration users with the api_filters/index permission can see the API Response Filters interface at Setup > Integrations > API Filters.

API Filters.png

The initially seeded filters are labeled using the pattern "default_[ResourceName]_filter" and are pre-set filters that represent best practices. These seeded filters are already trimmed down and do not include all available fields (attributes), but instead represent those fields most commonly needed for integration efforts. You can add or remove more resource fields to change the initially seeded set by creating your own filter or by editing the default resource filter.  

API Filters Detail.png

Default API Filter

When checked the Default checkbox applies the filter to all API calls to GET that resource. Each resource may have only one default API filter.

When the Default checkbox is cleared, that API filter may be used by adding a query string param: ?filter='[API Filter Name]' to the GET call for that resource.

Filter

The API Filter is positive, meaning listed attributes are shown in the response. Add or remove those resource attributes so the Filter passes the resource object attributes to your third-party system and Save prior to testing. 

Reset

You can Reset the filter to the initially seeded values if you want to restore it to its original list or you can expand the history of changes for reference.

Test

You can check the output response of your filter by first entering a known id value in the Test Filter on field and then clicking TEST.  All the standard role security applies to what you can see with the test, but your saved API Filter responds with the specified subset of parameter fields in an easy to read JSON format.

Availability

This feature is available for all Coupa customers.