Skip to content

Latest commit

 

History

History
144 lines (100 loc) · 21.8 KB

README.md

File metadata and controls

144 lines (100 loc) · 21.8 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.

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

declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;

$sdk = MoovPhp\Moov::builder()
    ->setSecurity(
        new Components\Security(
            username: '',
            password: '',
        )
    )
    ->build();

$fileUploadRequestMultiPart = new Components\FileUploadRequestMultiPart(
    file: new Components\FileUploadRequestMultiPartFile(
        fileName: 'example.file',
        content: '0x8cc9e675ad',
    ),
    filePurpose: Components\FilePurpose::RepresentativeVerification,
    metadata: '{"requirement_id": "document.individual.verification"}',
);

$response = $sdk->files->upload(
    accountID: '10a2b98a-ab61-4ec6-a5fc-41d969747bc6',
    fileUploadRequestMultiPart: $fileUploadRequestMultiPart,
    xMoovVersion: 'v2024.01.00'

);

if ($response->fileDetails !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
accountID string ✔️ N/A
fileUploadRequestMultiPart Components\FileUploadRequestMultiPart ✔️ N/A
xMoovVersion ?string Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.

Response

?Operations\UploadFileResponse

Errors

Error Type Status Code Content Type
Errors\GenericError 400, 409 application/json
Errors\FileValidationError 422 application/json
Errors\APIException 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

declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;

$sdk = MoovPhp\Moov::builder()
    ->setSecurity(
        new Components\Security(
            username: '',
            password: '',
        )
    )
    ->build();



$response = $sdk->files->list(
    accountID: 'c8a232aa-0b11-4b8a-b005-71e9e705d0e6',
    xMoovVersion: 'v2024.01.00'

);

if ($response->fileDetails !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
accountID string ✔️ N/A
xMoovVersion ?string Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.

Response

?Operations\ListFilesResponse

Errors

Error Type Status Code Content Type
Errors\APIException 4XX, 5XX */*