Upload attachment to processing account

View as MarkdownOpen in Claude
> Before you upload an attachment, make sure that you follow local privacy regulations and get the merchant's consent to process their information. **Note:** You need the ID of the processing account before you can upload an attachment. If you don't know the processingAccountId, go to the [Retrieve a Merchant Platform](https://docs.payroc.com/api/schema/boarding/merchant-platforms/retrieve) method. The attachment must be an uncompressed file under 30MB in one of the following formats: - .bmp, csv, .doc, .docx, .gif, .htm, .html, .jpg, .jpeg, .msg, .pdf, .png, .ppt, .pptx, .tif, .tiff, .txt, .xls, .xlsx In the request, include the attachment that you want to upload and the following information about the attachment: - **type** - Type of attachment that you want to upload. - **description** - Short description of the attachment. In the response, our gateway returns information about the attachment including its upload status and an attachmentId that you can use to [Retrieve the details of the Attachment](https://docs.payroc.com/api/schema/attachments/get-attachment).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

processingAccountIdstringRequired
Unique identifier that we assigned to the processing account.

Headers

Idempotency-KeystringRequiredformat: "uuid"
Unique identifier that you generate for each request. You must use the [UUID v4 format](https://www.rfc-editor.org/rfc/rfc4122) for the identifier. For more information about the idempotency key, go to [Idempotency](https://docs.payroc.com/api/idempotency).

Request

This endpoint expects a multipart form containing a file.
attachmentobjectRequired
Object that contains details about the attachment.
filefileRequired
File that you want to upload.

Response

Successful request. We received the attachment.
attachmentIdstring
Unique identifier that our gateway assigned to the attachment.
typeenum
Type of attachment.
uploadStatusenum
Upload status of the attachment. The value is one of the following: - `pending` - We have not yet uploaded the attachment. - `accepted` - We have uploaded the attachment. - `rejected` - We rejected the attachment.
Allowed values:
fileNamestring<=150 characters
Name of the file.
contentTypestring<=76 characters
Content type of the file.
entityobject
Object that contains information about the entity that the attachment is linked to.
createdDatedatetime
Date and time that we received your request to upload the attachment.
lastModifiedDatedatetime
Date and time the attachment was last modified.
descriptionstring or null<=250 characters
Short description of the attachment.
metadatamap from strings to strings or null
Object that you can send to include custom metadata in the request.

Errors