Calculate order total price

This API is responsible for determining the total price of an order. It processes the entire item hierarchy, including any modifiers and customizations, to return the accurate total cost of the order. This ensures that all pricing rules and calculations are consistently applied.

📘

Order total price calculation

This API uses the same calculation formula described in the General → Order Calculation Formula Guides. Our partners can use this API or they can calculate the total price by themselves. However, It is crucial that the total price sent in the order creation request matches the total price returned by this API, with a precision of two decimal places.

Items

After specifying the brand, branch and menu from which the order is taking place, an attribute items is used to select all the products of your order with their children hierarchy of modifier groups and modifiers.

the Item object should follow the following format:

Attribute nameDescriptionType
quantityspecifies the quantity of a given item, this attribute can be neglected in the case of selecting a modifier_group as it's always considered to be 1 in that case however, it's mandatory for all other item types.Integer or NULL
item_idthe id of the item to be selectedInteger
childrenJSON Array that represents all the children to be selected under this item, the children object should follow the same attribute format of the items object having a quantity, item_id and children attributesObject Array
🚧

children

It is crucial that all items objects follow the exact same format and having all 3 attributes.

the last level of items that has no children should have an attribute of children that is an empty array.

📘

modifier_groups

the quantity of a modifier_group is always 1 and the children items of that modifier group should follow the min, max and max_num_of_same_item specified by that modifier_group

Language
Credentials
Bearer
Click Try It! to start a request and see the response here!