---
title: "Documents:Add"
method: POST
path: "/documents"
tags: ["Merchants"]
---

# Documents:Add

`POST /documents`

Upload a (compliance) document as base64. Uploading is done based on a document code, the content of the document needs to be encoded to base64. You can also specify the filename.

You need to authenticate with an AT code (as username) and the corresponding token (as password) or you can authenticate with an AL code (as username) and the corresponding secret (as password)

## Request body

- object
  - `code` Code — unresolved $ref
  - `fileName` string — Name of the file.
  - `documentFile` string — Base64 encoding of the file.
  - `files` string[] — Array of base64 encoded files.

## Response `201`

Created

- Document
  - `code` string — Code of the acceptance document.
  - `type` string — Type of the acceptance document.
  - `status` string — Status of the acceptance document.

## Other responses

- `400` — Bad request, see response body for more information
- `401` — Unauthorized. Supplied credentials are invalid
- `403` — Forbidden. Supplied credentials have no rights
- `404` — Resource not found
- `405` — Used HTTP method is not allowed
- `406` — Not acceptable. The supplied content type in the accept parameter in the header is not supported
- `415` — Unsupported media. The supplied content type in the content-type parameter in the header is not supported
- `422` — Unprocessable Entity, see response body for more information
- `429` — Rate limit reached.
- `500` — An internal error occurred

---

[API](https://skmtc.dev/pay/apis/pay-transaction-gateway-unit-api.md) · [All operations](https://skmtc.dev/pay/apis/pay-transaction-gateway-unit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pay/pay-transaction-gateway-unit-api/revisions/2bc260c7bdfc/schema)
