> ## Documentation Index
> Fetch the complete documentation index at: https://developers.gojoe.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get your ERP from zero to an accepted test order.

## 1. Get a test key

GO JOE sets up your **integration account** and sends you:

* a **test key** (`gj_test_…`) for the sandbox, later a live key (`gj_live_…`),
* your **webhook secret** (`whsec_…`),
* the sandbox base URL.

One account can serve several pharmacies (for example a pharmacy group). Each
pharmacy confirms that your account may act for it. Keys are shown once; store
them in your secret store, never in code.

## 2. Check the connection

```bash theme={null}
curl https://<base-url>/me -H "Authorization: Bearer gj_test_…"
```

You see your account and the pharmacies you can act for.

## 3. Receive a new order

When a paid, doctor-approved order is ready for one of your pharmacies, GO JOE
POSTs a webhook to your endpoint:

```json theme={null}
{ "id": "6c0b…", "type": "order.created", "created_at": "2026-11-10T09:12:03Z",
  "data": { "pharmacy_id": "…", "order_id": "…", "status": "new", "prescription_stage": "vorab" } }
```

[Verify the signature](https://developers.gojoe.de/guides/webhooks.md), answer `200` straight away, then fetch the order:

```bash theme={null}
curl https://<base-url>/orders/<order_id> -H "Authorization: Bearer gj_test_…"
```

and the prescription PDF (a redirect to a 60-second download link):

```bash theme={null}
curl -L -o rezept.pdf https://<base-url>/orders/<order_id>/prescription -H "Authorization: Bearer gj_test_…"
```

## 4. Accept it

```bash theme={null}
curl -X POST https://<base-url>/orders/<order_id>/accept \
  -H "Authorization: Bearer gj_test_…" -H "Content-Type: application/json" \
  -H "Idempotency-Key: accept-<order_id>" \
  -d '{"erp_reference": "AB-2026-004711"}'
```

Accept within 15 minutes while the pharmacy is open. Otherwise GO JOE also
sends the pharmacy the order by e-mail, so no patient waits on a technical
problem.

## 5. Report progress

```bash theme={null}
curl -X POST https://<base-url>/orders/<order_id>/status \
  -H "Authorization: Bearer gj_test_…" -H "Content-Type: application/json" \
  -d '{"status": "packed"}'
```

* **Express orders** (`fulfilment.courier = "gojoe"`): report `packed`. GO JOE
  books the courier and moves the order to `out_for_delivery` and `completed`
  itself. The courier needs `fulfilment.return_pin` if a package comes back.
* **Shipping orders** (`courier = "pharmacy"`): report `out_for_delivery` with
  `tracking`, then `completed`.
* **Pick-up orders**: report `ready_for_pickup`, then `completed` when the
  patient collected it.

## 6. The signed prescription

Orders arrive with the **Vorab-Rezept**. When the doctor's QES is done you get
`order.prescription_signed`: download the prescription again and file the
signed version in place of the Vorab-Rezept. Handing over on the Vorab-Rezept
is allowed. `GET /orders?prescription_stage=vorab` lists orders still waiting
for the signed version.

## 7. Never miss anything

Webhooks are a nudge. The record is the event feed: store the `next_cursor`
from `GET /events` and poll it every few minutes (and after any downtime):

```bash theme={null}
curl "https://<base-url>/events?cursor=<cursor>" -H "Authorization: Bearer gj_test_…"
```

De-duplicate on the event `id` (equal to the `webhook-id` header) and on the
order `id`; accepting with the same `erp_reference` twice is harmless.

## 8. Stock and prices

Push your stock and prices with `PUT /pharmacies/{pharmacy_id}/inventory`
(see [Stock and prices](https://developers.gojoe.de/guides/inventory.md)). GO JOE maps your article numbers to
its products once; after that the shop sells with your numbers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.