Skip to content

Reference not found

HTTP 422reference_not_found

When the API answers 422 reference_not_found, and how to fix it.

Version v1.1, updated

The type field of every reference_not_found response links to this page.

On this page

A reference in the body names no record of the company. errors[].field tells you which one, such as customer or lines[0].product.

At a glance

  • Status: 422 Unprocessable Content

  • Code: reference_not_found

  • Retry: No. Fix the cause first: the same request gets the same answer.

Causes and fixes

Likely cause

How to fix it

The record does not exist in BIRP yet.

Create it first. An order can create its customer on the fly with customer_upsert.

The source or external_id differs from the one used when the record was linked.

Send the same source value every time, letter for letter.

A reference by sku has a typo.

Check the SKU, or reference the product by id.

Example

422 reference_not_foundJSON
{
  "code": "reference_not_found",
  "detail": "A reference in the request matches no record of the company.",
  "errors": [
    {
      "field": "customer",
      "message": "matches no record of the company"
    }
  ],
  "instance": "/v1/invoices",
  "request_id": "a1b2c3d4-0000-4000-8000-0000000000ee",
  "status": 422,
  "title": "Reference not found",
  "type": "https://birp.io/developers/errors/reference_not_found"
}
  • references-and-external-ids
  • receive-orders
  • not-found