Requisition Items
RequisitionItems, are the individual requested items from on a Requisition
.
Schemaβ
RequisitionItem
β
Name | Type | Description | Example |
---|---|---|---|
id | String | Unique RequisitionItem identifier | "ckrastrq1vlmg0808d9ovytx8" |
createdAt | DateTime | When this RequisitionItem was created | "2021-03-24 17:26:46.983Z" |
updatedAt | DateTime | When this RequisitionItem was updated | "2021-03-24 17:26:46.983Z" |
allowSubstitution | Boolean? | Whether this item was set to allow a generic substitution, or required the precise item | true |
createdById | String? | ID of the user who created the requisitionItem | "ckrastrq1vlmg0808d9ovytx8" |
description | String? | Item description | "[Conduit Body] 2", PVC, LB, No Cover/Gasket" |
lineItemId | ID? | Foreign key to the Item | "ckrastrq1vlmg0808d9ovytx8" |
lineNumber | Int? | Line number in the greater requisition | 1 |
manufacturerPartNumber | String? | MPN number of requisition item | "BR115" |
catalogId | ID | Resolved field of the catalogId | "ckrastrq1vlmg0808d9ovytx8" |
notes | String? | Any manually added item notes | "Any color is okay" |
purchaseOrderId | ID? | ID of the associated Order | "ckrastrq1vlmg0808d9ovytx8" |
quantity | Int? | Quantity requested | 100 |
rejectionMessage | String? | Manually inputted message for rejection | "This isnβt the right item" |
rejectionReason | String? | High level rejection reason | "Unapproved Materials" |
requisitionId | ID | Parent requisition id | "ckrastrq1vlmg0808d9ovytx8" |
state | RequisitionItemState | See enum below - the current state of this requistiion item | ACKNOWLEDGED |
unitsOfMeasure | String? | Units of measure (UOM) of the requisition item | "EA" |
universalProductCode | String? | UPC number of requisition item | "786676362054" |
Enumsβ
RequisitionItemState
β
Name | Description |
---|---|
ACKNOWLEDGED | RequisitionItem has been 'acknowledged' by the purchasing team |
REJECTED | RequisitionItem is rejected, and must be re-submitted |
UNPROCESSED | RequisitionItem hasn't been processed by purchasing yet |
REST Endpointsβ
GET /requisitionItem/:requisitionItemId
β
Reads a single requisition item by ID.
Parametersβ
Name | Type | Description | Example |
---|---|---|---|
requisitionItemId | ID | The requisitionItem ID. | "ckmnpybisiy5x08abky4g2d1f" |
Example Requestβ
GET https://api.kojo.tech/requisitionItem/clk8ms0mp000ksswy5ibhekos
Example Responseβ
{
"id": "clk8ms0mp000ksswy5ibhekos",
"createdAt": "2023-07-18T18:31:20.888Z",
"updatedAt": "2023-07-18T19:21:36.558Z",
"allowSubstitution": true,
"createdById": "clkk0qy680002wewy7rsudkt6",
"lineItemId": null,
"purchaseOrderId": null,
"requisitionId": "clkk0q9qp0001wewyamh89eyz",
"description": "EMT",
"lineNumber": 6,
"manufacturerPartNumber": null,
"notes": null,
"quantity": 4,
"quantityDelivered": null,
"rejectionMessage": "null",
"rejectionReason": "null",
"state": "ACKNOWLEDGED",
"unitsOfMeasure": "E",
"universalProductCode": null,
"integrationData": {},
"catalogId": null,
}
POST /requisitionItem/:requisitionItemId/acknowledge
β
Notifies field users that said requisitionItem has been acknowledged. Puts requisitionItem into a 'ACKNOWLEDGED' state.
Parametersβ
Name | Type | Description | Example |
---|---|---|---|
requisitionItemId | ID | The requisitionItem ID. | "ckmnpybisiy5x08abky4g2d1f" |
Example Requestβ
POST https://api.kojo.tech/requisitionItem/clk8ms0mp000ksswy5ibhekos/acknowledge
{}
Example Responseβ
{
"id": "clk8ms0mp000ksswy5ibhekos",
"createdAt": "2023-07-18T18:31:20.888Z",
"updatedAt": "2023-07-18T19:21:36.558Z",
"allowSubstitution": true,
"createdById": "clkk0qy680002wewy7rsudkt6",
"lineItemId": null,
"purchaseOrderId": null,
"requisitionId": "clkk0q9qp0001wewyamh89eyz",
"description": "EMT",
"lineNumber": 6,
"manufacturerPartNumber": null,
"notes": null,
"quantity": 4,
"quantityDelivered": null,
"rejectionMessage": "null",
"rejectionReason": "null",
"state": "ACKNOWLEDGED",
"unitsOfMeasure": "E",
"universalProductCode": null,
"integrationData": {},
"catalogId": null,
}
POST /requisitionItem/:requisitionItemId/item/:orderItemId
β
Link a requisition item to an item that has been ordered. This will maintain data integrity and keep field users aware of the status of their requisition. Additionally, this method:
- updates the parent Requisition state if relevant (ex: all items are ordered, so requisition goes into 'Processed' state)
- links any BOM Items from the requisition item to the order item
Parametersβ
Name | Type | Description | Example |
---|---|---|---|
requisitionItemId | ID | The requisitionItem ID. | "clk8ms0mp000ksswy5ibhekos" |
orderItemId | ID | The order's Item ID. | "clkk0egnw0000wewy1ipmezt4" |
Example Requestβ
POST https://api.kojo.tech/requisitionItem/clk8ms0mp000ksswy5ibhekos/item/clkk0egnw0000wewy1ipmezt4
{}
Example Responseβ
{
"id": "clk8ms0mp000ksswy5ibhekos",
"createdAt": "2023-07-18T18:31:20.888Z",
"updatedAt": "2023-07-18T19:21:36.558Z",
"allowSubstitution": true,
"createdById": "clkk0qy680002wewy7rsudkt6",
"lineItemId": "clkk0egnw0000wewy1ipmezt4",
"purchaseOrderId": "clkiji6xl0004wyxrngfqgqb6",
"requisitionId": "clkk0q9qp0001wewyamh89eyz",
"description": "EMT",
"lineNumber": 6,
"manufacturerPartNumber": null,
"notes": null,
"quantity": 4,
"quantityDelivered": null,
"rejectionMessage": null,
"rejectionReason": null,
"state": "ORDERED",
"unitsOfMeasure": "E",
"universalProductCode": null,
"integrationData": {},
"catalogId": null,
}
POST /requisitionItem/:requisitionItemId/reject
β
Notifies field users of rejected requisitionItem. Puts requisitionItem into a 'REJECTED' state.
In our web application, the purchase agent selects from a dropdown with these 'reasons':
Reasonsβ
Name |
---|
Missing Information |
Warehouse Request |
Unapproved Materials |
Incorrect Formatting |
Other |
Parametersβ
Name | Type | Description | Example |
---|---|---|---|
requisitionItemId | ID | The requisitionItem ID. | "ckmnpybisiy5x08abky4g2d1f" |
reason | String | The 'high level' reason for the rejection. | "Unapproved Materials" |
message | String? | Details of the rejection. | "Please select EMT requests from the BOM" |
Example Requestβ
POST https://api.kojo.tech/requisitionItem/clk8ms0mp000ksswy5ibhekos/reject
{
"reason": "Unapproved Materials",
"message": "Please select EMT requests from the BOM"
}
Example Responseβ
{
"id": "clk8ms0mp000ksswy5ibhekos",
"createdAt": "2023-07-18T18:31:20.888Z",
"updatedAt": "2023-07-18T19:21:36.558Z",
"allowSubstitution": true,
"createdById": "clkk0qy680002wewy7rsudkt6",
"lineItemId": null,
"purchaseOrderId": null,
"requisitionId": "clkk0q9qp0001wewyamh89eyz",
"description": "EMT",
"lineNumber": 6,
"manufacturerPartNumber": null,
"notes": null,
"quantity": 4,
"quantityDelivered": null,
"rejectionMessage": "Please select EMT requests from the BOM",
"rejectionReason": "Unapproved Materials",
"state": "REJECTED",
"unitsOfMeasure": "E",
"universalProductCode": null,
"integrationData": {},
"catalogId": null,
}