I uploaded jpeg image for an account. The jpeg image file id is 069i0000001dkl8 and it can't access via, https://c.na15.content.force.com/servlet/servlet.FileDownload?file=069i0000001dkl8
But it can acces via, https://c.na15.content.force.com/sfc/servlet.shepherd/version/download/068i0000001hwPn?asPdf=false&operationContext=CHATTER
Is there a way that I can get downloadable URL for attachment in salesforce (using api calls)? Or Is there a way that I can build downloadable URL by processing some fields in API object (SObject)?
Thanks.
Technically speaking, you are dealing with ContentDocument (069 key prefix) and ContentVersion (068 key prefix) records rather than an Attachment (00P key prefix).
Have a look at the Data Model for Content Objects:
You can use SOQL to create a query that will get you the correct ContentVersion for a ContentDocument. The resulting ID can then be used to create the download URL.
Alternatively, you could get the binary contents of the attachment from the ContentVersion directly via the API.
Incidentally, the Salesforce Stackexchange site is a great place to ask Salesforce specific questions.