---
title: "Create Sales Order File"
method: POST
path: "/v2/salesOrders/{salesOrderId}/files"
tags: ["salesorder"]
---

# Create Sales Order File

`POST /v2/salesOrders/{salesOrderId}/files`

Create a new file for a specific sales order

## Path parameters

- `salesOrderId` string, uuid, required

## Headers

- `x-tenant-id` string, uuid, required
- `x-runas` string
- `x-companyid` string

## Request body

- JTLWawiRestContractsModelsV1CommonCreateFile — Model Class: CreateFile
  - `fileData` string, byte — Base64 encoded data of the file.
  - `fileDataType` string — Type of file.
  - `fileName` string — name of the file.

## Response `201`

The created file.

- JTLWawiRestContractsModelsV1SalesOrderSalesOrderFile — Model Class: SalesOrderFile
  - `id` string, uuid
  - `salesOrderId` string, uuid
  - `fileId` string, uuid
  - `fileDataType` string — Type of file.
  - `size` number — Image size.
  - `createdAt` string, date-time — Date when the file was created in the system.
  - `fileName` string — name of the file.

## Other responses

- `400` — The sent data is invalid.
- `401`
- `402` — No licence available or the app has not been authorised by JTL.

---

[API](https://skmtc.net/jtl-software/apis/scx-authentication-api.md) · [All operations](https://skmtc.net/jtl-software/apis/scx-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jtl-software/scx-authentication-api/versions/f979b1ea6951/schema)
