Lifecycle Processor
Use to unblock your testing in the development environment!
Approve Prescription
Endpoint: /approvePrescription
Simulates a practitioner approving prescription(s) on an order.
Requirements:
- Order must be in "Requires Provider Review" status
Behavior:
- Based on configuration settings, the order will either:
- Transition to "Requires Order Processing" status, OR
- Be sent to the pharmacy (mocked in development) and then transition to "Completed" status
- Applies a refill count to every prescription on the order, so the order can reach a refill state.
Request Body (optional):
{
"refillsAllowed": 3
}refillsAllowed— number of refills to grant on approval.- If omitted, an existing refill count already set on the prescription (e.g. from a prior manual update) is preserved.
- If none is set, defaults to the prescription's suggested refill count (based on the product's configured refill count), or
0if that isn't configured either.
Example:
POST {telegra.url}/orders/<order-id>/actions/lifecycleProcessor/approvePrescription?access_token={{ias.affiliate.accessToken}}
{
"refillsAllowed": 3
}Reaching and verifying a refill state:
To exercise a refill state, call /approvePrescription (with or without refillsAllowed, as above) on an order in "Requires Provider Review" status, then check the result with:
GET {telegra.url}/patients/<patient-id>/actions/getPrescriptions?access_token={{ias.affiliate.accessToken}}
Which field holds the refill count depends on the project's refill management:
refillsAllowed— used when the project is Telegra-managed (refillManager: telegra)refillsAllocatedToPharmacy— used when the project is pharmacy-managed (refillManager: pharmacy, the default)
Note:
prescriptionCompleteis not set anywhere in the system and always readsfalse. Do not rely on it to detect a completed or refill state — use the fields above instead.
Get Order Creation Payload
Endpoint: /getOrderCreationPayload
Generates the complete payload needed to create an order via the API.
Requirements:
- Choose an order that is already submitted
Behavior:
- Returns all the data required to hit the
/Create Order + Patient + Questionnairesendpoint - Useful for replicating or testing order creation flows
Example:
POST {telegra.url}/orders/<order-id>/actions/lifecycleProcessor/getOrderCreationPayload?access_token={{ias.affiliate.accessToken}}
Trigger Webhook Event
Endpoint: /triggerWebhook
Simulates a specific webhook event being triggered for an order to test webhook integrations.
Requirements:
- Configure the webhook endpoint in the affiliate admin portal
- Request must include a JSON body
- The
webhookIdmust be configured to listen for the specifiedeventType
Request Body Structure:
{
"eventType": "order_submitted",
"webhookId": "webhook::example_id"
}Example:
POST {telegra.url}/orders/<order-id>/actions/lifecycleProcessor/triggerWebhook?access_token={{ias.affiliate.accessToken}}
Supported Event Types:
affiliate_admin_was_assignedexternal_questionnaire_instance_synchronization_attemptmessage-from-admin-practitioner-receivedmessage-from-patient-receivednew_status_set_to_requestorder_createdorder_expeditedorder_payment_collectedorder_product_variation_transitionedorder_submittedorder_updatedpatient_communication_answered_callpatient_communication_follow_up_requiredpatient_communication_text_message_sentpatient_communication_unanswered_callpharmacy_bundle_fax_sentorder_reminder_sentvisit_type_overriddenvisit_type_updated
Updated about 2 months ago
