> ## 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.

# Errors

> All error codes, their meaning and how to handle them.

The API reports errors as `application/problem+json`
([RFC 9457](https://www.rfc-editor.org/rfc/rfc9457)):

```json theme={null}
{ "type": "https://developers.gojoe.de/guides/errors#not_accepted", "title": "Conflict", "status": 409,
  "code": "not_accepted", "detail": "Accept the order (POST /orders/{id}/accept) before reporting a status.",
  "request_id": "0b9f6c1e-…" }
```

| Field | Use |
| - | - |
| `code` | The error code. Use it in your error handling. Codes do not change. |
| `detail` | A description for developers. The wording can change. |
| `request_id` | Identifies the request. Include it when you contact GO JOE. The `x-request-id` response header has the same value. |
| `type` | A link to the code on this page. |

When to retry:

| Status | Retry |
| - | - |
| `429` | Yes, after the number of seconds in the `Retry-After` header. |
| `5xx` | Yes, with increasing waiting times. |
| `409 idempotency_in_progress` | Yes, after `Retry-After` seconds. |
| Other `4xx` | No. Correct the request first. |

## 400 Bad Request

### invalid\_json

The body is not a JSON object.

### invalid\_parameter

A query parameter has an invalid format, for example `updated_since` without a time zone. The `parameter` field contains its name.

### invalid\_cursor

The `cursor` value was not issued by this API. Repeat the request without `cursor`.

### invalid\_limit

`limit` is outside the range that this endpoint allows.

### invalid\_status

The `status` query parameter of `GET /orders` is not an order status. `POST /orders/{id}/status` returns the same code with status `422` if `status` in the body is not a status that your ERP can report.

### invalid\_prescription\_stage

`prescription_stage` must be `vorab` or `signed`. The sandbox returns this code with status `422` for the request body of `POST /sandbox/orders`.

### invalid\_mode

`mode` must be `partial` or `full`.

### pharmacy\_id\_required

`GET /inventory` requires the `pharmacy_id` query parameter.

### invalid\_idempotency\_key

`Idempotency-Key` is longer than 255 characters.

## 401 Unauthorized

### unauthorized

The key is missing, malformed, unknown or revoked, or the account is locked. Send the key as `Authorization: Bearer gj_…`.

### wrong\_environment

A test key (`gj_test_…`) was used in production, or a live key (`gj_live_…`) in the sandbox.

## 403 Forbidden

### insufficient\_scope

The key is valid but does not have the scope this endpoint requires. Ask GO JOE to add the scope.

## 404 Not Found

The API returns the same response for an ID that does not exist and for an ID that belongs to another account.

### order\_not\_found

This key cannot access an order with this ID. The API also returns this code after the pharmacy has been removed from your account.

### pharmacy\_not\_found

This key cannot access a pharmacy with this ID, or it does not have the required scope for the pharmacy.

### prescription\_not\_found

The order does not have a prescription document yet.

### not\_found

The endpoint does not exist in this environment. The simulator endpoints (`/sandbox/…`) exist in the sandbox only. The sandbox host serves only paths under `/api/pharm/v1`.

## 409 Conflict

The request is valid, but the current state does not allow it. Fetch the order to see its current status.

### not\_accepted

The order is not accepted yet. Call `POST /orders/{id}/accept` before you report a status.

### already\_accepted

The order was already accepted with a different `erp_reference`. A repeated request with the same `erp_reference` succeeds.

### invalid\_transition

The order cannot change from its current status to the reported status, or it can no longer be rejected. `detail` contains both statuses.

### courier\_managed\_by\_gojoe

GO JOE's courier delivers this order. Report `packed` only. GO JOE sets `out_for_delivery` and `completed`.

### order\_cancelled

The order is cancelled. Do not dispense it.

### order\_rejected

You have rejected this order. The API accepts no further status reports for it, and you can no longer download its prescription.

### transition\_refused

GO JOE could not apply the status. `detail` contains the reason.

### idempotency\_in\_progress

Another request with the same `Idempotency-Key` is still being processed. Retry after `Retry-After` seconds to receive its result.

### full\_push\_too\_small

The `mode=full` push would mark most articles on sale as sold out, because they are missing from the push. Send the complete catalogue, use `mode=partial`, or confirm the push with `allow_mass_switch_off=true`.

### already\_signed

Sandbox: the prescription is already signed.

### not\_gojoe\_courier

Sandbox: courier actions apply to express orders only.

### not\_applicable

Sandbox: the action does not apply to this order, for example an address change on a pick-up order.

### no\_products

Sandbox: the pharmacy has no product for a test order. Push your inventory first.

## 413 Content Too Large

### payload\_too\_large

The request body is larger than 1 MB. Split the push into several requests.

## 422 Unprocessable Content

The body is valid JSON, but a value is not allowed. GO JOE applied nothing.

### invalid\_erp\_reference

`erp_reference` must be 1 to 128 characters.

### invalid\_tracking

`tracking` is not an object, or `tracking.url` is not an `https` link to a supported carrier. For other carriers, send only `tracking.number`.

### invalid\_reason\_code

`reason_code` is not one of the documented values.

### invalid\_items

One or more inventory items are invalid. `errors` lists each problem with the item's position, SKU and field.

### too\_many\_items

The push contains more than 1,000 items.

### catalogue\_limit

The push would exceed the limit of 10,000 SKUs per pharmacy.

### idempotency\_key\_reused

This `Idempotency-Key` was already used for a different request. Use a new key for each new request.

### invalid\_pharmacy

Sandbox: `pharmacy_id` is not one of your pharmacies.

### invalid\_fulfilment

Sandbox: `fulfilment` must be `express`, `shipping` or `pickup`.

### invalid\_action

Sandbox: `action` is not a supported value.

### sku\_not\_mapped

Sandbox: GO JOE has not mapped this `pharmacy_sku` to a product yet.

## 429 Too Many Requests

### rate\_limited

Your account sent more requests than its limit allows. The default limit is 120 requests per minute. Wait for the number of seconds in `Retry-After`. Successful responses contain the headers `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`.

### sandbox\_order\_limit

Sandbox: you have created 200 test orders for this pharmacy in the last 24 hours. Use existing orders or wait.

## 500 Internal Server Error

### internal\_error

An error occurred at GO JOE. Retry with increasing waiting times. If the error persists, send the `request_id` to GO JOE.


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