Get Order by Guest Token
1 min
code examples curl request get \\ \ url 'https //api upstartcommerce com/v1/order/guest?token=string' \\ \ header 'accept application/json' \\ \ header 'x upstart tenant string'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x upstart tenant", "string"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api upstartcommerce com/v1/order/guest?token=string", 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("https //api upstartcommerce com/v1/order/guest?token=string") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x upstart tenant"] = "string" response = https request(request) puts response read body import requests import json url = "https //api upstartcommerce com/v1/order/guest?token=string" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'x upstart tenant' 'string' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // success order returned { "id" "", "state" "", "internalstate" "", "currency" "", "haulawayrequested" "", "distanceunit" "", "items" \[ { "catalogitem" { "id" "", "siteids" \[ "" ], "activationdate" "", "archived" false, "avgrating" 4 62, "avggrouprating" "", "numgroupreviews" 0, "productpopularity" "", "excludesclearanceitems" false, "brandname" "bob's best toy line", "deactivationdate" "", "dynamicproperties" {}, "hidden" false, "ignoreinventory" false, "livedate" "", "manufacturername" "bob's chemical company ", "media" "", "modifieddate" "", "name" "green flubber", "numreviews" 17, "offeredstandardwarranty" {}, "servicequalification" { "eligibleproductids" \[ "" ], "eligibleshippingmethodids" \[ "" ] }, "productitems" \[ "" ], "relatedids" \[ "" ], "seo" { "pagetitle" "", "description" "", "metakeywords" \[ "" ] }, "shippingmethodids" \[ "" ], "subversion" 0, "tags" \[ "" ], "taxcode" "p0000000", "type" "", "typeid" "", "typename" "speaker", "version" 5 }, "catalogitemid" "", "catalogitemtype" "", "id" "", "pricing" { "baseprice" { "listprice" 0, "price" 0, "type" "", "zone" "" }, "feepriceadjustments" \[ { "basevalue" 0, "description" "", "id" "", "name" "", "quantity" "", "value" 0 } ], "promotionpriceadjustments" \[ { "description" "", "name" "", "id" "", "value" 0, "taxpriceadjustment" { "taxcode" "", "value" 0 } } ], "taxpriceadjustment" { "taxcode" "", "value" 0 } }, "productitemskuid" "", "promotionid" "", "quantity" "", "shipmentid" "", "quoteid" 0, "targetitemids" \[ "" ], "targetshipmentids" \[ "" ], "state" "" } ], "timezoneoffset" "", "coupons" \[ { "id" "", "applied" false, "applystatus" "", "promotionid" "" } ], "shippingaddress" { "street1" "", "street2" "", "city" "", "county" "", "stateorregion" "", "country" "", "postalcode" "", "pobox" false, "name" { "first" "john", "last" "smith", "middleinitial" "d ", "salutation" "capt ", "suffix" "sr " }, "businessname" "", "phonenumber" "" }, "billingaddress" { "street1" "", "street2" "", "city" "", "county" "", "stateorregion" "", "country" "", "postalcode" "", "pobox" false, "name" { "first" "john", "last" "smith", "middleinitial" "d ", "salutation" "capt ", "suffix" "sr " }, "businessname" "", "phonenumber" "" }, "shipments" \[ { "id" "", "state" "", "shippingmethodid" "", "shippingmethodname" "", "trackingnumber" "", "trackingurl" "https //www fedex com/apps/fedextrack/?action=track\&trackingnumber=391274234820\&cntry code=us\&locale=en us", "labeldownload" "", "addressfrom" { "street1" "", "street2" "", "city" "", "county" "", "stateorregion" "", "country" "", "postalcode" "", "pobox" false, "name" { "first" "john", "last" "smith", "middleinitial" "d ", "salutation" "capt ", "suffix" "sr " }, "businessname" "", "phonenumber" "" }, "locationfromid" "", "addressto" { "street1" "", "street2" "", "city" "", "county" "", "stateorregion" "", "country" "", "postalcode" "", "pobox" false, "name" { "first" "john", "last" "smith", "middleinitial" "d ", "salutation" "capt ", "suffix" "sr " }, "businessname" "", "phonenumber" "" }, "locationtoid" "", "shippingtodistance" { "value" 157 75, "unit" "" }, "rate" { "rateid" "", "carrierid" "", "pricing" { "shipping" 0, "insurance" 0, "confirmation" 0, "other" 0, "fee" 0 }, "packagetype" "", "deliverydays" "", "estimateddeliverydate" "", "carrierdeliverydates" "", "shipdate" "", "servicetype" "", "servicecode" "", "carriercode" "" }, "packages" \[ { "dimensions" { "width" 18 5, "length" 18 5, "height" 18 5, "unit" "" }, "insuredvalue" 0, "packagecode" "", "weight" { "value" "", "unit" "" }, "trackingnumber" "" } ], "pricing" { "baseprice" 0, "promotionpriceadjustments" \[ { "description" "", "name" "", "id" "", "value" 0, "taxpriceadjustment" { "taxcode" "", "value" 0 } } ], "taxpriceadjustment" { "taxcode" "", "value" 0 } }, "delivereddate" "", "errors" \[ { "code" "", "detail" "", "level" "", "message" "" } ], "pickuphours" {} } ], "pricing" { "promotionpriceadjustments" \[ { "id" "", "name" "", "value" 200, "description" "buy 1 flubber get 10 free", "itemids" \[ "e9a22ea5 253e 4764 8238 48aaefe2e1d3" ], "taxpriceadjustment" { "taxcode" "", "value" 0 } } ], "totalfee" 0, "totalitemorderpromotion" 0, "totalitemsbaseprice" 0, "totalitemsprice" 0, "totalpretaxprice" 0, "totalprice" 0, "totalpromotion" 0, "totalshippingbaseprice" 0, "totalshippingprice" 0, "totalshippingpromotion" 0, "totaltax" 0 }, "tax" { "processeddate" "", "refundeddate" "", "state" "", "transactioncode" "" }, "email" "", "orderdate" "", "modifieddate" "", "internalinvoiceid" "" }// the provided credentials were not valid for this endpoint it may be that they are expired or that the user's roles are insufficient { "name" "", "code" "", "detail" "", "reason" "" }// the requested resource was not found in the nochannel system { "name" "", "code" "", "detail" "", "reason" "" }