Order files

upload

Различные ошибки загрузки выдадут 400 статус
.request

POST /api/v2/orders/1000000117/files?description=some%20description HTTP/1.1
Content-Type: application/x-www-form-urlencoded

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=test.txt
Content-Type: text/plain

file content
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Table 288. /api/v2/orders/{orderId}/files
Parameter Description

orderId

order id

Table 289. request params
Parameter Description

description

description

response
HTTP/1.1 200 OK

{
  "fileId" : 2,
  "orderId" : 1000000117,
  "uploadedAt" : "2025-08-27T07:22:05.396Z",
  "user" : {
    "id" : 9000000008,
    "firstName" : "topmanager",
    "familyName" : "topmanager",
    "patronymicName" : "topmanager",
    "fullName" : "topmanager topmanager topmanager",
    "shortName" : "topmanager t. t."
  },
  "filename" : "test.txt",
  "description" : "some description"
}
Table 290. response description
Path Type Description

fileId

Number

file id

orderId

Number

order id

uploadedAt

String

file uploading datetime

filename

String

filename

description

String

description

user

Object

user

user.firstName

String

first name

user.secondName

String

second name

user.patronymicName

String

patronymic name

listByClient

Сортировка по дате загрузки: uploadedAt,ASC/DESC
(default: uploadedAt,DESC)
.request

GET /api/v2/clients/1000110377/files?sort=uploadedAt,DESC HTTP/1.1
Table 291. /api/v2/clients/{clientId}/files
Parameter Description

clientId

client id

Table 292. request params
Parameter Description

pageable

pageable

response
HTTP/1.1 200 OK

{
  "content" : [ {
    "fileId" : 1,
    "orderId" : 1000000117,
    "uploadedAt" : "2020-05-22T15:15:00.000Z",
    "user" : {
      "id" : 1000000022,
      "firstName" : "Тимофей",
      "familyName" : "Кадын",
      "patronymicName" : "Юрьевич",
      "fullName" : "Кадын Тимофей Юрьевич",
      "shortName" : "Кадын Т. Ю."
    },
    "filename" : "пост Сходим Астана.png",
    "description" : null
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 10,
    "sort" : {
      "empty" : false,
      "sorted" : true,
      "unsorted" : false
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : true,
  "totalElements" : 1,
  "totalPages" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "sort" : {
    "empty" : false,
    "sorted" : true,
    "unsorted" : false
  },
  "numberOfElements" : 1,
  "empty" : false
}
Table 293. response description
Path Type Description

content[].

Array

Client files info

[].fileId

Number

file id

[].orderId

Number

order id

[].uploadedAt

String

file uploading datetime

[].filename

String

filename

[].description

String

description

[].user

Object

user

[].user.firstName

String

first name

[].user.secondName

String

second name

[].user.patronymicName

String

patronymic name

listByOrder

Сортировка по дате загрузки: uploadedAt,ASC/DESC
(default: uploadedAt,DESC)
.request

GET /api/v2/orders/1000000117/files?sort=uploadedAt,ASC HTTP/1.1
Table 294. /api/v2/orders/{orderId}/files
Parameter Description

orderId

order id

Table 295. request params
Parameter Description

pageable

pageable

response
HTTP/1.1 200 OK

{
  "content" : [ {
    "fileId" : 1,
    "orderId" : 1000000117,
    "uploadedAt" : "2020-05-22T15:15:00.000Z",
    "user" : {
      "id" : 1000000022,
      "firstName" : "Тимофей",
      "familyName" : "Кадын",
      "patronymicName" : "Юрьевич",
      "fullName" : "Кадын Тимофей Юрьевич",
      "shortName" : "Кадын Т. Ю."
    },
    "filename" : "пост Сходим Астана.png",
    "description" : null
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 10,
    "sort" : {
      "empty" : false,
      "sorted" : true,
      "unsorted" : false
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : true,
  "totalElements" : 1,
  "totalPages" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "sort" : {
    "empty" : false,
    "sorted" : true,
    "unsorted" : false
  },
  "numberOfElements" : 1,
  "empty" : false
}
Table 296. response description
Path Type Description

content[].

Array

Order files info

[].fileId

Number

file id

[].orderId

Number

order id

[].uploadedAt

String

file uploading datetime

[].filename

String

filename

[].description

String

description

[].user

Object

user

[].user.firstName

String

first name

[].user.secondName

String

second name

[].user.patronymicName

String

patronymic name

download

Попытка скачать удаленный файл выкинет 409 статус
.request

GET /api/v2/orders/files/3 HTTP/1.1
Table 297. /api/v2/orders/files/{fileId}
Parameter Description

fileId

file id

delete

Попытка удалить уже удаленный файл выкинет 409 статус
.request

DELETE /api/v2/orders/files/1 HTTP/1.1
Table 298. /api/v2/orders/files/{fileId}
Parameter Description

fileId

file id