Documents
Create a document for customer
Uploads an identity verification document for a customer using multipart form-data. Required when a customer has “document” status during the verification process.
POST
/
customers
/
{id}
/
documents
cURL
curl -X POST
\ -H "Authorization: Bearer tJlyMNW6e3QVbzHjeJ9JvAPsRglFjwnba4NdfCzsYJm7XbckcR"
\ -H "Accept: application/vnd.dwolla.v1.hal+json"
\ -H "Cache-Control: no-cache"
\ -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
\ -F "documentType=passport"
\ -F "file=@foo.png"
\ 'https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce/documents'
...
HTTP/1.1 201 Created
Location: https://api-sandbox.dwolla.com/documents/11fe0bab-39bd-42ee-bb39-275afcc050d0// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
// Using form-data - https://github.com/form-data/form-data (Not Maintained By Dwolla)
var customerUrl = "https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce";
var requestBody = new FormData();
requestBody.append("file", fs.createReadStream("mclovin.jpg"), {
filename: "mclovin.jpg",
contentType: "image/jpeg",
knownLength: fs.statSync("mclovin.jpg").size,
});
requestBody.append("documentType", "license");
dwolla
.post(`${customerUrl}/documents`, requestBody)
.then((res) => res.headers.get("location")); // => "https://api-sandbox.dwolla.com/documents/fb919e0b-ffbe-4268-b1e2-947b44328a16"
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
customer_url = 'https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce'
document = app_token.post('%s/documents' % customer_url, file = open('mclovin.jpg', 'rb'), documentType = 'license')
document.headers['location'] # => 'https://api-sandbox.dwolla.com/documents/fb919e0b-ffbe-4268-b1e2-947b44328a16'
/**
* No example for this language yet.
**/
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
customer_url = 'https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce'
file = Faraday::UploadIO.new('mclovin.jpg', 'image/jpeg')
document = app_token.post "#{customer_url}/documents", file: file, documentType: 'license'
document.response_headers[:location] # => "https://api.dwolla.com/documents/fb919e0b-ffbe-4268-b1e2-947b44328a16"
{
"code": "maximumNumberOfResources",
"message": "Max of four files upload allowed. Please wait for Dwolla to manually check the documents."
}{
"code": "invalidResourceState",
"message": "Resource cannot be modified. Document creation not allowed for already verified Customers or non-verified Customer types."
}{
"code": "notFound",
"message": "Customer not found. Check CustomerId."
}{
"code": "fileTooLarge",
"message": "Document requests are limited to 10 MiB."
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
The media type of the response. Must be application/vnd.dwolla.v1.hal+json
Available options:
application/vnd.dwolla.v1.hal+json Path Parameters
customer unique identifier
Body
multipart/form-data
Upload a document for a customer.
Response
successful operation
Was this page helpful?
⌘I
cURL
curl -X POST
\ -H "Authorization: Bearer tJlyMNW6e3QVbzHjeJ9JvAPsRglFjwnba4NdfCzsYJm7XbckcR"
\ -H "Accept: application/vnd.dwolla.v1.hal+json"
\ -H "Cache-Control: no-cache"
\ -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
\ -F "documentType=passport"
\ -F "file=@foo.png"
\ 'https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce/documents'
...
HTTP/1.1 201 Created
Location: https://api-sandbox.dwolla.com/documents/11fe0bab-39bd-42ee-bb39-275afcc050d0// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
// Using form-data - https://github.com/form-data/form-data (Not Maintained By Dwolla)
var customerUrl = "https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce";
var requestBody = new FormData();
requestBody.append("file", fs.createReadStream("mclovin.jpg"), {
filename: "mclovin.jpg",
contentType: "image/jpeg",
knownLength: fs.statSync("mclovin.jpg").size,
});
requestBody.append("documentType", "license");
dwolla
.post(`${customerUrl}/documents`, requestBody)
.then((res) => res.headers.get("location")); // => "https://api-sandbox.dwolla.com/documents/fb919e0b-ffbe-4268-b1e2-947b44328a16"
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
customer_url = 'https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce'
document = app_token.post('%s/documents' % customer_url, file = open('mclovin.jpg', 'rb'), documentType = 'license')
document.headers['location'] # => 'https://api-sandbox.dwolla.com/documents/fb919e0b-ffbe-4268-b1e2-947b44328a16'
/**
* No example for this language yet.
**/
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
customer_url = 'https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce'
file = Faraday::UploadIO.new('mclovin.jpg', 'image/jpeg')
document = app_token.post "#{customer_url}/documents", file: file, documentType: 'license'
document.response_headers[:location] # => "https://api.dwolla.com/documents/fb919e0b-ffbe-4268-b1e2-947b44328a16"
{
"code": "maximumNumberOfResources",
"message": "Max of four files upload allowed. Please wait for Dwolla to manually check the documents."
}{
"code": "invalidResourceState",
"message": "Resource cannot be modified. Document creation not allowed for already verified Customers or non-verified Customer types."
}{
"code": "notFound",
"message": "Customer not found. Check CustomerId."
}{
"code": "fileTooLarge",
"message": "Document requests are limited to 10 MiB."
}