+ Start a Discussion

Leading zeros stripped in zip code for API calls

It was discovered that the zeroes preceding the value in the zip code field is removed during transfer through API. One solution was thought to convert the zip code formula field (which trims another zip code field to 5 digits) to a text. However, that is not possible.

Any recommendations on how to resolve the loss of the zeros in front of the zip code?

ShivankurShivankur (Salesforce Developers) 
Hi There,

If you referring to exporting the data to excel files as csv then this behaviour is documented in below help article:

If this is not the case then the external party which is receiving the data should be responsible for manipulating the data after reception and could remove the leading zeroes. You might need to check with third party application to verify if there is any mechanism that removes the leading zeroes.

Hope above information helps. Please mark as Best Answer so that it can help others in future.