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--
Parameter | Description |
---|---|
|
order id |
Parameter | Description |
---|---|
|
description |
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"
}
Path | Type | Description |
---|---|---|
|
|
file id |
|
|
order id |
|
|
file uploading datetime |
|
|
filename |
|
|
description |
|
|
user |
|
|
first name |
|
|
second name |
|
|
patronymic name |
listByClient
Сортировка по дате загрузки: uploadedAt,ASC/DESC
(default: uploadedAt,DESC)
.request
GET /api/v2/clients/1000110377/files?sort=uploadedAt,DESC HTTP/1.1
Parameter | Description |
---|---|
|
client id |
Parameter | Description |
---|---|
|
pageable |
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
}
Path | Type | Description |
---|---|---|
|
|
Client files info |
|
|
file id |
|
|
order id |
|
|
file uploading datetime |
|
|
filename |
|
|
description |
|
|
user |
|
|
first name |
|
|
second name |
|
|
patronymic name |
listByOrder
Сортировка по дате загрузки: uploadedAt,ASC/DESC
(default: uploadedAt,DESC)
.request
GET /api/v2/orders/1000000117/files?sort=uploadedAt,ASC HTTP/1.1
Parameter | Description |
---|---|
|
order id |
Parameter | Description |
---|---|
|
pageable |
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
}
Path | Type | Description |
---|---|---|
|
|
Order files info |
|
|
file id |
|
|
order id |
|
|
file uploading datetime |
|
|
filename |
|
|
description |
|
|
user |
|
|
first name |
|
|
second name |
|
|
patronymic name |
download
Попытка скачать удаленный файл выкинет 409 статус
.request
GET /api/v2/orders/files/3 HTTP/1.1
Parameter | Description |
---|---|
|
file id |
delete
Попытка удалить уже удаленный файл выкинет 409 статус
.request
DELETE /api/v2/orders/files/1 HTTP/1.1
Parameter | Description |
---|---|
|
file id |