Hi there!
I am not sure about the type of soap in question, which could range from mild ones to strong chemicals that could erode the GI mucosa. If it has been sometime since the episode and there are no specific symptoms, it is likely to have been mild and may not be hazardous; though such episodes should be avoided in future. If there have been specific symptoms associated or the episode is recent (in a few hours), I would suggest visiting the ER.
Hope this is helpful.
Take care!
I will add it was handsoap.