# Documents

## Retrieves a list of voided checks

> This endpoint uses the eDoc service to retrieve details of all documents in the voided check category for a specified merchant number. The response> \
> provides information such as the Document ID, file name, description, and category details.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/VoidedChecks":{"get":{"tags":["Documents"],"summary":"Retrieves a list of voided checks","description":"This endpoint uses the eDoc service to retrieve details of all documents in the voided check category for a specified merchant number. The response\r\nprovides information such as the Document ID, file name, description, and category details.","parameters":[{"name":"merchantNumber","in":"path","description":"Merchant Number used to filter voided checks.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a collection of voided checks successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFileCollection"}}}},"204":{"description":"No Content"},"400":{"description":"Bad Request: Returns when merchantNumber is null or empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"401":{"description":"Unauthorized: User does not have the required role or access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"403":{"description":"Forbidden: The user does not have the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error: This could be due to system errors. Please contact support for assistance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.EDocsFileCollection":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFile"},"description":"Contains the details of the document.","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.EDocsFile":{"required":["category","fileName","merchantNumber"],"type":"object","properties":{"category":{"maximum":2147483647,"minimum":1,"type":"integer","description":"The category of the document, represented as an integer value.","format":"int32"},"categoryDescription":{"type":"string","description":"A description of the document category.","nullable":true},"description":{"type":"string","description":"A brief description of the document.","nullable":true},"documentId":{"type":"string","description":"The unique identifier for the document.","format":"uuid"},"fileName":{"minLength":1,"type":"string","description":"The name of the file associated with the document."},"merchantNumber":{"minLength":1,"type":"string","description":"The merchant's unique identifier."},"metaData":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFileMetaData"},"description":"A list of metadata associated with the document.","nullable":true},"fileExtension":{"type":"string","description":"The file extension of the document.","nullable":true},"dateUploaded":{"type":"string","description":"The date and time (ISO 8601 format) when the document was uploaded. \r\nFormat: yyyy-MM-ddTHH:mm:ssZ","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.EDocsFileMetaData":{"type":"object","properties":{"metadataKey":{"type":"string","description":"The key or name of the metadata field.","nullable":true},"metadataValue":{"type":"string","description":"The value associated with the metadata key.","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Voided Checks

> Upload voided check documents for the specified merchant.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/VoidedChecks":{"post":{"tags":["Documents"],"summary":"Upload Voided Checks","description":"Upload voided check documents for the specified merchant.","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"bankAccountId","in":"query","description":"The unique identifier of the bank account for which the voided check is provided. This value is returned when creating, updating, or retrieving a bank account.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A file as a byte array.","content":{"application/json":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Voided Check (Base64 Format)

> Upload a voided check document for the specified merchant by passing the file content in Base64 format.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/VoidedChecks/Base64Format":{"post":{"tags":["Documents"],"summary":"Upload Voided Check (Base64 Format)","description":"Upload a voided check document for the specified merchant by passing the file content in Base64 format.","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"bankAccountId","in":"query","description":"The unique identifier of the bank account for which the voided check is provided. This value is returned when creating, updating, or retrieving a bank account.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A file as a base64 encoded string.","content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Multiple Documents (Base64 Format)

> Upload a single file containing multiple documents of the same type for the specified merchant in Base64 Format.> \\
>
> \
> Note:> \
> Only one Base64 string can be included per request.> \\
>
> \
> For multiple documents of the same type, the request supports attaching metadata to specify the number of documents included (for example, a PDF with several months of statements).

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/MultipleDocuments/Base64Format":{"post":{"tags":["Documents"],"summary":"Upload Multiple Documents (Base64 Format)","description":"Upload a single file containing multiple documents of the same type for the specified merchant in Base64 Format.\r\n\r\nNote:\r\nOnly one Base64 string can be included per request.\r\n\r\nFor multiple documents of the same type, the request supports attaching metadata to specify the number of documents included (for example, a PDF with several months of statements).","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentCategory","in":"query","description":"Specifies the category of the document included in the uploaded file.","schema":{"$ref":"#/components/schemas/eDocs.Contracts.DocumentCategory"}},{"name":"count","in":"query","description":"The number of documents provided in this file","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"A file as a base64 encoded string.","content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"eDocs.Contracts.DocumentCategory":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"type":"integer","format":"int32"},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Multiple Documents

> Upload a single file containing multiple documents of the same type for the specified merchant.> \
> &#x20;          &#x20;> \
> Note: If the file contains multiple documents of the same type, you can attach metadata to indicate the number of documents included (for example, a PDF with several months of statements).

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/MultipleDocuments":{"post":{"tags":["Documents"],"summary":"Upload Multiple Documents","description":"Upload a single file containing multiple documents of the same type for the specified merchant.\r\n            \r\nNote: If the file contains multiple documents of the same type, you can attach metadata to indicate the number of documents included (for example, a PDF with several months of statements).","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentCategory","in":"query","description":"Specifies the category of the document included in the uploaded file.","schema":{"$ref":"#/components/schemas/eDocs.Contracts.DocumentCategory"}},{"name":"count","in":"query","description":"Specifies the total number of documents included in the uploaded file.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"A file as a byte array.","content":{"application/json":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"eDocs.Contracts.DocumentCategory":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"type":"integer","format":"int32"},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Document (Base64 Format)

> Upload a document for the specified merchant by passing the file content in Base64 format.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/Base64Format":{"post":{"tags":["Documents"],"summary":"Upload Document (Base64 Format)","description":"Upload a document for the specified merchant by passing the file content in Base64 format.","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentCategory","in":"query","description":"Specifies the category of the document included in the uploaded file.","required":true,"schema":{"$ref":"#/components/schemas/eDocs.Contracts.DocumentCategory"}}],"requestBody":{"description":"A file as a base64 encoded string.","content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"eDocs.Contracts.DocumentCategory":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"type":"integer","format":"int32"},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Get Documents by Category

> Retrieve documents for the specified merchant filtered by document category.> \
> &#x20;          &#x20;> \
> Note:> \
> The category is validated against a predefined whitelist, and only valid categories (for example, Financial = 1, IRS = 2) are processed.> \\
>
> \
> If the provided category is not in the allowed list, the system returns an error and the request is not processed.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}":{"get":{"tags":["Documents"],"summary":"Get Documents by Category","description":"Retrieve documents for the specified merchant filtered by document category.\r\n            \r\nNote:\r\nThe category is validated against a predefined whitelist, and only valid categories (for example, Financial = 1, IRS = 2) are processed.\r\n\r\nIf the provided category is not in the allowed list, the system returns an error and the request is not processed.","parameters":[{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentCategory","in":"query","description":"Specifies the document category for the documents included in the file.","required":true,"schema":{"$ref":"#/components/schemas/eDocs.Contracts.DocumentCategory"}}],"responses":{"200":{"description":"Returns a collection of documents successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFileCollection"}}}},"400":{"description":"Bad Request: Returns when merchantNumber or documentCategory is null or empty or Invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"401":{"description":"Unauthorized: User does not have the required role or access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"403":{"description":"Forbidden: The user does not have the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error: This could be due to system errors. Please contact support for assistance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"eDocs.Contracts.DocumentCategory":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"type":"integer","format":"int32"},"MerchantDemographics.Api.Models.EDocsFileCollection":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFile"},"description":"Contains the details of the document.","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.EDocsFile":{"required":["category","fileName","merchantNumber"],"type":"object","properties":{"category":{"maximum":2147483647,"minimum":1,"type":"integer","description":"The category of the document, represented as an integer value.","format":"int32"},"categoryDescription":{"type":"string","description":"A description of the document category.","nullable":true},"description":{"type":"string","description":"A brief description of the document.","nullable":true},"documentId":{"type":"string","description":"The unique identifier for the document.","format":"uuid"},"fileName":{"minLength":1,"type":"string","description":"The name of the file associated with the document."},"merchantNumber":{"minLength":1,"type":"string","description":"The merchant's unique identifier."},"metaData":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFileMetaData"},"description":"A list of metadata associated with the document.","nullable":true},"fileExtension":{"type":"string","description":"The file extension of the document.","nullable":true},"dateUploaded":{"type":"string","description":"The date and time (ISO 8601 format) when the document was uploaded. \r\nFormat: yyyy-MM-ddTHH:mm:ssZ","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.EDocsFileMetaData":{"type":"object","properties":{"metadataKey":{"type":"string","description":"The key or name of the metadata field.","nullable":true},"metadataValue":{"type":"string","description":"The value associated with the metadata key.","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Document

> Upload a document for the specified merchant using a standard file upload.> \
> &#x20;          &#x20;> \
> Note:> \
> The file must be provided as a single byte array.> \\
>
> \
> Metadata can be attached in the request to indicate additional information such as document category or number of documents.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}":{"post":{"tags":["Documents"],"summary":"Upload Document","description":"Upload a document for the specified merchant using a standard file upload.\r\n            \r\nNote:\r\nThe file must be provided as a single byte array.\r\n\r\nMetadata can be attached in the request to indicate additional information such as document category or number of documents.","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentCategory","in":"query","description":"Specifies the category of the document included in the uploaded file.","required":true,"schema":{"$ref":"#/components/schemas/eDocs.Contracts.DocumentCategory"}}],"requestBody":{"description":"A file as a byte array.","content":{"application/json":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"eDocs.Contracts.DocumentCategory":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"type":"integer","format":"int32"},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Signed Application (Base64 Format)

> Upload a signed application for the specified merchant by providing the document content in Base64 format.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/SignedApplication/Base64Format":{"post":{"tags":["Documents"],"summary":"Upload Signed Application (Base64 Format)","description":"Upload a signed application for the specified merchant by providing the document content in Base64 format.","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A file object containing a base64 encoded string.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Controllers.SignedAppBase64"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Controllers.SignedAppBase64":{"type":"object","properties":{"mapping":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Controllers.Mapping"},"nullable":true},"file":{"type":"string","description":"The signed application document as a Base64-encoded string (Optional).","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Controllers.Mapping":{"type":"object","properties":{"businessContactId":{"type":"integer","format":"int32"},"documentType":{"type":"string","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Upload Signed Application

> Upload a signed application document for the specified merchant.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/SignedApplication":{"post":{"tags":["Documents"],"summary":"Upload Signed Application","description":"Upload a signed application document for the specified merchant.","parameters":[{"name":"fileName","in":"query","description":"Specifies the name of the file to upload.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A file object containing a byte array.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Controllers.SignedApp"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Controllers.SignedApp":{"type":"object","properties":{"mapping":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Controllers.Mapping"},"nullable":true},"file":{"type":"string","format":"byte","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Controllers.Mapping":{"type":"object","properties":{"businessContactId":{"type":"integer","format":"int32"},"documentType":{"type":"string","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Get a List of Documents

> Retrieve a list of all documents for the specified merchant.> \
> &#x20;          &#x20;> \
> Note: The documents are grouped by category, and the response provides detailed information for each document.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/List":{"get":{"tags":["Documents"],"summary":"Get a List of Documents","description":"Retrieve a list of all documents for the specified merchant.\r\n            \r\nNote: The documents are grouped by category, and the response provides detailed information for each document.","parameters":[{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a collection of documents successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFileCollection"}}}},"400":{"description":"Bad Request: Returns when merchantNumber is null or empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"401":{"description":"Unauthorized: User does not have the required role or access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"403":{"description":"Forbidden: The user does not have the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error: This could be due to system errors. Please contact support for assistance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.EDocsFileCollection":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFile"},"description":"Contains the details of the document.","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.EDocsFile":{"required":["category","fileName","merchantNumber"],"type":"object","properties":{"category":{"maximum":2147483647,"minimum":1,"type":"integer","description":"The category of the document, represented as an integer value.","format":"int32"},"categoryDescription":{"type":"string","description":"A description of the document category.","nullable":true},"description":{"type":"string","description":"A brief description of the document.","nullable":true},"documentId":{"type":"string","description":"The unique identifier for the document.","format":"uuid"},"fileName":{"minLength":1,"type":"string","description":"The name of the file associated with the document."},"merchantNumber":{"minLength":1,"type":"string","description":"The merchant's unique identifier."},"metaData":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.EDocsFileMetaData"},"description":"A list of metadata associated with the document.","nullable":true},"fileExtension":{"type":"string","description":"The file extension of the document.","nullable":true},"dateUploaded":{"type":"string","description":"The date and time (ISO 8601 format) when the document was uploaded. \r\nFormat: yyyy-MM-ddTHH:mm:ssZ","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.EDocsFileMetaData":{"type":"object","properties":{"metadataKey":{"type":"string","description":"The key or name of the metadata field.","nullable":true},"metadataValue":{"type":"string","description":"The value associated with the metadata key.","nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Retrieve Document by Document ID

> Retrieve a specific document for the specified merchant using its unique document ID.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/{documentId}":{"get":{"tags":["Documents"],"summary":"Retrieve Document by Document ID","description":"Retrieve a specific document for the specified merchant using its unique document ID.","parameters":[{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","description":"The unique identifier of the document to retrieve. \r\n            This value is returned when the document is initially uploaded.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Delete a Document for a Merchant

> Delete a document associated with the specified merchant and document ID.> \
> &#x20;          &#x20;> \
> Note: The request requires proper authorization in accordance with the MID policy.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/{documentId}":{"delete":{"tags":["Documents"],"summary":"Delete a Document for a Merchant","description":"Delete a document associated with the specified merchant and document ID.\r\n            \r\nNote: The request requires proper authorization in accordance with the MID policy.","parameters":[{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","description":"The unique identifier of the document to retrieve. This value is returned when the document is initially uploaded.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Document is deleted successfully."},"400":{"description":"Bad Request: Returns when either the Merchant number or the Document ID provided is null or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"401":{"description":"Unauthorized: User does not have the required role or access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"403":{"description":"Forbidden: The user does not have the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error: This could be due to system errors. Please contact support for assistance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Update Voided Check Bank Account Number

> Update the bank account number associated with a specific voided check for the specified merchant using documentID.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/{documentId}/VoidedChecks":{"post":{"tags":["Documents"],"summary":"Update Voided Check Bank Account Number","description":"Update the bank account number associated with a specific voided check for the specified merchant using documentID.","parameters":[{"name":"merchantNumber","in":"path","description":"The merchant's unique identification number.","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","description":"The unique identifier of the document for which the voided check is provided. This value is returned when creating, updating, or retrieving a document.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"bankAccountId","in":"query","description":"The unique identifier of the bank account.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```

## Delete a Voided Check

> Delete a voided check document for the specified merchant from the document storage associated with a given bank account.> \
> &#x20;          &#x20;> \
> Note:> \
> Once the document is deleted, the corresponding bank account record is also updated to remove the reference to the deleted voided check.> \\
>
> \
> Require proper authorization in accordance with the MID policy.

```json
{"openapi":"3.0.1","info":{"title":"External US Onboarding Workflow","version":"0.0.1"},"paths":{"/api/demographics/v1/Documents/{merchantNumber}/{documentId}/VoidedChecks":{"delete":{"tags":["Documents"],"summary":"Delete a Voided Check","description":"Delete a voided check document for the specified merchant from the document storage associated with a given bank account.\r\n            \r\nNote:\r\nOnce the document is deleted, the corresponding bank account record is also updated to remove the reference to the deleted voided check.\r\n\r\nRequire proper authorization in accordance with the MID policy.","parameters":[{"name":"documentId","in":"path","description":"Specifies the unique identifier of the document to retrieve. This value is returned when the document is uploaded.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"bankAccountId","in":"query","description":"Indicates the account for which this voided check was provided. This value will be returned when creating, updating, or retrieving a bank account.","required":true,"schema":{"type":"string"}},{"name":"merchantNumber","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Document is deleted successfully."},"400":{"description":"Bad Request: Returns when any of the input parameters like the Merchant number, DocumentId or the BankAccountID provided is null or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"401":{"description":"Unauthorized: User does not have the required role or access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"403":{"description":"Forbidden: The user does not have the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}},"500":{"description":"Internal Server Error: This could be due to system errors. Please contact support for assistance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.ErrorResults"}}}}}}}},"components":{"schemas":{"MerchantDemographics.Api.Models.ErrorResults":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/MerchantDemographics.Api.Models.BoardingError"},"nullable":true}},"additionalProperties":false},"MerchantDemographics.Api.Models.BoardingError":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the error and provide detailed information on what went wrong during the request processing.","nullable":true},"resultCode":{"type":"integer","description":"Code associated with the error and helps to categorize the error type or severity. (It can be any error code 400/401/501, etc depending upon its type)","format":"int32"},"timeStamp":{"type":"string","description":"DateTime in ISO 8601 format. It is read-only and automatically set to the current date and time.","format":"date-time","readOnly":true},"fieldPath":{"type":"array","items":{"type":"string"},"description":"Field path(s) where the error occurred in a data structure. It can contains any field.","nullable":true}},"additionalProperties":false}}}}
```
