API for Users Custom Field Pagination Repeats Users

For anyone that utilizes the Users custom fields list by base role(s), please be aware that the User ID is repeated.

https://developer.sky.blackbaud.com/api#api=school&operation=V1UsersCustomfieldsGet

I noticed that the list user_id listed when I executed the first call is AFTER the marker user_id that is included in the response body. This means that the API isn't providing a unique response as you page through the data.

@Stephen Boyle I put a support ticket in 020648377.

Tagged:

Answers

  • Unless I am misunderstanding, I think that's by design and how other similar endpoints work (e.g., Users extended by role(s)). The endpoint documentation page says, "Results will start with the next user in the result set."

    I've seen 4 different marker types with the SKY API so you need to code for the specific one the endpoint uses. In this case, it would be "LAST_USER_ID" for the MarkerType. There are a number of inconsistencies like this, unfortunately. Another one is how error messages are returned.

    # Value: NEXT_RECORD_NUMBER - Use the record number as the marker value to return the next set of results. For example: marker=101 will return the second set of results.
    # Value: OFFSET - The record to start the next collection on.
    # Value: LAST_USER_ID - Use the last user's ID as the marker value to return the next set of results.
    # Value: NEXT_PAGE - Use the page number as the marker value to return the next set of results. For example: page=2 will return the second set of results.

  • @Michael Panagos thanks for the response. I'll give it a shot and see if I can get the desired results. However, if the API is going to provide a "next link" in the JSON body, then I think the default expectation would be that IT IS in the next user not provided in the current JSON body result. Otherwise, what's the point of providing a next_link for developers to use? The documentation at a minimum is not accurate as it states the "marker" should be:

    The user's id to start at to return the next batch of data. Results will start with the next user in the result set.

  • Michael Panagos
    edited December 2025

    Adjusting should work. It is annoying there are so many types of pagination to the api. The marker in next_link (/v1/users/customfields?base_role_ids=14&marker=xxxxxx) is the last user from the last page you already received. "Next" in this case refers to the next query, not the record.

  • @Michael Panagos thanks for pointing that out. IMO, this is just bad coding and output from the API. I have the ticket in to support hopefully they at least update the documentation to make it more clear or (fingers crossed) actually make the next link the next user :)

Categories