Querying an ordered list with OR or IN clause
A Postgres solution would be to put all the IDs into an array, then use something like this:

select t.*, il.listindex
from contacts t
   join unnest(array[13259, 12472, ..., 12422]) with ordinality as il(id, listindex) 
     on t.conidcontact = il.id
order by il.listindex;


(The above is actually standard ANSI SQL - but to my knowledge only Postgres and HSQLDB support that)

The array could also be passed as a parameter in a prepared statement (or whatever the term for that is in the programming language you are using).



If you can build a dynamic query, another option would be to use a row value constructor:

select t.*, il.listindex
from contacts t
   join ( 
      values 
        (1, 13259), 
        (2, 12472),  
        ..... 
        (568, 12422)
  ) as il(listindex, id) on t.conidcontact = il.id
order by il.listindex;


(The above is 100% standard ANSI SQL)