Endpoints Reference
Checkout
Calculate tax and shipping
code examples curl location globoff request post '/v1/{siteenv}/{siteid}/checkout/calculate' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'post', headers myheaders, redirect 'follow' }; fetch("/v1/{siteenv}/{siteid}/checkout/calculate", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("/v1/{siteenv}/{siteid}/checkout/calculate") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = http request(request) puts response read body import requests import json url = "/v1/{siteenv}/{siteid}/checkout/calculate" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // returns tax and shipping information { "available shipping methods" \[ { "id" "next day", "name" "next day delivery", "price" 4 8 } ], "platform shipping line" { "type" "", "id" "", "name" "", "price" 4 8 }, "totals" { "line items" 14 8, "shipping price" 4 8, "tax" 2 2, "total price" 21 8 }, "ignite state" {} }// auth failure // system exception