---
title: "Upload employee compliance document"
method: POST
path: "/eor/workers/compliance-documents/{document_id}"
tags: ["eorWorkerCompliance"]
---

# Upload employee compliance document

`POST /eor/workers/compliance-documents/{document_id}`

## Request

- Base URL: `https://api.letsdeel.com/rest`
- URL: `https://api.letsdeel.com/rest/eor/workers/compliance-documents/{document_id}`
- Auth: HTTP bearer

Uploads a file against the specified `document_id` to complete a compliance document that still needs one for an EOR employee. Use it after finding the document with GET /eor/workers/compliance-documents. If the file is already in File Service, send a JSON body with its reference instead of sending the bytes again; otherwise send the file as `multipart/form-data`.

 **Token scopes**: `worker:write`

## Path parameters

- `document_id` string, uuid, required

## Request body

- object
  - `data` EorWorkersComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaData, required
    - `files` EorWorkersComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaDataFilesItems[], required: Files to submit against the requirement. Allowed types: pdf, png, jpg, jpeg, heic.
      - `file_id` string, uuid, required: File Service file id.
      - `content_type` string, required: MIME type of the file.
      - `one_time_secret` string, required: File Service one-time secret for that file.
      - `original_filename` string, required: Original filename, extension included.

## Response `200`

Successful operation.

- EorWorkerComplianceUploadEORWorkerComplianceDocumentResponse200
  - `data` EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaData, required
    - `success` boolean, required: Indicates whether the file upload was successful.

## Other responses

- `400`: Bad request. The file is missing, a file item is malformed (for example it has no file_id or one_time_secret), or the document_id format is invalid.
- `401`: Authentication failed. Bearer token is missing, expired, or invalid.
- `403`: Forbidden. The worker does not have permission to upload to this compliance document, the document cannot be submitted in its current state, or the requirement is obsolete.
- `404`: The compliance document specified by document_id was not found.
- `422`: Unprocessable entity. The file could not be stored: its file_id is unknown or its one_time_secret is wrong or already used, it is larger than 10 MB, its type is not PNG, JPG, JPEG, HEIC or PDF, its content does not match its type, or its storage reference could not be verified.
- `500`: Internal server error. The file upload failed or an unexpected error occurred.
- `502`: Bad gateway. The file storage service failed while it checked the file reference. Nothing was submitted. A file reference that was already used cannot be used again, so upload the files again before you retry.

## Changes

- **2026-11-27** `807d0402b96c`: 1 info
  - added the non-success response with the status `502`
- **2026-11-20** `5e3551f9acd7`: 2 breaking, 10 warning, 8 info
  - removed the media type `multipart/form-data` from the request body
  - for the `path` request parameter `document_id`, the format changed from no format to `uuid`
  - removed the optional property `errors/items/path` from the response with the `400` status
  - removed the optional property `errors/items/path` from the response with the `401` status
  - …16 more

[Operation history](https://skmtc.dev/deel/apis/eor-worker-endpoints/changes/eor/workers/compliance-documents/:document_id/post.md)

---

[API](https://skmtc.dev/deel/apis/eor-worker-endpoints.md) - [All operations](https://skmtc.dev/deel/apis/eor-worker-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/deel/apis/eor-worker-endpoints/revisions/5b6c2effe996?raw)
