Door is ajar information

How can I get a notification about the event when the door is ajar? (Ie. not fully closed, so locking is not possible)?

I don’t have a gateway so BT API is the goal to use for this.