def get_id_numbers(data, endpoint):
    """Return a list of the specified endpoint's primary id numbers."""
    ids = set()
    id_field = '{0:s}_id'.format(endpoint)

    for rec in data:
        ids.add(rec.get(id_field))

    return list(ids)