I customized screen of Acumatica by new text fields in customer screen below:

After I want get data from custom field in below code but it's not working:
foreach (CustomStringField customField in customerData.MainContact.Address.CustomFields)
I customized screen of Acumatica by new text fields in customer screen below:

After I want get data from custom field in below code but it's not working:
foreach (CustomStringField customField in customerData.MainContact.Address.CustomFields)
If you don't want to modify the existing endpoint but just get "Custom" fields then you can append an additional value to the URL
http://help.myob.com.au/advanced/whitepapers/MYOB%20Advanced%20-%20REST%20API.pdf - MYOB Advanced uses the same accumatica system
Search for $custom Parameter - in the parameter string you would attach $custom=ItemSettings.PostClassID to get one of the custom fields.
You can get a list of Custom fields using the getSchema method
http://accumatica/entity/Default/6.00.001/StockItem/$adHocSchema
http://accumatica/entity/Default/6.00.001/StockItem?$custom=ItemSettings.PostClassID