Gluing together together differentiable stacks

I am trying to figure out the conditions under which you can glue together a collection of (differentiable) stacks by equivalences, and get a differentiable stack.

More precisely, I have a collection of stacks $U_i$ and open substacks $U_i|_j\hookrightarrow U_i$ with equivalences $\varphi_{ij}:U_i|_j\to U_j|_i$ so that $\varphi_{ij}\circ \varphi_{ji}\cong \operatorname{Id}_{U_i|_j}$. I want to know when and how this determines a differentiable stack.

If we assume the $U_i$'s are manifolds and the $\varphi_{ij}$'s satisfy the cocycle condition $\varphi_{jk}\circ \varphi_{ij}=\varphi_{ik}$ (after restricting the domains), then gluing along the $\varphi_{ij}$'s will give us a (possibly non-Hausdorff) manifold $M$. We can think of $M$ as the coequalizer of the groupoid $\coprod_{ij} U_i|_j\rightrightarrows\coprod_i U_i$ where source map is inclusion, target is $\varphi_{ij}$ composed with inclusion, etc. (This is just a reverse-engineered Cech groupoid)

My hope/guess is that the picture for stacks works roughly this way, that maybe if we have some weak cocycle condition ($\varphi_{jk}\circ \varphi_{ij}\cong\varphi_{ik}$), maybe we can glue everything together as a (weak?) coequalizer of the appropriate groupoid (which is now a groupoid internal to the category of stacks). I'm not sure if this is right, and even if it is I don't really know how to show it.

Any thoughts/references would be much appreciated, thanks!

• I think you are asking for a descent condition for stacks. I believe it works more or less the way you imagined with your weak cocycle isomorphisms satisfying their own cocycle condition. You don't need to go any higher since you are dealing with 2-categories. – Eugene Lerman Feb 11 '17 at 3:33
• Yes, that should get me where I'm trying to go. Do you know anywhere this is written down? I've tried looking but I keep ending up with explanations of the descent condition that is part of the definition of a stack. Thanks in advance. – Benjamin Feb 11 '17 at 8:59