See also the DocumentUpload response object.

availability

The ability to upload documents via the API is currently in a limited release, and the API is subject to change.

Parameters
File required, file

The binary data of the file to upload. Only png, jpg, jpeg, or pdf files are supported.

Kind required, multiple

The type of uploaded document. Value should always be EVIDENCE_DOCUMENT.

Examples

C♯
var documentRequest = new DocumentUploadRequest
{
  Kind = DocumentUploadKind.EVIDENCE,
  File = File.Open("local_file.pdf", FileMode.Open)
};

Result<DocumentUpload> result = gateway.DocumentUpload.Create(documentRequest);

if (result.isSuccess()) {
  // document successfully uploaded
  DocumentUpload document = result.Target;
} else {
  Console.WriteLine(result.Errors);
}