I am trying to work with sears api and my process is failing due to my lack of understanding the documentation provided by sears
this is the sears url
https://www.searscommerceservices.com/question/seller-facing-api-changes-0216/
based upon what they have given as to how to generate the signature and authenticate i am trying something like this but i am getting an error:
Request Timed out
Here is my Try in CF
<cfscript>
function ISODateFormat(datetime) {
return '#DateFormat(datetime, "yyyy-mm-dd")#T#TimeFormat(datetime, "HH:mm:ss")#Z';
}
</cfscript>
<cfset variables.sellerid = '1234'>
<cfset variables.emailaddress = 'abc@domain.com'>
<cfset variables.secretkey = 'xxxx='>
<cffunction name="auth" access="public" returntype="any">
<cfset var myResult="">
<cfset sDate = ISODateFormat(now())>
<cfset StrtoSig = "#variables.sellerid#:#variables.emailaddress#:#sDate#">
<cfset secretKey = variables.secretkey>
<cfset x = hmac("#StrtoSig#","#secretKey#","HMACSHA256","utf-8")>
<cfreturn x>
</cffunction>
<cffunction access="public" name="getitems" returntype="any">
<cfset surl = 'https://seller.marketplace.sears.com/SellerPortal/api/attributes/v4?itemClassId=1234&sellerId=1234'>
<cfset getauth = auth()>
<cfset sheader = "authorization:HMAC-SHA256 emailaddress=#variables.emailaddress#,timestamp=#sDate#,signature=#getauth#">
<cfhttp url="#surl#" result="results">
<cfhttpparam name="authorization" type="HEADER" value="#sheader#">
</cfhttp>
<cfdump var="#results#">
</cffunction>