I have doubt on POST API, Firstly I am creating an API can I know where the document would come within Appian from external system using POST API.
Discussion posts and replies are publicly visible
You will have to specify a folder in which you would like to keep your document in.
You can use this template
suppose an user sends a document using POST API . how can I map his details with the document he sent in Database
You define the folder in the properties dialog.
Check this example:
docs.appian.com/.../passing-a-web-api-document-into-a-process-model.html
Then what datatype can be define to store the value of image
Did you read the documentation? Process variables and CDT fields can have the "Document" data type. As Appian stores files always in the file system, the field will internally hold the integer ID.