Skip to content

Latest commit

 

History

History
169 lines (113 loc) · 12.1 KB

README.md

File metadata and controls

169 lines (113 loc) · 12.1 KB

Files

(files)

Overview

Available Operations

  • upload - Upload a file and link it to the specified Moov account.

The maximum file size is 20MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf, and png.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.write scope.

  • list - List all the files associated with a particular Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.read scope.

  • get - Retrieve file details associated with a specific Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.read scope.

upload

Upload a file and link it to the specified Moov account.

The maximum file size is 20MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf, and png.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.write scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.files.upload(account_id="6886a454-7910-4a2b-b98a-ab61ec65fc41", file={
        "file_name": "example.file",
        "content": open("example.file", "rb"),
    }, file_purpose=components.FilePurpose.REPRESENTATIVE_VERIFICATION, metadata="{\"requirement_id\": \"document.individual.verification\"}")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
account_id str ✔️ N/A
file components.FileUploadRequestMultiPartFile ✔️ The file to be added. Valid types are csv, png, jpeg, pdf.
file_purpose components.FilePurpose ✔️ The file's purpose. representative_verification
metadata Optional[str] Additional metadata to be stored with the file, formatted as a JSON string.

Valid keys are representative_id, comment, requirement_id, error_code.
{"requirement_id": "document.individual.verification"}
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.UploadFileResponse

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.FileValidationError 422 application/json
errors.APIError 4XX, 5XX */*

list

List all the files associated with a particular Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.files.list(account_id="c8a232aa-0b11-4b8a-b005-71e9e705d0e6")

    # Handle response
    print(res)

Parameters

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

Response

operations.ListFilesResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

get

Retrieve file details associated with a specific Moov account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.files.get(account_id="b888f774-3e7c-4135-a18c-6b985523c4bc", file_id="e50f7622-81da-484b-9c66-1c8a99c6b71b")

    # Handle response
    print(res)

Parameters

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

Response

operations.GetFileDetailsResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*