Association Filtering

Availability
Association filtering is in a limited release to select merchants. Contact us if you have any questions.
Association filtering is a way to filter an object's associations in order to speed up API calls and limit data from response objects.

How it worksAnchorIcon

By providing a supported API request method with a specific association filter ID, you will receive a response object that excludes the fields specified by that filter. Fields that are excluded will still be present in the response object as empty arrays or null values.

When to use association filteringAnchorIcon

Filtering can be used when you don't need all the data associated with a response object – for example, if you're only looking to grab basic customer information but are not interested in the customer's subscriptions or payment methods. Filtering out unnecessary data could result in a significant performance improvement depending on how much data is associated with the object.

Supported API requestsAnchorIcon

The following API requests support the usage of association filter IDs: Customer: Find

Supported objects and filtersAnchorIcon

ObjectFilter IDDescription
Customer`f8124ed8`Excludes any subscriptions associated with the customer.
Customer`353f78cc` Excludes any addresses, custom fields, payment methods, and subscriptions associated with the customer.

ExampleAnchorIcon

  1. Java
Customer customer = gateway.customer().find("the_customer_id", "353f78cc");

Validation errorsAnchorIcon

CodeTextExplanation