cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Document extraction service not working for uploads

vijaygn1990
Explorer
1,370

HI Team,
I have tried exploring the Document extraction services(premium) from postman to build some apis to upload the document to extract some information. All get calls related to document extraction services are working in postman and code. But upload functionality not working in postman and code. In the postman input, in form am passing file and client id which are required params. But am getting following error

{
    "error": {
        "code": "E95",
        "message": "Required form-data not provided.",
        "details": [
            {
                "code": "0",
                "message": "Missing parameter: options"
            }
        ]
    }
}
 
Any help is greatly appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

emiliocampo
Participant
0 Likes

Hi! @Samruddhi @vijaygn1990 @SukirtiMaskey 

I just removed the global Content-Type = "multipart/form-data" in the header section and now it works!. In my case, for some reason when importing this collection from SAP Business Accelerator Hub (API link), the header <Content-Type> is repeted, be sure to keep only the value "multipart/form-data; boundary=<calculated when request is sent>"

emiliocampo_1-1756313753299.png

Posting the fix here in case it helps others

 

Samruddhi
Associate
Associate
0 Likes

Hello,

For the upload of document through postman, in Body select form-data option. Create a key 'file' of type 'file' and upload the file. Then create another key 'option' of type 'text' and in value put the following:-

{"schemaId": "cf8cc8a9-1eee-42d9-9a3e-507a61baac23",
"clientId": "c_00",
"documentType": "invoice",
"receivedDate": "2020-02-17"
}

Do not add schemaId, cliendId and documentType in the parameters.

Screenshot 2024-02-28 104235.png

 

 

 

This solution worked for me.

SukirtiMaskey
Newcomer
0 Likes
I did the same, but still I am unable to 😞