Search Orders
1 min
code examples curl request post \\ \ url https //api upstartcommerce com/v1/order/search \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x upstart tenant string' \\ \ data '{ "page" "", "pagesize" "", "orders" \[ { "property" "", "asc" true } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x upstart tenant", "string"); var raw = json stringify({ "page" "", "pagesize" "", "orders" \[ { "property" "", "asc" true } ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api upstartcommerce com/v1/order/search", 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/search") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x upstart tenant"] = "string" request body = json dump({ "page" "", "pagesize" "", "orders" \[ { "property" "", "asc" true } ] }) response = https request(request) puts response read body import requests import json url = "https //api upstartcommerce com/v1/order/search" payload = json dumps({ "page" "", "pagesize" "", "orders" \[ { "property" "", "asc" true } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json', 'x upstart tenant' 'string' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // success orders returned { "page" 0, "pagesize" 0, "count" 0, "facetcounts" { "properties" \[ { "property" "", "propertytype" "", "counts" \[ { "value" "", "count" 0 } ] } ], "ranges" \[ { "property" "", "propertytype" "", "counts" \[ { "value" "", "count" 0 } ], "start" "", "end" "", "gap" "" } ] }, "queryid" "", "redirects" \[ "" ], "items" \[ { "id" "", "siteids" \[ "" ], "customerid" "", "anonymous" false, "state" "", "currency" "", "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" "" } ], "locationid" "", "timezoneoffset" "", "haulawayrequested" 0, "coupons" \[ { "id" "", "applied" false, "applystatus" "", "promotionid" "" } ], "returnpolicyqualifications" \[ { "id" "", "name" "", "groupqualifications" \[ { "name" "", "triggeringitemids" \[ "" ], "qualifyingitemids" \[ "" ], "qualifyingsubjects" {}, "qualificationresult" {} } ] } ], "shippingcoordinates" { "latitude" 0, "longitude" 0 }, "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 }, "payments" \[ { "exec" {}, "id" "", "processeddate" "", "refundeddate" "", "state" "", "transactionid" "", "value" 0 } ], "tax" { "processeddate" "", "refundeddate" "", "state" "", "transactioncode" "" }, "email" "", "orderdate" "", "modifieddate" "", "closeoutdate" "", "internalinvoiceid" "", "timezoneid" "" } ] }// the request contained information that the server was unable to process appropriate errors are provided in the response body { "name" "", "code" "", "detail" "" }// 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" "" }