Invalid Document Type "application/pdf"


(Stephen Donahue) #1

We are unable to upload any additional documents to our Dwolla Customer. Five documents have been uploaded, and we are trying to replace the ones that failed review.

We make the following request to upload the new PDF:
Request Params:- Method: post, Path: /customers/ad5e918d-f923-4937-8bda-735d01f00627/documents, Body: {:file=>#<UploadIO:0x00007f601cdc6468 @content_type="application/pdf", @original_filename="open-uri20190416-40-nr5y2e", @local_path="/tmp/open-uri20190416-40-nr5y2e", @io=#<File:/tmp/open-uri20190416-40-nr5y2e>, @opts={}>, :documentType=>"entity_evidence_attachment"}e[0m

And receive the following response:
Response Body: {"_links"=>{"self"=>{"href"=>"https://api.dwolla.com/customers/ad5e918d-f923-4937-8bda-735d01f00627/documents", "type"=>"application/vnd.dwolla.v1.hal+json", "resource-type"=>"document"}}, "_embedded"=>{"documents"=>[{"_links"=>{"self"=>{"href"=>"https://api.dwolla.com/documents/c3ae2dcd-6985-4cd1-b55d-2525f83c8f2a", "type"=>"application/vnd.dwolla.v1.hal+json", "resource-type"=>"document"}}, "id"=>"c3ae2dcd-6985-4cd1-b55d-2525f83c8f2a", "status"=>"reviewed", "type"=>"license", "created"=>2019-04-11 16:38:19 UTC, "failureReason"=>"ScanNotReadable"}, {"_links"=>{"self"=>{"href"=>"https://api.dwolla.com/documents/d03e9944-9c8e-433a-8cb2-1ef5115ef641", "type"=>"application/vnd.dwolla.v1.hal+json", "resource-type"=>"document"}}, "id"=>"d03e9944-9c8e-433a-8cb2-1ef5115ef641", "status"=>"reviewed", "type"=>"other", "created"=>2019-04-11 17:12:25 UTC, "failureReason"=>"ScanNotReadable"}, {"_links"=>{"self"=>{"href"=>"https://api.dwolla.com/documents/dd124f02-68a5-499e-a660-fbac12dff263", "type"=>"application/vnd.dwolla.v1.hal+json", "resource-type"=>"document"}}, "id"=>"dd124f02-68a5-499e-a660-fbac12dff263", "status"=>"reviewed", "type"=>"passport", "created"=>2019-04-11 17:17:36 UTC, "failureReason"=>"ScanNotReadable"}, {"_links"=>{"self"=>{"href"=>"https://api.dwolla.com/documents/60d1cea3-c197-4806-b357-2b34373ab37e", "type"=>"application/vnd.dwolla.v1.hal+json", "resource-type"=>"document"}}, "id"=>"60d1cea3-c197-4806-b357-2b34373ab37e", "status"=>"reviewed", "type"=>"other", "created"=>2019-04-11 17:21:18 UTC, "failureReason"=>"ScanNotReadable"}, {"_links"=>{"self"=>{"href"=>"https://api.dwolla.com/documents/442d67d5-7034-42e6-972e-e3a779a0b96d", "type"=>"application/vnd.dwolla.v1.hal+json", "resource-type"=>"document"}}, "id"=>"442d67d5-7034-42e6-972e-e3a779a0b96d", "status"=>"reviewed", "type"=>"other", "created"=>2019-04-11 20:32:09 UTC}]}, "total"=>5}e[0m


(Stephen Donahue) #2

We’re aware of the 4-doc limit for Pending Review documents. But these docs have all been reviewed (and have failed, with failureReason returned). Cause? Workaround?


(Stephen Donahue) #3

In addition - We’re getting a validation error due to “Invalid document type.” But the uploaded file is a PDF

Exception: {"code"=>"ValidationError", "message"=>"Validation error(s) present. See embedded errors list for more details.", "_embedded"=>{"errors"=>[{"code"=>"Invalid", "message"=>"Invalid document type.", "path"=>"/documentType", "_links"=>{}}]}}e[0m

From the original request:
@content_type="application/pdf


(Shreya Thapa) #4

Hi @Stephen_Donahue, the documentType error has to with the request body containing

documentType=>“entity_evidence_attachment”

The only acceptable values for documentType are passport , license , idCard , or other.
In this scenario, you can swap out entity_evidence_attachment with other. Please let us know if that request goes through with that change!