<div dir="ltr"><div>That error indicates that the user making the request does not have a site affiliation with the site that it's attempting to create</div><div>a visit for.<br></div><div><br></div><div>Try ensuring that the user has access to 111-RWA-1 under "Sites" in the user_accounts page and trying the API request again.</div><div><span style="font-variant-ligatures:normal;background-color:rgb(255,255,255)"><span style="color:rgb(162,86,55)"><br></span></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 8, 2021 at 1:12 PM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
Dear LorisDev team,
<div><br>
</div>
<div>After upgrading to Loris 23 I am not able to insert Visits using the APIs. I updated the payload for the creation of visits but I’m getting the following error:</div>
<div><br>
</div>
<div>===</div>
<div>
<div style="color:rgb(54,54,54);background-color:rgb(255,255,255);font-family:Menlo,Monaco,"Courier New",monospace;line-height:18px;white-space:pre-wrap">
<div><span style="color:rgb(44,44,44)">{</span></div>
<div><span style="color:rgb(9,89,132)">"error"</span><span style="color:rgb(44,44,44)">:</span>
<span style="color:rgb(162,86,55)">"You can`t create candidates visit for that site"</span></div>
<div><span style="color:rgb(44,44,44)">}</span></div>
</div>
</div>
<div>===</div>
<div><br>
</div>
<div>This is my request and payload:</div>
<div><br>
</div>
<div>===</div>
<div><span style="color:rgb(19,19,19);font-family:OpenSans,Helvetica,Arial,sans-serif;font-variant-ligatures:normal;white-space:pre-wrap;background-color:rgb(255,255,255)"><a href="https://ipmsa-loris.bic.mni.mcgill.ca/api/v0.0.3//candidates/559153/w024" target="_blank">https://ipmsa-loris.bic.mni.mcgill.ca/api/v0.0.3//candidates/559153/w024</a></span></div>
<div><span style="color:rgb(19,19,19);font-family:OpenSans,Helvetica,Arial,sans-serif;font-variant-ligatures:normal;white-space:pre-wrap;background-color:rgb(255,255,255)"><br>
</span></div>
<div><span style="font-variant-ligatures:normal;background-color:rgb(255,255,255)">
<div style="line-height:18px">
<div style="color:rgb(54,54,54);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">
<span style="color:rgb(44,44,44)">{</span></div>
<div style="color:rgb(54,54,54);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">
<span style="color:rgb(9,89,132)">"CandID"</span><span style="color:rgb(44,44,44)">:</span>
<span style="color:rgb(162,86,55)">"559153"</span><span style="color:rgb(44,44,44)">,</span>
</div>
<div style="color:rgb(54,54,54);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">
<span style="color:rgb(9,89,132)">"Visit"</span><span style="color:rgb(44,44,44)">:</span>
<span style="color:rgb(162,86,55)">"w024"</span><span style="color:rgb(44,44,44)">,</span>
</div>
<div style="color:rgb(54,54,54);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">
<span style="color:rgb(9,89,132)">"Site"</span><span style="color:rgb(44,44,44)">:</span>
<span style="color:rgb(162,86,55)">"111-RWA-1"</span><span style="color:rgb(44,44,44)">,</span>
</div>
<div style="color:rgb(54,54,54);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">
<span style="color:rgb(9,89,132)">"Battery"</span><span style="color:rgb(44,44,44)">:</span>
<span style="color:rgb(162,86,55)">"Experimental"</span><span style="color:rgb(44,44,44)">,</span>
</div>
<div><span style="color:rgb(9,89,132);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">"Project"</span><span style="color:rgb(44,44,44);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">:</span>
<font face="Menlo, Monaco, Courier New, monospace" color="#a25637"><span style="white-space:pre-wrap">“REMOVED</span></font><span style="color:rgb(162,86,55);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">"</span></div>
<div style="color:rgb(54,54,54);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap">
<span style="color:rgb(44,44,44)">}</span></div>
</div>
</span></div>
<div>===</div>
<div><br>
</div>
<div>The user accessing this end-point was only created for that specific site. Additionally, I don’t see any logs in apache.</div>
<div><br>
</div>
<div>Best,</div>
<div>Alfredo.</div>
<div>The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at <a href="http://www.massgeneralbrigham.org/complianceline" target="_blank">http://www.massgeneralbrigham.org/complianceline</a> . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.</div></div>

_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote></div>