Skip to main content
POST
/
salesOrders
/
{salesOrderId}
/
files
Create Sales Order File
curl --request POST \
  --url https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-tenant-id: <x-tenant-id>' \
  --data '
{
  "FileData": "aSDinaTvuI8gbWludGxpZnk=",
  "FileDataType": "<string>",
  "FileName": "<string>"
}
'
{
  "Id": 123,
  "SalesOrderId": 123,
  "FileId": 123,
  "FileDataType": "<string>",
  "Size": 123,
  "CreatedAt": "2023-11-07T05:31:56Z",
  "FileName": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-tenant-id
string<uuid>
required

The tenant ID for the target ERP instance.

x-runas
string

The User-Id (int or uuid) on whose behalf the request is executed. Requires scope 'Application.RunAs'.

x-companyid
string

The Company-Id (int or uuid) of the company on whose behalf the request is executed.

Path Parameters

salesOrderId
integer<int32>
required

The id of the sales order that the file belong to.

Body

application/json

The file to create.

Model Class: CreateFile

FileData
string<byte>
required

Base64 encoded data of the file.

FileDataType
string
required

Type of file.

Maximum string length: 2147483647
FileName
string
required

name of the file.

Maximum string length: 2147483647

Response

The created file.

Model Class: SalesOrderFile

Id
integer<int32>
required

Unique ID to identify a sales order file.

SalesOrderId
integer<int32>
required

Unique ID to identify a sales order.

FileId
integer<int32>
required

Unique ID to identify a file.

FileDataType
string
required

Type of file.

Size
number<decimal>
required

Image size.

CreatedAt
string<date-time>
required

Date when the file was created in the system.

FileName
string
required

name of the file.