Order
orders journal
GET /api/v2/orders?size=5&page=0 HTTP/1.1
Parameter | Description |
---|---|
|
order id |
|
order type |
|
order status |
|
department id |
|
client family name |
|
user id |
|
prescription basis |
|
date of creation from |
|
date of creation to |
|
expected finish date from |
|
expected finish date to |
|
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 9000111225,
"clientId" : 1000001527,
"createdAt" : "2024-02-06T00:00:00",
"finishedAt" : null,
"finishExpectingAt" : null,
"departmentId" : "1000000003",
"departmentName" : "Первый магазин",
"client" : {
"id" : 1000001527,
"familyName" : "Михайлов",
"firstName" : "Евгений",
"patronymicName" : "Александрович"
},
"type" : "SALE",
"status" : "ORDER_READY",
"sum" : 1.0,
"paidSum" : 12.0,
"receiptPrinted" : false,
"createdById" : 1000000004,
"redo" : true,
"readyStatusInStore" : true
}, {
"id" : 1000000245,
"clientId" : 1000001526,
"createdAt" : "2025-08-27T10:21:00",
"finishedAt" : "2025-08-27T10:21:56.591689",
"finishExpectingAt" : null,
"departmentId" : "1000000003",
"departmentName" : "Первый магазин",
"client" : {
"id" : 1000001526,
"familyName" : "Пууманн",
"firstName" : "Анна",
"patronymicName" : "-"
},
"type" : "SALE",
"status" : "ORDER_COMPLETED",
"sum" : 500.0,
"paidSum" : 500.0,
"receiptPrinted" : false,
"createdById" : 9000000008,
"redo" : null,
"readyStatusInStore" : false
}, {
"id" : 1000000244,
"clientId" : 1000001526,
"createdAt" : "2025-08-27T10:21:00",
"finishedAt" : "2025-08-27T10:21:55.419127",
"finishExpectingAt" : null,
"departmentId" : "1000000003",
"departmentName" : "Первый магазин",
"client" : {
"id" : 1000001526,
"familyName" : "Пууманн",
"firstName" : "Анна",
"patronymicName" : "-"
},
"type" : "SALE",
"status" : "ORDER_COMPLETED",
"sum" : 2000.0,
"paidSum" : 2000.0,
"receiptPrinted" : false,
"createdById" : 9000000008,
"redo" : null,
"readyStatusInStore" : false
}, {
"id" : 1000000243,
"clientId" : 1000001526,
"createdAt" : "2025-08-27T10:21:00",
"finishedAt" : "2025-08-27T10:21:52.761923",
"finishExpectingAt" : null,
"departmentId" : "1000000003",
"departmentName" : "Первый магазин",
"client" : {
"id" : 1000001526,
"familyName" : "Пууманн",
"firstName" : "Анна",
"patronymicName" : "-"
},
"type" : "SALE",
"status" : "ORDER_COMPLETED",
"sum" : 2300.0,
"paidSum" : 2300.0,
"receiptPrinted" : false,
"createdById" : 9000000008,
"redo" : null,
"readyStatusInStore" : false
}, {
"id" : 1000000242,
"clientId" : 1000001526,
"createdAt" : "2025-08-27T10:21:00",
"finishedAt" : "2025-08-27T10:21:49.630233",
"finishExpectingAt" : null,
"departmentId" : "1000000003",
"departmentName" : "Первый магазин",
"client" : {
"id" : 1000001526,
"familyName" : "Пууманн",
"firstName" : "Анна",
"patronymicName" : "-"
},
"type" : "SALE",
"status" : "ORDER_COMPLETED",
"sum" : 4000.0,
"paidSum" : 4000.0,
"receiptPrinted" : false,
"createdById" : 9000000008,
"redo" : null,
"readyStatusInStore" : false
} ],
"totalPages" : 49,
"totalElements" : 244,
"size" : 5,
"page" : 0,
"number" : 0,
"pageable" : {
"pageSize" : 5,
"pageNumber" : 0
},
"totalResult" : {
"sum" : 443555.0,
"pageSum" : 8801.0,
"paidSum" : 418647.1,
"pagePaidSum" : 8812.0,
"purchaseSum" : null,
"pagePurchaseSum" : null,
"retailSum" : null,
"pageRetailSum" : null,
"count" : 244
}
}
Path | Type | Description |
---|---|---|
|
|
an array of filtered orders |
|
|
order id |
|
|
client id |
|
|
order created datetime |
|
|
order finished datetime |
|
|
order expecting finished datetime |
|
|
order type |
|
|
order statuses |
|
|
final receipt printed or not |
|
|
client |
|
|
first name |
|
|
second name |
|
|
patronymic name |
|
|
department id |
|
|
department name |
|
|
id of user |
|
|
sum of order |
|
|
paid sum |
|
|
check if final receipt was printed |
|
|
if redo or not |
list basic types
GET /api/v2/orders/types HTTP/1.1
HTTP/1.1 200 OK
[ {
"id" : "GLASSES",
"localName" : "Изготовление очков"
}, {
"id" : "SALE",
"localName" : "Заказ \"Продажа\""
}, {
"id" : "REPAIR",
"localName" : "Заказ \"Ремонт\""
}, {
"id" : "CONTACT_LENS",
"localName" : "Продажа контактных линз"
}, {
"id" : "CHECK_VISION",
"localName" : "Проверка зрения"
} ]
Path | Type | Description |
---|---|---|
|
|
List of basic order types |
|
|
Id of the account type |
|
|
Localized name of the account type |
statuses
Всевозможные значения статуса заказа
GET /api/v2/orders/statuses HTTP/1.1
HTTP/1.1 200 OK
[ "WAIT", "ACCEPTED", "IN_WORK", "ORDER_READY", "ORDER_COMPLETED", "RETURN", "CANCEL" ]
Path | Type | Description |
---|---|---|
|
|
array of available order statuses |
orders commented or active statuses
журнал статусов незавершенных заказов, а также по которым есть комментарии
GET /api/v2/orders/commented-or-active/statuses?createdOnFrom=2020-12-08&createdOnTo=2022-09-05&departmentId=1000000003 HTTP/1.1
Parameter | Description |
---|---|
|
order created date from |
|
order created date to |
|
department id |
|
HTTP/1.1 200 OK
{
"content" : [ {
"orderId" : 1000000131,
"status" : "ORDER_COMPLETED"
}, {
"orderId" : 1000000129,
"status" : "ORDER_COMPLETED"
}, {
"orderId" : 1000000127,
"status" : "ACCEPTED"
}, {
"orderId" : 1000000126,
"status" : "ACCEPTED"
}, {
"orderId" : 1000000125,
"status" : "ORDER_COMPLETED"
} ],
"pageable" : {
"pageNumber" : 0,
"pageSize" : 100,
"sort" : {
"empty" : false,
"sorted" : true,
"unsorted" : false
},
"offset" : 0,
"paged" : true,
"unpaged" : false
},
"last" : true,
"totalElements" : 5,
"totalPages" : 1,
"first" : true,
"size" : 100,
"number" : 0,
"sort" : {
"empty" : false,
"sorted" : true,
"unsorted" : false
},
"numberOfElements" : 5,
"empty" : false
}
Path | Type | Description |
---|---|---|
|
|
orders commented or active statuses |
|
|
Идентификатор заказа |
|
|
Статус заказа |
get
GET /api/v2/orders/1000000012 HTTP/1.1
Parameter | Description |
---|---|
|
order id |
HTTP/1.1 200 OK
{
"id" : 1000000012,
"createdAt" : "2019-01-31T17:13:00.000Z",
"clientId" : 1000000002,
"type" : "SALE",
"departmentName" : "Первый магазин",
"productionDepartmentName" : "Первый магазин",
"status" : "ORDER_COMPLETED",
"sum" : 3500.0,
"paidSum" : 3500.0,
"comment" : null
}
Path | Type | Description |
---|---|---|
|
|
id |
|
|
createdAt |
|
|
type |
|
|
departmentName |
|
|
productionDepartmentName |
|
|
status |
|
|
Discount order sum |
|
|
Сумма, оплаченная за заказ |
last purchased contact lenses
GET /api/v2/orders/last-purchased/contact-lenses?clientId=1110012983 HTTP/1.1
Unresolved directive in index.adoc - include::/builds/itigris/optima-core/optima/optima-2-backend/target/generated-snippets/order-last-purchased-contact-lenses/request-parameters.adoc[] .response
HTTP/1.1 200 OK
{
"manufacturerName" : "Johnson&Johnson",
"brandName" : "1-DAY Acuvue Define Diag",
"color" : "Shimmer",
"packageQuantity" : 5,
"wearingPeriod" : "1 день",
"retailPrice" : 1.0,
"dioptre" : 0.0,
"cylinder" : null,
"axis" : null,
"add" : null,
"curvatureRadius" : 8.5,
"diameter" : 14.2,
"purchasedAt" : "2023-04-23T15:25:00",
"orderId" : 1110000056,
"requestType" : "FROM_SUPPLIER",
"departmentId" : null,
"eyeType" : "LEFT_EYE",
"expected" : true
}
Path | Type | Description |
---|---|---|
|
|
Является ли контактная линза заявкой |
|
|
Производитель |
|
|
Бренд |
|
|
Цвет |
|
|
Количество в упаковке |
|
|
Период ношения |
|
|
Цена |
|
|
Радиус |
|
|
Дата покупки |
|
|
Тип заявки (в случае если последние купленные контактные линзы были оформлены через заявку) |
|
|
Департамент из которого были куплены контактные линзы (в случае если последние купленные контактные линзы были оформлены через заявку) |
list basic types
GET /api/v2/orders/types HTTP/1.1
HTTP/1.1 200 OK
[ {
"id" : "GLASSES",
"localName" : "Изготовление очков"
}, {
"id" : "SALE",
"localName" : "Заказ \"Продажа\""
}, {
"id" : "REPAIR",
"localName" : "Заказ \"Ремонт\""
}, {
"id" : "CONTACT_LENS",
"localName" : "Продажа контактных линз"
}, {
"id" : "CHECK_VISION",
"localName" : "Проверка зрения"
} ]
Path | Type | Description |
---|---|---|
|
|
List of basic order types |
|
|
Id of the account type |
|
|
Localized name of the account type |
get order reasons
Сортировка по дефолту: name,asc
GET /api/v2/orders/reasons?orderType=SALE HTTP/1.1
Parameter | Description |
---|---|
|
[SALE, REPAIR, GLASSES, CONTACT_LENS, CHECK_VISION, REPAIR_GLASSES_ORDER] |
|
HTTP/1.1 200 OK
[ {
"names" : [ "Test for getting order reason" ],
"required" : true,
"active" : true
}, {
"names" : [ ],
"required" : true,
"active" : false
} ]
Path | Type | Description |
---|---|---|
|
|
Варианты информационного поля |
|
|
Является ли настройка обязательной |
|
|
Активно ли поле (если нет, его не нужно отрисовывать) |