POST api/Catering/CalculateDeliveryCost
Request Information
URI Parameters
None.
Body Parameters
CateringCalculateDeliveryCostName | Description | Type | Additional information |
---|---|---|---|
Location | string |
None. |
|
Input | Collection of DeliveryRestaurantInputView |
None. |
Request Formats
application/json, text/json
Sample:
{ "location": "sample string 1", "input": [ { "restaurantId": 1, "isSaas": true, "estimatedDistance": 2.1, "foodTruckOffsiteServiceInput": { "minimumOrderValueWithoutAdditionalCharge": 1.0, "additionalCharge": 2.0, "offsiteServiceDistance": 3, "excessOffsiteServiceFeePerKilo": 4.0, "offsiteServiceFee": 5.0 }, "foodStallOffsiteServiceInput": { "minimumOrderValueWithoutAdditionalCharge": 1.0, "additionalCharge": 2.0, "offsiteServiceDistance": 3, "excessOffsiteServiceFeePerKilo": 4.0, "offsiteServiceFee": 5.0 }, "menus": [ { "menuItemId": 1, "restaurantPackageTypeId": 1, "quantity": 2, "menuType": 1, "price": 3.0 }, { "menuItemId": 1, "restaurantPackageTypeId": 1, "quantity": 2, "menuType": 1, "price": 3.0 } ] }, { "restaurantId": 1, "isSaas": true, "estimatedDistance": 2.1, "foodTruckOffsiteServiceInput": { "minimumOrderValueWithoutAdditionalCharge": 1.0, "additionalCharge": 2.0, "offsiteServiceDistance": 3, "excessOffsiteServiceFeePerKilo": 4.0, "offsiteServiceFee": 5.0 }, "foodStallOffsiteServiceInput": { "minimumOrderValueWithoutAdditionalCharge": 1.0, "additionalCharge": 2.0, "offsiteServiceDistance": 3, "excessOffsiteServiceFeePerKilo": 4.0, "offsiteServiceFee": 5.0 }, "menus": [ { "menuItemId": 1, "restaurantPackageTypeId": 1, "quantity": 2, "menuType": 1, "price": 3.0 }, { "menuItemId": 1, "restaurantPackageTypeId": 1, "quantity": 2, "menuType": 1, "price": 3.0 } ] } ] }
text/html
Sample:
{"location":"sample string 1","input":[{"restaurantId":1,"isSaas":true,"estimatedDistance":2.1,"foodTruckOffsiteServiceInput":{"minimumOrderValueWithoutAdditionalCharge":1.0,"additionalCharge":2.0,"offsiteServiceDistance":3,"excessOffsiteServiceFeePerKilo":4.0,"offsiteServiceFee":5.0},"foodStallOffsiteServiceInput":{"minimumOrderValueWithoutAdditionalCharge":1.0,"additionalCharge":2.0,"offsiteServiceDistance":3,"excessOffsiteServiceFeePerKilo":4.0,"offsiteServiceFee":5.0},"menus":[{"menuItemId":1,"restaurantPackageTypeId":1,"quantity":2,"menuType":1,"price":3.0},{"menuItemId":1,"restaurantPackageTypeId":1,"quantity":2,"menuType":1,"price":3.0}]},{"restaurantId":1,"isSaas":true,"estimatedDistance":2.1,"foodTruckOffsiteServiceInput":{"minimumOrderValueWithoutAdditionalCharge":1.0,"additionalCharge":2.0,"offsiteServiceDistance":3,"excessOffsiteServiceFeePerKilo":4.0,"offsiteServiceFee":5.0},"foodStallOffsiteServiceInput":{"minimumOrderValueWithoutAdditionalCharge":1.0,"additionalCharge":2.0,"offsiteServiceDistance":3,"excessOffsiteServiceFeePerKilo":4.0,"offsiteServiceFee":5.0},"menus":[{"menuItemId":1,"restaurantPackageTypeId":1,"quantity":2,"menuType":1,"price":3.0},{"menuItemId":1,"restaurantPackageTypeId":1,"quantity":2,"menuType":1,"price":3.0}]}]}
application/xml, text/xml
Sample:
<CateringCalculateDeliveryCost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EB.Service.Contracts.Api"> <Input> <DeliveryRestaurantInputView> <EstimatedDistance>2.1</EstimatedDistance> <FoodStallOffsiteServiceInput> <AdditionalCharge>2</AdditionalCharge> <ExcessOffsiteServiceFeePerKilo>4</ExcessOffsiteServiceFeePerKilo> <MinimumOrderValueWithoutAdditionalCharge>1</MinimumOrderValueWithoutAdditionalCharge> <OffsiteServiceDistance>3</OffsiteServiceDistance> <OffsiteServiceFee>5</OffsiteServiceFee> </FoodStallOffsiteServiceInput> <FoodTruckOffsiteServiceInput> <AdditionalCharge>2</AdditionalCharge> <ExcessOffsiteServiceFeePerKilo>4</ExcessOffsiteServiceFeePerKilo> <MinimumOrderValueWithoutAdditionalCharge>1</MinimumOrderValueWithoutAdditionalCharge> <OffsiteServiceDistance>3</OffsiteServiceDistance> <OffsiteServiceFee>5</OffsiteServiceFee> </FoodTruckOffsiteServiceInput> <IsSaas>true</IsSaas> <Menus> <DeliveryDetailInputView> <MenuItemId>1</MenuItemId> <MenuType>Menu</MenuType> <Price>3</Price> <Quantity>2</Quantity> <RestaurantPackageTypeId>Meal</RestaurantPackageTypeId> </DeliveryDetailInputView> <DeliveryDetailInputView> <MenuItemId>1</MenuItemId> <MenuType>Menu</MenuType> <Price>3</Price> <Quantity>2</Quantity> <RestaurantPackageTypeId>Meal</RestaurantPackageTypeId> </DeliveryDetailInputView> </Menus> <RestaurantId>1</RestaurantId> </DeliveryRestaurantInputView> <DeliveryRestaurantInputView> <EstimatedDistance>2.1</EstimatedDistance> <FoodStallOffsiteServiceInput> <AdditionalCharge>2</AdditionalCharge> <ExcessOffsiteServiceFeePerKilo>4</ExcessOffsiteServiceFeePerKilo> <MinimumOrderValueWithoutAdditionalCharge>1</MinimumOrderValueWithoutAdditionalCharge> <OffsiteServiceDistance>3</OffsiteServiceDistance> <OffsiteServiceFee>5</OffsiteServiceFee> </FoodStallOffsiteServiceInput> <FoodTruckOffsiteServiceInput> <AdditionalCharge>2</AdditionalCharge> <ExcessOffsiteServiceFeePerKilo>4</ExcessOffsiteServiceFeePerKilo> <MinimumOrderValueWithoutAdditionalCharge>1</MinimumOrderValueWithoutAdditionalCharge> <OffsiteServiceDistance>3</OffsiteServiceDistance> <OffsiteServiceFee>5</OffsiteServiceFee> </FoodTruckOffsiteServiceInput> <IsSaas>true</IsSaas> <Menus> <DeliveryDetailInputView> <MenuItemId>1</MenuItemId> <MenuType>Menu</MenuType> <Price>3</Price> <Quantity>2</Quantity> <RestaurantPackageTypeId>Meal</RestaurantPackageTypeId> </DeliveryDetailInputView> <DeliveryDetailInputView> <MenuItemId>1</MenuItemId> <MenuType>Menu</MenuType> <Price>3</Price> <Quantity>2</Quantity> <RestaurantPackageTypeId>Meal</RestaurantPackageTypeId> </DeliveryDetailInputView> </Menus> <RestaurantId>1</RestaurantId> </DeliveryRestaurantInputView> </Input> <Location>sample string 1</Location> </CateringCalculateDeliveryCost>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
DeliverySummaryViewName | Description | Type | Additional information |
---|---|---|---|
DeliveryCostTotal | decimal number |
None. |
|
DeliveryDiscount | decimal number |
None. |
|
DeliveryCostSummary | decimal number |
None. |
|
DeliveryCosts | Collection of DeliveryCostView |
None. |
Response Formats
application/json, text/json
Sample:
{ "deliveryCostTotal": 1.0, "deliveryDiscount": 2.0, "deliveryCostSummary": 3.0, "deliveryCosts": [ { "restaurantId": 1, "distance": 2.1, "cost": 3.0, "discount": 4.0, "totalCost": 5.0, "isFree": true, "method": 1, "foodTruckOffsiteServiceCharge": { "additionalCharge": 1.0, "offsiteServiceCharge": 2.0 }, "foodStallOffsiteServiceCharge": { "additionalCharge": 1.0, "offsiteServiceCharge": 2.0 } }, { "restaurantId": 1, "distance": 2.1, "cost": 3.0, "discount": 4.0, "totalCost": 5.0, "isFree": true, "method": 1, "foodTruckOffsiteServiceCharge": { "additionalCharge": 1.0, "offsiteServiceCharge": 2.0 }, "foodStallOffsiteServiceCharge": { "additionalCharge": 1.0, "offsiteServiceCharge": 2.0 } } ] }
text/html
Sample:
{"deliveryCostTotal":1.0,"deliveryDiscount":2.0,"deliveryCostSummary":3.0,"deliveryCosts":[{"restaurantId":1,"distance":2.1,"cost":3.0,"discount":4.0,"totalCost":5.0,"isFree":true,"method":1,"foodTruckOffsiteServiceCharge":{"additionalCharge":1.0,"offsiteServiceCharge":2.0},"foodStallOffsiteServiceCharge":{"additionalCharge":1.0,"offsiteServiceCharge":2.0}},{"restaurantId":1,"distance":2.1,"cost":3.0,"discount":4.0,"totalCost":5.0,"isFree":true,"method":1,"foodTruckOffsiteServiceCharge":{"additionalCharge":1.0,"offsiteServiceCharge":2.0},"foodStallOffsiteServiceCharge":{"additionalCharge":1.0,"offsiteServiceCharge":2.0}}]}
application/xml, text/xml
Sample:
<DeliverySummaryView xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EB.Service.Contracts.Api"> <DeliveryCostSummary>3</DeliveryCostSummary> <DeliveryCostTotal>1</DeliveryCostTotal> <DeliveryCosts> <DeliveryCostView> <Cost>3</Cost> <Discount>4</Discount> <Distance>2.1</Distance> <FoodStallOffsiteServiceCharge> <AdditionalCharge>1</AdditionalCharge> <OffsiteServiceCharge>2</OffsiteServiceCharge> </FoodStallOffsiteServiceCharge> <FoodTruckOffsiteServiceCharge> <AdditionalCharge>1</AdditionalCharge> <OffsiteServiceCharge>2</OffsiteServiceCharge> </FoodTruckOffsiteServiceCharge> <IsFree>true</IsFree> <Method>Bike</Method> <RestaurantId>1</RestaurantId> <TotalCost>5</TotalCost> </DeliveryCostView> <DeliveryCostView> <Cost>3</Cost> <Discount>4</Discount> <Distance>2.1</Distance> <FoodStallOffsiteServiceCharge> <AdditionalCharge>1</AdditionalCharge> <OffsiteServiceCharge>2</OffsiteServiceCharge> </FoodStallOffsiteServiceCharge> <FoodTruckOffsiteServiceCharge> <AdditionalCharge>1</AdditionalCharge> <OffsiteServiceCharge>2</OffsiteServiceCharge> </FoodTruckOffsiteServiceCharge> <IsFree>true</IsFree> <Method>Bike</Method> <RestaurantId>1</RestaurantId> <TotalCost>5</TotalCost> </DeliveryCostView> </DeliveryCosts> <DeliveryDiscount>2</DeliveryDiscount> </DeliverySummaryView>