Skip to main content

Requisition Items

RequisitionItems, are the individual requested items from on a Requisition.

Schema​

RequisitionItem​

NameTypeDescriptionExample
idStringUnique RequisitionItem identifier"ckrastrq1vlmg0808d9ovytx8"
createdAtDateTimeWhen this RequisitionItem was created"2021-03-24 17:26:46.983Z"
updatedAtDateTimeWhen this RequisitionItem was updated"2021-03-24 17:26:46.983Z"
allowSubstitutionBoolean?Whether this item was set to allow a generic substitution, or required the precise itemtrue
createdByIdString?ID of the user who created the requisitionItem"ckrastrq1vlmg0808d9ovytx8"
descriptionString?Item description"[Conduit Body] 2", PVC, LB, No Cover/Gasket"
lineItemIdID?Foreign key to the Item"ckrastrq1vlmg0808d9ovytx8"
lineNumberInt?Line number in the greater requisition1
manufacturerPartNumberString?MPN number of requisition item"BR115"
catalogIdIDResolved field of the catalogId"ckrastrq1vlmg0808d9ovytx8"
notesString?Any manually added item notes"Any color is okay"
purchaseOrderIdID?ID of the associated Order"ckrastrq1vlmg0808d9ovytx8"
quantityInt?Quantity requested100
rejectionMessageString?Manually inputted message for rejection"This isn’t the right item"
rejectionReasonString?High level rejection reason"Unapproved Materials"
requisitionIdIDParent requisition id"ckrastrq1vlmg0808d9ovytx8"
stateRequisitionItemStateSee enum below - the current state of this requistiion itemACKNOWLEDGED
unitsOfMeasureString?Units of measure (UOM) of the requisition item"EA"
universalProductCodeString?UPC number of requisition item"786676362054"

Enums​

RequisitionItemState​

NameDescription
ACKNOWLEDGEDRequisitionItem has been 'acknowledged' by the purchasing team
REJECTEDRequisitionItem is rejected, and must be re-submitted
UNPROCESSEDRequisitionItem hasn't been processed by purchasing yet

REST Endpoints​

GET /requisitionItem/:requisitionItemId​

Reads a single requisition item by ID.

Parameters​

NameTypeDescriptionExample
requisitionItemIdIDThe 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​

NameTypeDescriptionExample
requisitionItemIdIDThe 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​

NameTypeDescriptionExample
requisitionItemIdIDThe requisitionItem ID."clk8ms0mp000ksswy5ibhekos"
orderItemIdIDThe 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​

NameTypeDescriptionExample
requisitionItemIdIDThe requisitionItem ID."ckmnpybisiy5x08abky4g2d1f"
reasonStringThe 'high level' reason for the rejection."Unapproved Materials"
messageString?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,
}