Reason Codes
GET /inventory/reason-codes
Group: Inventory › Reason Codes · Operation ID: reasonCodes
Returns a list of reason codes. To filter by document type, use POST inventory/reason-codes/search.
This collection returns the same fields as GET inventory/reason-codes/:id and POST inventory/reason-codes/search, except documentTypes, which it does not return and cannot filter by. Read document types, or filter by one, with GET inventory/reason-codes/:id or POST inventory/reason-codes/search.
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
Query surface
id— filter by eq, ne, gt, gte, lt, lte, in, notIn, between, likecode— filter by eq, ne, gt, gte, lt, lte, in, notIn, between, likeisActive— filter by eq, ne, gt, gte, lt, lte, in, notIn, between, likerequiresApproval— filter by eq, ne, gt, gte, lt, lte, in, notIn, between, likelastModifiedDate— filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like- Orderable: id, code, description, isActive, requiresApproval, lastModifiedDate
- Selectable: id, code, description, isActive, requiresApproval, lastModifiedDate
Response
200 Success
Under data, an array of reasonCodesRow:
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | no | The unique identifier for the reason code. |
code |
string | no | The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant. |
description |
string or null | no | A free-form description of what the reason code means. Absent when none was given. |
isActive |
boolean or null | no | Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it. |
requiresApproval |
boolean or null | no | Whether documents using this reason code require approval before they take effect. |
lastModifiedDate |
string (date-time) or null | no | The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it. |
Statuses
400— Invalid request or business failure401— Missing or invalid access token403— Not authorized404— Not found429— Too many requests500— Internal server error