Skip to content

Latest commit

 

History

History
139 lines (92 loc) · 7.71 KB

README.md

File metadata and controls

139 lines (92 loc) · 7.71 KB

Files

(files)

Overview

Files can be used for a multitude of different use cases including but not limited to, individual identity verification and business underwriting. You may need to provide documentation to enable capabilities or to keep capabilities enabled for an account. The maximum file size is 10MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf, and png. To learn about uploading files in the Moov Dashboard, read our file upload guide.

Available Operations

upload_file

Upload a file and link it to the provided Moov account. The maximum file size is 10MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf, and png.

To use this endpoint from the browser, you'll need to specify the /accounts/{accountID}/files.write scope when generating a token.

Example Usage

import moov
from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.files.upload_file(account_id="97f59d46-b68f-4958-b251-ae3f3faf2789", file_upload_request={
    "file": {
        "file_name": "example.file",
        "content": open("example.file", "rb"),
    },
    "file_purpose": moov.FilePurpose.INDIVIDUAL_VERIFICATION,
})

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
account_id str ✔️ ID of the account.
file_upload_request models.FileUploadRequest ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.UploadFileResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

list_files

List all the files associated with a particular Moov account.

To use this endpoint from the browser, you'll need to specify the /accounts/{accountID}/files.read scope when generating a token.

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.files.list_files(account_id="a3c35406-9eb6-4801-bbac-0649c31c058a")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
account_id str ✔️ ID of the account.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ListFilesResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

get_file_details

Retrieve file details associated with a specific Moov account.

To use this endpoint from the browser, you'll need to specify the /accounts/{accountID}/files.read scope when generating a token.

Example Usage

from moov import Moov
import os

s = Moov(
    gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)

res = s.files.get_file_details(account_id="346add0a-4dae-4729-8e74-1a50d00d677a", file_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
account_id str ✔️ ID of the account.
file_id str ✔️ Identifier for the file. ec7e1848-dc80-4ab0-8827-dd7fc0737b43
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetFileDetailsResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*