Adding id checks to ensure they are set before making the rest call.