Upload Documents
Use this route to upload documents linked to a previously registered partner. The upload is done via multipart/form-data and accepts the upload of multiple documents in a single request, with a limit of 40 documents per sub_seller_id.
The limit of 40 documents per sub_seller_id applies to the total number of documents sent per sub_seller_id, so it is not possible to send more than 40 documents in a single request or in subsequent requests.
Request Variable Path
| Attribute | Type | Description |
|---|---|---|
| sub_seller_id | string | Partner ID. |
It is necessary to save the sub_seller_id that Marlim returns in the creation requests in your application. Only with this id will it be possible to proceed with sending the files.
Request Body Params
This route does not accept a body in JSON format. The request's Content-Type must be multipart/form-data.
| Attribute | Type | Description |
|---|---|---|
| files | file | File(s) sent in the request body. To send more than one file, repeat the files field in the same request.Accepted types: PDF, JPG, JPEG and PNG.Maximum size: 1 MB per file. Maximum quantity: 40 files per sub_seller_id. |
curl --location --request PATCH 'https://api.marlim.co/v3/sub_sellers/sub_k4m6Rw5rlQszEY7fiuRe/files' \
--header 'api_key: api_key_value' \
--form 'files=@"/path/to/income_statement.pdf"' \
--form 'files=@"/path/to/proof_of_address.jpg"'
When using the --form parameter of curl, the Content-Type: multipart/form-data (with the boundary) is set automatically. Do not set this header manually.
Response Object
| Attribute | Type | Description |
|---|---|---|
| sub_seller_id | string | ID of the partner to which the documents were linked. |
| message | string | Upload confirmation message. |
| total | int32 | Number of documents successfully uploaded. |
{
"sub_seller_id": "sub_k4m6Rw5rlQszEY7fiuRe",
"message": "Files uploaded successfully",
"total": 2
}
Examples
- Documents Successfully Uploaded
- Invalid Document Type
- Document Exceeds Maximum Size
- More Than 40 Documents Sent
curl --location --request PATCH 'https://api.marlim.co/v3/sub_sellers/sub_k4m6Rw5rlQszEY7fiuRe/files' \
--header 'api_key: api_key_value' \
--form 'files=@"/path/to/income_statement.pdf"' \
--form 'files=@"/path/to/proof_of_address.jpg"' \
--form 'files=@"/path/to/articles_of_incorporation.png"'
{
"sub_seller_id": "sub_k4m6Rw5rlQszEY7fiuRe",
"message": "Files uploaded successfully",
"total": 2
}
curl --location --request PATCH 'https://api.marlim.co/v3/sub_sellers/sub_k4m6Rw5rlQszEY7fiuRe/files' \
--header 'api_key: api_key_value' \
--form 'files=@"/path/to/spreadsheet.txt"'
{
"errors": [
{
"type": "invalid_input",
"message": "File [spreadsheet.txt] has an invalid type. Allowed types: PDF, PNG, JPG and JPEG."
}
]
}
curl --location --request PATCH 'https://api.marlim.co/v3/sub_sellers/sub_k4m6Rw5rlQszEY7fiuRe/files' \
--header 'api_key: api_key_value' \
--form 'files=@"/path/to/contract.pdf"'
{
"errors": [
{
"type": "invalid_input",
"message": "File [contract.pdf] exceeds the maximum size of 1 MB."
}
]
}
curl --location --request PATCH 'https://api.marlim.co/v3/sub_sellers/sub_k4m6Rw5rlQszEY7fiuRe/files' \
--header 'api_key: api_key_value' \
--form 'files=@"/path/to/document_1.pdf"' \
--form 'files=@"/path/to/document_2.pdf"' \
--form 'files=@"/path/to/... (41 documents total)"'
{
"errors": [
{
"type": "invalid_input",
"message": "A maximum of 40 files can be sent per request."
}
]
}
FAQ
Which documents should be sent?
| Document | Required | Notes |
|---|---|---|
| Company constitutive document (according to legal nature) | Yes | Accepted documents: CCMEI, Articles of Association, Sole Proprietor Registration, Bylaws, or another equivalent constitutive document, according to the company's legal type. |
| Selfie of partners or legal representatives, or proof of completed biometrics | Yes | Must allow validation of the representative's identity. |
| Photo identification document (RG, CIN, or CNH) of partners or legal representatives | Yes | Valid and legible document. |
What should be sent as the company constitutive document?
The constitutive document varies according to the legal nature of the CNPJ. Documents equivalent to the Articles of Association will be accepted, such as CCMEI, Sole Proprietor Registration, Bylaws, or another valid constitutive act, as long as they allow identification of the company, its partners (when applicable), and its legal representatives.
What are the selfie quality requirements?
The selfie must allow validation of the partner's or legal representative's identity. For this reason, the image should meet the following criteria:
- Face fully visible, centered, and not cropped.
- Good lighting, without excessive shadows on the face.
- Sharp image, without blur or low resolution.
- No sunglasses, caps, masks, or other items covering the face.
- Recent photo that matches the identification document sent.
Proof of completed biometrics is also accepted, as long as it allows validation of the representative's identity.
What should be sent as the partners' photo identification document?
It is mandatory to send the photo identification document of the partners or legal representatives. RG, CIN, or CNH will be accepted, as long as the document is valid and legible.
- Valid document within its expiration date (when applicable).
- Sharp image, without cropping, and with all data legible.
- Document photo visible and without reflections that impair readability.
- Document matching the partner or legal representative informed in the registration.