function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DML2020DML2020 

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:
https://help.salesforce.com/articleView?id=000321542&type=1&mode=1
https://help.salesforce.com/articleView?id=000336106&type=1&mode=1

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.

Thanks.