Guides from Compari

icon picker
Post JSON

Literally just: ​post to
Add the headers
And for body: ​{{comparisureJson.value}}

Shahil Poonsamy
Campbell showed you how to use postman for the one thing, Bennie could also show you how to use it to manually post a survey. Then what you could do is instead of pressing the ‘send to comparisure’ button, you could copy the survey JSON into postman, edit it there (adding in the surveyComplete key), and send it to Compari manually
Shahil Poonsamy
And then just make sure that if question keys or order changes that it matches what’s in DB
Tim Treagus
I like this because it means I’m basically a dev
Tim Treagus
Shahil Poonsamy
Nerd
Shahil Poonsamy

Tim Treagus
Haha okay sweet. Ya, I think I’ll not edit any of the JSON other than the SurveyComplete but that will work well
Tim Treagus
Can I just check what the “send to Comparisure” button does in retool and copy that into Postman?
Shahil Poonsamy
Yeah there’s some room to play around, it’s not too risky considering you can always re-upload the survey to comparisure to wipe it clean
Tim Treagus

Shahil Poonsamy
The ‘send to comparisure’ button won’t look like how it looks in postman
Shahil Poonsamy
You can go to editor mode and view the event but it’s a retool API query
Shahil Poonsamy
It might be helpful
Tim Treagus
Do you ever have this where you can’t see below because the code line thing is covering?
Screenshot 2023-01-12 at 13.49.45.png
image.png
Shahil Poonsamy
Yeah you can collapse that window at the top
Tim Treagus
Sorry, last message.
Do I inspect after clicking the button and viewing the right panel
OR do I click the right item in the Code section in bottom left and view at the bottom of screen
Screenshot 2023-01-12 at 13.54.56.png
image.png
Shahil Poonsamy
All the queries are at the bottom left, so you’re looking for postSurvey there
Shahil Poonsamy
That’s the event that fires when the button is pressed
Tim Treagus
COOL!!
Literally just: ​post to
Add the headers
And for body: ​{{comparisureJson.value}}
image.png
Screenshot 2023-01-12 at 13.58.16.png


Yeah you can use comparisureJson.value but if you copy it into postman then you need to substitute comparisureJson with the json structure in there

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.