status. Your ERP sets some statuses through the
API. GO JOE sets the others when the patient, the doctor or the courier acts,
and sends you an event each time.
Statuses
Fulfilment types
fulfilment.type and fulfilment.courier in the order show how the order
reaches the patient.
Express
fulfilment.type is express and fulfilment.courier is gojoe. GO JOE’s
courier collects the order from the pharmacy.
new → accepted → packed → out_for_delivery → completed
- Accept the order.
- Report
packed. - GO JOE sets
out_for_deliverywhen the courier has collected the order andcompletedwhen it is delivered. Do not report these two statuses.
courier_booking setting
in GET /me:
If a delivery fails, the status changes to
returning. The courier needs
fulfilment.return_pin to hand the package back to the pharmacy. Report
returned when the package is back. If the patient then collects the order at
the counter, report ready_for_pickup and completed.
Shipping
fulfilment.type is shipping and fulfilment.courier is pharmacy. You
ship the order with your own carrier.
new → accepted → out_for_delivery → completed
- Accept the order.
- Report
out_for_deliverywithtrackingwhen you hand the parcel to the carrier. - Report
completedwhen the parcel is delivered.
packed before out_for_delivery is optional.
The patient sees tracking.url as a link. It must be an https link to the
tracking page of one of these carriers: DHL, Deutsche Post, DPD, GLS, Hermes,
UPS, FedEx, GO! or trans-o-flex. For any other carrier, send only
tracking.number.
Pick-up
fulfilment.type is pickup. The patient collects the order at the pharmacy.
new → accepted → ready_for_pickup → completed
- Accept the order.
- Report
ready_for_pickupwhen the order is ready at the counter. - Report
completedwhen the patient has collected it.
packed before ready_for_pickup is optional.
Reject an order
If you cannot fill an order, callPOST /orders/{id}/reject with a
reason_code and an optional note.
You can reject an order while its status is
new, accepted or packed.
After a rejection:
- The status is
rejectedand you receiveorder.status_changed. - The GO JOE team decides how to proceed, for example with a refund.
- The API refuses further status reports for the order (
409 order_rejected). - You can no longer download the prescription.
cancelled.
Cancelled orders
When GO JOE cancels an order, you receiveorder.cancelled and the status is
cancelled. Stop processing the order and do not dispense it.
Whether you can still download the prescription depends on when the order
was cancelled:
Keep your ERP in sync
An event tells you that an order changed. It does not contain the order. After each event, fetch the order withGET /orders/{id} and use the response as
the current state.
To find changes that you did not receive as an event, call
GET /orders?updated_since=<timestamp> about once an hour. Use the time of
your previous call minus a few minutes as the timestamp. The response contains
every order that changed since then.