order
order.calculate
Calculates the total cost of an order for a given customer and a set of products, as well as the available shipping methods based on the specified address. The calculation takes into account store product prices, discounts, taxes, shipping costs, and other store settings. The result includes a detailed breakdown of the final order cost by its components.
Note that the final totals, taxes, and other amounts must include the corresponding values for the selected shipping method.
The result of this method can be used when creating an order using the order.add method.
post/order.calculate.json
Request
- Base URL: https://api.api2cart.com/v1.1
- URL: https://api.api2cart.com/v1.1/order.calculate.json
- Auth: API key in header x-api-key and API key in header x-store-key
Request body
Example request
{
"customer_email": "jubari@hannsgroup.com",
"currency": "USD",
"currency_id": "usd",
"store_id": "1",
"rounding_precision": 3,
"shipp_first_name": "John",
"shipp_last_name": "Smith",
"shipp_address_1": "Green str. 35",
"shipp_address_2": "Green str. 35",
"shipp_city": "Chicago",
"shipp_postcode": "24545",
"shipp_state": "IL",
"shipp_country": "US",
"shipp_company": "Apple",
"shipp_phone": "880086544564",
"bill_first_name": "Adam",
"bill_last_name": "Smith",
"bill_address_1": "Green str. 35",
"bill_address_2": "Red str, 2",
"bill_city": "Chicago",
"bill_postcode": "12345",
"bill_state": "IL",
"bill_country": "US",
"bill_company": "Apple",
"bill_phone": "8 800 5659 6896",
"response_fields": "{result}",
"idempotency_key": "098f6bcd4621d373cade4e832627b4f6",
"order_item": [
{
"order_item_id": "125, where {x} - 1,2,3,... etc",
"order_item_parent": 2,
"order_item_parent_option_name": "Internal Memory Storage",
"order_item_option": [
{
"order_item_option_name": "Color",
"order_item_option_value": "green"
}
]
}
]
}Response
successful operation
Changes
No recorded changes to this operation across all 1 revision of this API.