How to use post appointment fhir api

im creating patient portal where appointments can be created and retrived . I can create appointment in openemr patient portal UI but need details about api .