Skip to content

Order Service API Routes

Caner Sülüşoğlu edited this page Jul 26, 2022 · 7 revisions

/api/Order/CurrentOrders

/getCurrentOrdersOfUser

Kullanıcının şuanki daha teslim edilmemiş siparişlerini listeler.

Request Format:

{
   
}

Response Format:

{
   Orders: [
        OrderId: {
            Products: [
                {
                    ProductId: int,
                    ProductName: string,
                    ProductPrice: decimal,
                    ProductQuantity: int
                }
                ...
            ],
            OrderDate: string
        }...
   ]
}

/getCurrentUserOrdersToEmployee

Kantinciye daha teslim edilmemiş siparişleri listeler.

Request Format:

{
   
}

Response Format:

{
   Orders: [
        RoomName: {
            UserId: {
                OrderId: {
                    Products: [
                        {
                            ProductId: int,
                            ProductName: string,
                            ProductPrice: decimal,
                            ProductQuantity: int
                        }
                        ...
                    ],
                    OrderDate: string
                }...
            }...
        }...
   ]
}

/getCurrentRoomOrdersToEmployee

Kantinciye daha teslim edilmemiş siparişleri oda numaralarına göre listeler.

Request Format:

{
   
}

Response Format:

{
   Orders: [
        RoomName: {
            UserId: {
                OrderId: {
                    Products: [
                        {
                            ProductId: int,
                            ProductName: string,
                            ProductPrice: decimal,
                            ProductQuantity: int
                        }
                        ...
                    ],
                    OrderDate: string
                }...
            }...
        }...
   ]
}

/approveOrderByEmployee

Kantinci siparişi teslim ederken kullanıcı bilgilerini girmesini sağlar (kim ne kadar ödedi veya borçlandı) ve siparişi sonlandırır.

Request Format:

{
   orderId: string
}

Response Format:

{
   isSuccess: bool,
   Message: string
}

/approveOrdersByEmployee

Kantinci siparişi teslim ederken kullanıcı bilgilerini girmesini sağlar (kim ne kadar ödedi veya borçlandı) ve siparişi sonlandırır.

Request Format:

{
   orderId: string
}

Response Format:

{
   isSuccess: bool,
   Message: string
}

/api/Order/PastOrders

/getPastOrdersOfUser

Kullanıcının geçmiş siparişlerini listeler.[Filtreleme yapılarak isteğe göre ödenmiş veya ödenmemiş siparişleri de getirebilir.]

Request Format:

{
   itemsPerPage: int,
   pageNumber: int
}

Response Format:

{
    Orders: [
        OrderId: {
            Products: [
                {
                    ProductId: int,
                    ProductName: string,
                    ProductPrice: decimal,
                    ProductQuantity: int
                }
                ...
            ],
            OrderDate: string
        }...
   ]
}

/getPastOrdersToEmployee

Kantinciye gelen tüm geçmiş siparişleri listeler.

Request Format:

{
   itemsPerPage: int,
   pageNumber: int
}

Response Format:

{
    Orders: [
        RoomName: {
            UserId: {
                OrderId: {
                    Products: [
                        {
                            ProductId: int,
                            ProductName: string,
                            ProductPrice: decimal,
                            ProductQuantity: int
                        }
                        ...
                    ],
                    OrderDate: string
                }...
            }...
        }...
   ]
}

Clone this wiki locally