Teamleader API custom fields

Some suggestions.

Auto-complete Tickets

TicketMessages is slow, since it consumes 1 API call per ticket for which messages are retrieved.

As an alternative, you might want to study using Invantive UniversalSQL to retrieve the creator from the message for all new tickets (which is a small daily set) and then update the ticket accordingly to include that creator.

Custom Fields on Tickets

As far as known, the Tickets has yet the custom fields not retrieved in a performant way. When added by Teamleader, they will become available automatically as described in:

The custom field values can be retrieved at the cost of 1 API-call per ticket using V2Flat.TicketsAll.