I don't think there is a way directly via the API. The way I structure things is I have a ChipmunkItem which represents things in my world. The data pointer points to one of these. A ChipmunkItem knows everything about that object, all the bodies and shapes that make it up (a single item can have multiple bodies) and all it's constraints. I drive everything from the ChipmunkItems e.g. i don't just "delete a body", instead a ChipmunkItem deletes one of it's bodies and it knows everything it needs to do for that.
So you could go down a fully flexible solution where you have an equivalent of ChipmunkItem and you add a merge(ChipmunkItem*) method. So you have two objects, draw a pin joint between them and then merge the two sets of bodies/shapes/constraints together. Or if you just want to find the constraint that a body is attached two why not just have a singleton look up table of body => constraint(s) and when you delete a body just scan the list to find any constraint(s).
If you're an over-engineering OO person like me you'll go for the first...I'd recommend the second