---
title: "Errors | Docs | ERP by R&D Copilot"
description: "The error object of the ERP API and the codes that say what went wrong."
canonical: "https://erp.rdcopilot.com/docs/reference/errors/"
language: en
updated: 2026-11-22
---

# Errors

The error object of the ERP API and the codes that say what went wrong.

An error is an HTTP status and a JSON object whose `code` never changes its meaning.

## The error object

| Field | Meaning |
| --- | --- |
| `code` | A stable code for the cause. Act on this. |
| `message` | A sentence to read in your logs. It can change, so do not show it to the people who use your software and do not match on it. |
| `fields` | On a 400, each field that is wrong and why. Absent otherwise. |
| `requestId` | The identifier of this request. Quote it when you ask us for help. |

Every answer, an error or not, carries the header `X-RDC-Request-Id` with the same value as `requestId`.

## Codes every product shares

| Status | Code | Meaning | Retry |
| --- | --- | --- | --- |
| `400` | `invalid_request` | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. `fields` names each one. | No. Fix the request. |
| `401` | `unauthorized` | The token is missing, expired or not ours. | After you get a new token. |
| `403` | `forbidden` | The token does not give access to this company or operation. | No. |
| `404` | `<thing>_not_found` | The record does not exist for this company. | No. |
| `409` | `revision_conflict` | `expectedRevision` is older than the record. | Read the record again, then send a new operation. |
| `409` | `operation_reused` | This `operationId` was sent before with another body. | No. |
| `422` | A code of the product, such as `blocked_by_checks` | The request is well formed and a rule of the product refuses it. | No. The code says what to change. |
| `429` | `rate_limited` | Too many requests. `Retry-After` gives the seconds. | Yes, after the pause. |
| `503` | `unavailable` | The service cannot answer now. | Yes, with the same `operationId`. |

## Codes of ERP

| Status | Code | Meaning |
| --- | --- | --- |
| `404` | `item_not_found` | The item does not exist. |
| `404` | `partner_not_found` | The customer or supplier does not exist, or is not one of the kind the request needs. |
| `404` | `sales_order_not_found` | The sales order does not exist. |
| `404` | `delivery_not_found` | The delivery does not exist. |
| `404` | `invoice_not_found` | The invoice does not exist. |
| `404` | `purchase_order_not_found` | The purchase order does not exist. |
| `404` | `receipt_not_found` | The receipt does not exist. |
| `404` | `supplier_bill_not_found` | The supplier bill does not exist. |
| `404` | `work_order_not_found` | The work order does not exist. |
| `404` | `warehouse_not_found` | The warehouse does not exist. |
| `404` | `event_delivery_not_found` | The event delivery does not exist. |
| `404` | `subscription_not_found` | The subscription does not exist. |
| `404` | `operation_not_found` | No change was sent with this `operationId`. |
| `409` | `item_code_taken` | An item with this code already exists. |
| `409` | `nothing_parked` | The event delivery is not parked, so there is nothing to replay. |
| `409` | `wrong_status` | The record is not in a status that allows this change. |
| `409` | `credit_limit_exceeded` | The customer's unpaid invoices plus this order are over the credit limit. The order stays a draft. |
| `409` | `nothing_to_reserve` | No unit that the order still wants is free in stock. |
| `409` | `over_receipt` | A quantity is more than the purchase order still waits for. |
| `409` | `amount_exceeds_balance` | The payment is more than the balance of the invoice. |
| `409` | `duplicate_bill` | This supplier already has a bill with this number. |
| `409` | `receipt_missing` | None of the billed items has been received on the purchase order, so the bill cannot be sent for approval. |
| `409` | `match_differs` | The bill does not match its order and receipts: a quantity or a price differs. |
| `409` | `wrong_approval_step` | The step is not the next one of the approval chain. |
| `409` | `bill_held` | The bill is on hold and cannot be approved. |
| `409` | `bill_already_held` | The bill is already on hold. |
| `409` | `bill_not_held` | The bill is not on hold. |
| `409` | `payment_not_due` | The payment day of the scheduled bill has not come. |
| `409` | `component_short` | A component is not free in the quantity the work order needs. |
| `422` | `invalid_quantity` | A quantity is not a whole number from 1 to 1000000. |
| `422` | `invalid_price` | A price is not a positive amount. |
| `422` | `invalid_amount` | The amount is not a positive amount. |
| `422` | `invalid_date` | A date is not a day of the calendar, or a bill is dated after today. |
| `422` | `date_in_the_past` | The payment day is before today. |
| `422` | `no_lines` | The document has no line. |
| `422` | `duplicate_item` | An item appears on more than one line. |
| `422` | `not_purchasable` | The item is made in-house and cannot be put on a purchase order. |
| `422` | `not_made` | The item has no bill of materials, so it cannot be made. |
| `422` | `item_not_on_order` | The item is not on the purchase order. |
| `422` | `supplier_mismatch` | The supplier of the bill is not the supplier of the purchase order. |
| `422` | `number_required` | The number on the supplier's document is empty or longer than 40 characters. |
| `422` | `reason_required` | The reason is empty or longer than 200 characters. |
| `422` | `over_plan` | The produced quantity is more than the work order plans. |

The full rule: [Developer guide](https://rdcopilot.com/docs/errors/)
