Skip to main content
POST
Create a defective report

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Headers

Idempotency-Key
string

Optional idempotency token. A retry with the same key replays the original response instead of creating a second report. Reusing the key with a different body returns 409.

Body

application/json
purchase_order_id
integer
required

Purchase order the SKU was received on. Must be active (not deleted) and have a receiving-report line for the SKU.

Required range: x >= 1
sku
string
required

SKU of the defective units

quantity
number
required

Defective quantity, in defective_uom_id

Required range: x > 0
defect_type
enum<integer>
required

10 Manufacture, 20 Production, 90 Other

Available options:
10,
20,
90
reported_date
string<date> | null

YYYY-MM-DD; defaults to today

reported_by
string | null
Maximum string length: 255
defective_uom_id
integer | null

A unit of measure of the SKU (or of its parent, for a variant without its own). Defaults to the base unit.

warehouse_id
integer | null

Warehouse (top-level location) to deduct from. Defaults to the warehouse the units were received into.

location_id
integer | null

Location (bin) of that warehouse to deduct from. Defaults as described above.

lot_id
integer | null

A lot of the SKU

remarks
string | null
is_affecting_inventory
boolean | null
default:true

Set false to record the report without deducting on hand

Response

Defective report created

A defective report from Inventory > Defectives.

id
integer
reported_date
string<date> | null
Example:

"2026-11-03"

reported_by
string | null
reported_at
string | null
defect_type
enum<integer>

10 Manufacture, 20 Production, 90 Other

Available options:
10,
20,
90
total_quantity
string

Sum of the line quantities, as a decimal string

total_cost
number
total_tax
number
status
integer

Always 1 (active); deleted reports are not returned

created_by
integer
updated_by
integer
created_at
string | null
updated_at
string | null
defective_report_rfq
object[]

The report's defective lines