Introducing sorting for the List Enrollments API

Jan 28, 2026

ERAs & transaction enrollment

You can now control how enrollment records are ordered in List Enrollments API responses using the sortBy query parameter.

Previously, List Enrollments API results were always ordered by createdAt in descending order. That remains the default.

With the new sortBy query parameter, you can now also sort by other fields and set a stable fallback when values are the same. For example, you can sort by statusLastUpdatedAt and fall back to id to ensure consistent, deterministic ordering:

https://enrollments.us.stedi.com/2024-09-01/enrollments?sortBy=statusLastUpdatedAt:desc&sortBy=id:asc

How the sorting works

Each sortBy value uses the property:direction format. If you provide multiple sortBy values, results are sorted in the order they appear.

When you provide a single sortBy value, Stedi automatically adds id as a secondary sort in the same direction. For example, if you provide ?sortBy=updatedAt:desc, Stedi automatically adds id:desc to the query to ensure deterministic results.

To see available sortBy properties, check out our API reference documentation.

You can now control how enrollment records are ordered in List Enrollments API responses using the sortBy query parameter.

Previously, List Enrollments API results were always ordered by createdAt in descending order. That remains the default.

With the new sortBy query parameter, you can now also sort by other fields and set a stable fallback when values are the same. For example, you can sort by statusLastUpdatedAt and fall back to id to ensure consistent, deterministic ordering:

https://enrollments.us.stedi.com/2024-09-01/enrollments?sortBy=statusLastUpdatedAt:desc&sortBy=id:asc

How the sorting works

Each sortBy value uses the property:direction format. If you provide multiple sortBy values, results are sorted in the order they appear.

When you provide a single sortBy value, Stedi automatically adds id as a secondary sort in the same direction. For example, if you provide ?sortBy=updatedAt:desc, Stedi automatically adds id:desc to the query to ensure deterministic results.

To see available sortBy properties, check out our API reference documentation.

Get started with Stedi

Get started with Stedi

Automate healthcare transactions with developer-friendly APIs that support thousands of payers. Contact us to learn more and speak to the team.

Get updates on what’s new at Stedi

Get updates on what’s new at Stedi

Get updates on what’s new at Stedi

Get updates on what’s new at Stedi

Backed by

Stedi is a registered trademark of Stedi, Inc. All names, logos, and brands of third parties listed on our site are trademarks of their respective owners (including “X12”, which is a trademark of X12 Incorporated). Stedi, Inc. and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.

Get updates on what’s new at Stedi

Backed by

Stedi is a registered trademark of Stedi, Inc. All names, logos, and brands of third parties listed on our site are trademarks of their respective owners (including “X12”, which is a trademark of X12 Incorporated). Stedi, Inc. and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.

Get updates on what’s new at Stedi

Backed by

Stedi is a registered trademark of Stedi, Inc. All names, logos, and brands of third parties listed on our site are trademarks of their respective owners (including “X12”, which is a trademark of X12 Incorporated). Stedi, Inc. and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.