What is the SMT code to call a function in the JSON API??!
I know this seems like a dumb question with all the docs and everything but this key ingredient to my success is missing (at least to me!)
I have done the MivaLearn JSON API course! This is not in it.
This is kind of where I'm at but totally not working yet because it's all wrong lol. Please help.
I know this seems like a dumb question with all the docs and everything but this key ingredient to my success is missing (at least to me!)
I have done the MivaLearn JSON API course! This is not in it.
This is kind of where I'm at but totally not working yet because it's all wrong lol. Please help.
Code:
<mvt:capture variable="g.myJSONtoSend"> { "Store_Code": "batman", "Function": "CustomerList_Load_Query", "Count": 10, "Offset": 0 } </mvt:capture> <mvt:assign name="g.jsonURI" value="'https://mydevsite.mivamerchant.net/mm5/json.mvc?Store_Code=batman&Function=CustomerList_Load_Query'" /> <mvt:assign name="g.line" value="asciichar( 13 ) $ asciichar( 10 )" /> <mvt:assign name="g.headers" value=" 'Content-Type: application/json' $ g.line " /> <mvt:assign name="g.headers" value=" g.headers $ 'X-Miva-API-Authorization: MIVA MYTOKENAUTHCODEIsHERE' $ g.line " /> <mvt:assign name="g.headers" value=" g.headers $ 'Content-Length: 605' $ g.line " /> ... so do I use mvt:call? add my g.myJSONtoSend var to the headers? So not sure what's next here. <mvt:call action="g.jsonURI" method="'POST'" headers="'g.headers'"> <mvt:eval expr="s.callvalue" /> </mvt:call>
Comment