> For the complete documentation index, see [llms.txt](https://apidocs.juicefin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.juicefin.com/apis/administration/manage-file.md).

# Manage File

## Manage File

The Manage File API allows managing files for different entities (as CH, Org, etc). API options are: Add, Delete, View, UpdateFileContent, GetList The GetList option return two lists:

* The cardholder is sometimes required to provide specific files for verification and for non verification purposes. This list, under the "RequiredFiles" tag , design the file content types which can be uploaded for this cardholder.
* The ManageFile/Add API allows to upload file to a cardholder. This list, under the "UploadedFiles" tag, design the uploaded files.

## Input Parameters:

| Name          | Required | Definition                                                                                                                                                                                                                           | Comments                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                                     |   |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | - |
| Binary\_File  | C        | Format: Binary                                                                                                                                                                                                                       | required only for OperationType=Add                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                     |   |
| Description   | N        | Format: 1-500, supported characters: Blank a-z A-Z 0-9 . , # $ ( ) / : ? - % + \*                                                                                                                                                    | & ; @ ! \~ = \_ \ '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | relevant only for OperationType=Add |   |
| ID            | Y        | Format: Numeric, 1-19                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                     |   |
| ID            | Y        | <p>Description<br>Input should be OGR\_ID in case IDType = ORG<br>Input should be Order ID in case IDType = Order<br>Input should be Card Number in case IDType = CH-CardNumber<br>Input should be RPID in case IDType = CH-RPID</p> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                     |   |
| IDType        | N        | Format: ORG (Default) - require Org ID in ID field CH-RPID - require RPID in ID field CH-CardNumber - require Card Number in ID field\Order – require Order ID in ID field                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                     |   |
| Name          | C        | Format: 1-255, Supported characters: Blank a-z A-Z 0-9 . , # $ ( ) - + & ; @ ! \~ = \_ '                                                                                                                                             | Required for OperationType=Add, Delete, View, UpdateFileContent                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                     |   |
| OperationType | Y        | <p>Format options:<br>Add<br>Delete<br>View<br>UpdateFileContent<br>GetList</p>                                                                                                                                                      | <p><strong>Description</strong>:<br><strong>Add</strong> - Allow to add a new file to an organization/cardholder.<br><strong>Delete</strong> - Allow to delete a file<br><strong>View</strong> - Allow to download a file<br><strong>UpdateFileContent</strong> - Allow to change the file content of an existing document<br><strong>GetList</strong> - Get list of files for ID (sorted first by group and then by category, in ascending alphabetic order)</p>                                                                                                                                                                 |                                     |   |
| Content       | C        |                                                                                                                                                                                                                                      | <p>Format options:<br>The <a href="https://github.com/chetanmadaan/Juice-Financial-Docs/blob/main/APIS/Administration/javascript:;/README.md">FileContent</a> can be any value (allowed per Product Type). For example, It can be one of the following values (or other content types as well for each customer, based on his requirements):<br>Passport, Military ID, Matricula Consular, Permanent Resident ID, State-issued ID, US driver license, Pay Stub, School/Work ID, Tax Payer ID, Utility Bill, Third Party<br><br>The supported characters are: a-z A-Z 0-9 \_- / . ' ( )<br>It is limited to 100 characters<br></p> |                                     |   |

## Output Parameters:

| Name         | Definition                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Failure Case | Success Case | Comments                                                                                         |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | ------------ | ------------------------------------------------------------------------------------------------ |
| Binary\_File | Format: Binary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Not returned | Returned     | relevant only for OperationType=View                                                             |
| Category     | <p>Format Options:<br>Primary<br>Secondary<br>Other<br><br>Description:<br>Primary files are the following <a href="https://github.com/chetanmadaan/Juice-Financial-Docs/blob/main/APIS/Administration/javascript:;/README.md">file content</a> types:<br>Passport, Military ID, Matricula Consular, Permanent Resident ID, State-issued ID, US driver license<br><br>Secondary files are the following <a href="https://github.com/chetanmadaan/Juice-Financial-Docs/blob/main/APIS/Administration/javascript:;/README.md">file content</a> types:<br>Pay Stub, School/Work ID, Tax Payer ID, Utility Bill,<br><br>Other files refer to all other <a href="https://github.com/chetanmadaan/Juice-Financial-Docs/blob/main/APIS/Administration/javascript:;/README.md">file content</a> types (as Third Party)</p> | Not returned | Returned     | relevant only for OperationType=GetList. part of tag UploadedFiles and part of tag RequiredFiles |
| CHState      | <p>Format options:<br>NRNV<br>RNV<br>V-PNS<br>V</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Not returned | Returned     | relevant only for OperationType=GetList                                                          |
| Content      | <p>Format options:<br>The <a href="https://github.com/chetanmadaan/Juice-Financial-Docs/blob/main/APIS/Administration/javascript:;/README.md">FileContent</a> can be any value (allowed per Product Type). For example, It can be one of the following values (or other content types as well for each customer, based on his requirements):<br>Passport, Military ID, Matricula Consular, Permanent Resident ID, State-issued ID, US driver license, Pay Stub, School/Work ID, Tax Payer ID, Utility Bill, Third Party<br><br>The supported characters are: a-z A-Z 0-9 \_- / . ' ( )<br>It is limited to 100 characters<br></p>                                                                                                                                                                                  | Not returned | Returned     | relevant only for OperationType=GetList. part of tag UploadedFiles and part of tag RequiredFiles |
| Group        | Format: 1-100                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Not returned | Returned     | relevant only for OperationType=GetList. part of tag UploadedFiles and part of tag RequiredFiles |
| Name         | Format: 1-255, Supported characters: Blank a-z A-Z 0-9 . , # $ ( ) - + & ; @ ! \~ = \_ '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Not returned | Returned     | relevant only for OperationType=GetList. part of tag UploadedFiles                               |
| Type         | Format: any supported type (as txt, jpg, doc, etc)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Not returned | Returned     | relevant only for OperationType=GetList. part of tag UploadedFiles                               |

## XML Samples

### Input XML

```json
<?xml version="1.0" ?>
 <PraxellXMLRequest>
    <AuthenticationDetails>
        <UserName>st_manager</UserName>
        <UserPassword>st_manager</UserPassword>
      <ClientSourceIP></ClientSourceIP> 
 </AuthenticationDetails>;
    <ServiceDetails>
        <ServiceName>ManageFile</ServiceName>
        <UniqueRequestId>7532121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>praxell</OriginType>
    </Origin>
    <ServiceParams>
        <Binary_File>dGV4dCB0ZXN0</Binary_File>
        <Description>some description</Description>
        <ID>someOrgId</ID>
        <IDType>ORG</IDType>
        <Name>FileName.Ext</Name>
        <OperationType>Add</OperationType>
        <Content></Content>
    </ServiceParams>
 </PraxellXMLRequest>
```

```json
<?xml version="1.0"?>
 <PraxellXMLResponse>
     <ResponseDetails>
        <ServiceName>ManageFile</ServiceName>
        <SessionId>38851911201245015</SessionId>
        <StatusCode>0</StatusCode>
        <StatusName>StatusOK</StatusName>
        <StatusDescription>NA</StatusDescription>
        <ServiceDate>2012-01-05 11:45:58</ServiceDate>
        <ServiceId>38851911201245015</ServiceId>
    </ResponseDetails>
   <ResponseParams>
   </ResponseParams>
 </PraxellXMLResponse>
```

```json
<?xml version="1.0"?>
<PraxellXMLResponse>
  <ResponseDetails>
    <ServiceName>ManageFile</ServiceName>
    <SessionId>07071612200737105</SessionId>
    <StatusCode>70029</StatusCode>
    <StatusName>Data not found (cardholder not found)</StatusName>
    <StatusDescription>Data not found (cardholder not found)</StatusDescription>
    <ServiceDate>2021-10-01 12:37:50</ServiceDate>
    <ServiceId>07071612200737105</ServiceId>
  </ResponseDetails>
  <ResponseParams>
  </ResponseParams>
</PraxellXMLResponse>
```
