---
title: "Upload voucher file"
method: POST
path: "/Voucher/Factory/uploadTempFile"
tags: ["Voucher"]
---

# Upload voucher file

`POST /Voucher/Factory/uploadTempFile`

To attach a document to a voucher, you will need to upload it first for later use.<br> To do this, you can use this request.<br> When you successfully uploaded the file, you will get a sevdesk internal filename in the response.<br> The filename will be a hash generated from your uploaded file. You will need it in the next request!<br> After you got the just mentioned filename, you can enter it as a value for the filename parameter of the saveVoucher request.<br> If you provided all necessary parameters and kept all of them in the right order, the file will be attached to your voucher.

## Response `201`

A pdf file

- object
  - `objects` object
    - `pages` number
    - `mimeType` string
    - `originMimeType` string
    - `filename` string
    - `contentHash` string
    - `content` unknown[]
      - unknown

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `500` — Server Error

---

[API](https://skmtc.net/sevdesk/apis/sevdesk-api.md) · [All operations](https://skmtc.net/sevdesk/apis/sevdesk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sevdesk/sevdesk-api/revisions/a32cec0fecea/schema)
