# Intake API This API allows prescribers to send new prescriptions to Gifthealth to be filled. This API is intended only for use by prescribers and their software vendors. {% admonition type="info" %} In order to use this API, you must have an active agreement and/or attestation with Gifthealth. If you are interested in using this API, please contact Gifthealth. {% /admonition %} Version: 2024-12-10 ## Servers ``` https://{defaultHost}/intake_api/2024-12-10 ``` Variables: - `defaultHost` Default: "app.gifthealth.com" ## Security ### BearerAuth Base64-encoded bearer token of value `api_key:api_secret` Type: http Scheme: bearer ## Download OpenAPI description [Intake API](https://docs.gifthealth.com/_bundle/intake-api/@2024-12-10/openapi.yaml) ## Events Events allow you to receive updates about prescriptions as they move through the dispensing process. When an important part of the dispensing process happens for a prescription, we publish an `Event` to the event feed if there is a `Subscription` record with matching demographic and prescription information (termed `PrescriptionIdentity`). You don't need to worry about creating subscriptions if you use our Intake API to send prescriptions to Gifthealth. We automatically create subscriptions for you. The events endpoint is stateless, and assumes a single consumer. Events are not removed from the events endpoint when they are read. Events currently remain visible in the events endpoint indefinitely, but this may change in the future. Design your system with the understanding that event availability has a limited timeframe. You are responsible for tracking the `iterator` value as you process items from the queue. You can replay events as needed by resetting the `iterator` value to an earlier value. ### Get all events - [GET /events](https://docs.gifthealth.com/intake-api/openapi/events/getevents.md) ### Get an event - [GET /events/{id}](https://docs.gifthealth.com/intake-api/openapi/events/getevent.md) ## Subscriptions Events are published to your events endpoint when they match a `Subscription`. Subscriptions are created in one of two ways: 1. Subscriptions are automatically created for prescriptions sent to Gifthealth through the Intake API. 2. Subscriptions can be created for prescriptions received via fax or eRx using these endpoints. You are responsible for matching Gifthealth events to your own prescription records using the prescription's `PrescriptionIdentity` attributes. ### Create a subscription - [POST /subscriptions](https://docs.gifthealth.com/intake-api/openapi/subscriptions/createsubscription.md) ### Get a subscription - [GET /subscriptions/{id}](https://docs.gifthealth.com/intake-api/openapi/subscriptions/getsubscription.md) ### Cancel a subscription - [DELETE /subscriptions/{id}](https://docs.gifthealth.com/intake-api/openapi/subscriptions/cancelsubscription.md) ## Prescriptions ### Send a prescription - [POST /prescriptions](https://docs.gifthealth.com/intake-api/openapi/prescriptions/createprescription.md) ### Get a prescription - [GET /prescriptions/{external_id}](https://docs.gifthealth.com/intake-api/openapi/prescriptions/getprescription.md) ### Cancel a prescription - [DELETE /prescriptions/{external_id}](https://docs.gifthealth.com/intake-api/openapi/prescriptions/cancelprescription.md)