I am building a system using PHP which interfaces with Salesforce by using the API to add bids/quotes onto Salesforce after they've been completed in the new system. For most fields this is fine however I'm trying to work out how to sync the picklists between the new systems. Whilst you can use the API to retrieve the values of the picklists from what I can see there's no way of obtaining the underlying ID for each picklist entry.
Ultimately I need to sync the picklist options between the two systems, this can be done by syncing the values but as soon as someone changes the value of the picklist field in Salesforce (or adds a new option) then this will no longer correspond with the picklist variables in the external system. Ideally, if we could access the IDs then we can use the same ID/value list within the external system and (ideally) select the required picklist value based on the ID and not the value (which means even if the value has been changed slightly it will still correspond to the same entry). Similarly, we can then easily check if any entries have been added/deleted so these can be added/deleted from the external system as well.
I can't find any reference as to how this can be done but I can't imagine we're the only ones wanting to do it? If this is not possible then how would one go about getting close to this using Salesforce, I presume it's possible in one way or another?