Skip to main content

Requisition

Requisitions, also known as field requests, detail the request for materials from the job site.

Schema​

Requisition​

NameTypeDescriptionExample
idIDUnique requisition identifier"ckmnpybisiy5x08abky4g2d1f"
createdAtDateTimeWhen this Requisition was created"2021-03-24 17:26:46.983Z"
createdByIdID?ID of user who created Req"ckmnpybisiy5x08abky4g2d1f"
updatedAtDateTimeWhen this Requisition was last updated"2021-03-24 17:26:46.983Z"
updatedByIdID?ID of user who last updated Req"ckmnpybisiy5x08abky4g2d1f"
createdByIdIDID of the user who created the requisition"ckmnpybisiy5x08abky4g2d1f"
jobIdIDThe ID of the job this Requisition is associated withSee Jobs docs
identifierstringThe requisition’s identifier as shown in the app"REQ-12345"
statestringThe requisition’s current state. Could be: DRAFT, OPEN, CLOSEDDRAFT
orderingAgentIdIDPurchasing agent (User) id"ckmnpybisiy5x08abky4g2d1f"
notesstring?Notes added to the requisition"Need these items asap please"
deletedAtDateTime?When this Requisition was deleted"2021-03-24 17:26:46.983Z"
deletedByIdID?ID of user who deleted Req"ckmnpybisiy5x08abky4g2d1f"
deliveryLocationIdID?ID of Location"ckmnpybisiy5x08abky4g2d1f"
manuallyClosedAtDateTime?Timestamp of when Requisition was manually closed"2021-03-24 17:26:46.983Z"
needByDateCategoryRequisitionNeedByDateCategorySee enum belowASAP
needByDateDayDateTime?Day requisition was requested to be delivered"2023-06-23 07:00:00"
needByWindowStringTime window requisition was requested to be delivered"PM (1-5 PM)"
sentAtDateTime?Time requisition was sent"2023-06-23 15:01:24.248"
scheduledAtDateTime?Time requisition is scheduled for"2023-06-23 15:01:24.248"
titleString?Title given to requisition"Our very first requisition"
vendorContactIdString?If sent directly to the vendor, ID of the vendor contact"ckmnpybisiy5x08abky4g2d1f"

Enums​

RequisitionNeedByDateCategory​

NameDescription
ASAP
DATE
HOLD_FOR_RELEASE

RequisitionState​

NameDescription
ACKNOWLEDGED
CLOSED
DRAFT
OPEN
IN_REVIEW
PARTIALLY_FULFILLED

REST Endpoints​

GET /requisitions/:id​

Read a single requisition. You must specify the ID.

Parameters​

NameDescriptionExample
idThe ID of the requisition to fetch"ckmnpybisiy5x08abky4g2d1f"

Response​

A single Requisition object.

Example Request​

GET https://api.kojo.tech/requisitions/ckmnpybisiy5x08abky4g2d1f

Example Response​

{
"createdAt": "2023-12-13T16:43:13.458Z",
"deletedAt": null,
"deliveryLocationId": "cldccucy700l6lgkxyar65b9l",
"id": "clq4031kh000zlgop0tdv1owx",
"identifier": "REQ-0055",
"jobId": "cldccucy700l5lgkxkr80ro8p",
"needByDateCategory": "DATE",
"needByDateDay": "2023-12-16T08:00:00.000Z",
"needByWindow": "AM (7-10 AM)",
"notes": "Dan requested this",
"sentAt": "2023-12-13T16:43:13.458Z",
"manuallyClosedAt": null,
"state": "ACKNOWLEDGED",
"updatedAt": "2023-12-13T16:43:13.458Z",
"title": null
}

GET /requisitions​

Read all requisitions, with pagination.

Parameters​

Accepts all standard pagination parameters.

Supported orderBy fields: createdAt, id, needByDateDay, identifier, updatedAt

Allowed filter fields: createdAt, id, needByDateDay, identifier, state, title, updatedAt.

Response​

A list of Requisition objects.

Example Request​

GET https://api.kojo.tech/requisitions

Example Response​

[
{
"createdAt": "2023-12-13T16:43:14.376Z",
"deletedAt": null,
"deliveryLocationId": "cldccucy400kxlgkxq2v5u8ha",
"id": "clq4032a00010lgop77wvdiz9",
"identifier": "REQ-0001",
"jobId": "cldccucy400kwlgkxnd1cfo0y",
"needByDateCategory": "DATE",
"needByDateDay": "2023-12-16T08:00:00.000Z",
"needByWindow": "AM (7-10 AM)",
"notes": null,
"sentAt": "2023-12-13T16:44:53.654Z",
"manuallyClosedAt": null,
"state": "DRAFT",
"updatedAt": "2024-01-05T22:01:25.180Z",
"title": null
},
{
"createdAt": "2023-12-14T03:24:08.284Z",
"deletedAt": null,
"deliveryLocationId": "cldccucy500l0lgkx39j8q7k9",
"id": "clq4mz9i40000lgypd3kjm332",
"identifier": "REQ-A002",
"jobId": "cldccucy500kzlgkx45fmbpjv",
"needByDateCategory": "DATE",
"needByDateDay": "2023-12-16T08:00:00.000Z",
"needByWindow": "AM (7-10 AM)",
"notes": null,
"sentAt": "2023-12-14T15:32:10.640Z",
"manuallyClosedAt": "2023-12-14T15:32:49.045Z",
"state": "CLOSED",
"updatedAt": "2023-12-14T15:32:49.045Z",
"title": null
}
]

Example Request With Filtering and Sorting​

GET https://api.kojo.tech/requisitions?filter.identifier_starts_with=REQ-005&orderBy=createdAt&direction=DESC

Example Response​

[
{
"createdAt": "2023-12-14T16:43:14.376Z",
"deletedAt": null,
"deliveryLocationId": "cldccucy400kxlgkxq2v5u8ha",
"id": "clq4032a00010lgop77wvdiz9",
"identifier": "REQ-0050",
"jobId": "cldccucy400kwlgkxnd1cfo0y",
"needByDateCategory": "DATE",
"needByDateDay": "2023-12-16T08:00:00.000Z",
"needByWindow": "AM (7-10 AM)",
"notes": null,
"sentAt": "2023-12-13T16:44:53.654Z",
"manuallyClosedAt": null,
"state": "DRAFT",
"updatedAt": "2024-01-05T22:01:25.180Z",
"title": null
},
{
"createdAt": "2023-12-13T03:24:08.284Z",
"deletedAt": null,
"deliveryLocationId": "cldccucy500l0lgkx39j8q7k9",
"id": "clq4mz9i40000lgypd3kjm332",
"identifier": "REQ-0051",
"jobId": "cldccucy500kzlgkx45fmbpjv",
"needByDateCategory": "DATE",
"needByDateDay": "2023-12-16T08:00:00.000Z",
"needByWindow": "AM (7-10 AM)",
"notes": null,
"sentAt": "2023-12-14T15:32:10.640Z",
"manuallyClosedAt": "2023-12-14T15:32:49.045Z",
"state": "CLOSED",
"updatedAt": "2023-12-14T15:32:49.045Z",
"title": null
}
]

GET /requisitions/:id/items​

Read the items associated with a requisition.

Parameters​

Accepts all standard pagination parameters.

Allowed orderBy fields: createdAt, id, lineNumber, updatedAt.

Default (direction, orderBy): (lineNumber, ASC)

Allowed filter fields: createdAt, description, id, notes, updatedAt, state.

Response​

A list of RequisitionItem objects.

Example Request​

GET https://api.kojo.tech/requisitions/ckrastrq1vlmg0808d9ovytx8/items

Example Response​

[
{
"id": "clyonfn7c021tgoixcspnasoc",
"createdAt": "2024-07-16T16:49:54.744Z",
"updatedAt": "2024-07-16T16:49:54.744Z",
"allowSubstitution": null,
"createdById": "clyonfmw50197goixcbtfegei",
"lineItemId": null,
"purchaseOrderId": null,
"requisitionId": "clyonfn7b021qgoixlaj8faoo",
"description": "Room, LCD, Relay, Buzzer, NO2",
"lineNumber": 1,
"manufacturerPartNumber": "NO2-R-RB-D",
"notes": null,
"quantity": 40,
"quantityDelivered": null,
"rejectionMessage": null,
"rejectionReason": null,
"state": "UNPROCESSED",
"unitsOfMeasure": "EA",
"universalProductCode": null,
"integrationData": {},
"catalogId": null,
"states": {
"AddedToPO": {
"quantity": 66
},
"Requested": {
"quantity": 99
},
"RejectedByPurchasing": {
"quantity": 83
},
"AddedToWarehouseRequest": {
"quantity": 48
},
"AcknowledgedByPurchasing": {
"quantity": 84
}
}
},
{
"id": "clyonfn7c021xgoixlasyrzxi",
"createdAt": "2024-07-16T16:49:54.744Z",
"updatedAt": "2024-07-16T16:49:54.744Z",
"allowSubstitution": null,
"createdById": "clyonfmw50197goixcbtfegei",
"lineItemId": null,
"purchaseOrderId": null,
"requisitionId": "clyonfn7b021qgoixlaj8faoo",
"description": "10K ohm outside air sensor with die cast enclosure for BACtalk systems",
"lineNumber": 2,
"manufacturerPartNumber": "TS-3200-DD-10-AA",
"notes": null,
"quantity": 40,
"quantityDelivered": null,
"rejectionMessage": null,
"rejectionReason": null,
"state": "UNPROCESSED",
"unitsOfMeasure": "EA",
"universalProductCode": null,
"integrationData": {},
"catalogId": null,
"states": {
"Requested": {
"quantity": 37
},
"AddedToWarehouseRequest": {
"quantity": 64
},
"AcknowledgedByPurchasing": {
"quantity": 90
}
}
}
]

Example Request With Filtering​

GET https://api.kojo.tech/requisitions/clyonfn7b021qgoixlaj8faoo/items?filter.description_starts_with=Room

Example Response​

[
{
"id": "clyonfn7c021xgoixlasyrzxi",
"createdAt": "2024-07-16T16:49:54.744Z",
"updatedAt": "2024-07-16T16:49:54.744Z",
"allowSubstitution": null,
"createdById": "clyonfmw50197goixcbtfegei",
"lineItemId": null,
"purchaseOrderId": null,
"requisitionId": "clyonfn7b021qgoixlaj8faoo",
"description": "10K ohm outside air sensor with die cast enclosure for BACtalk systems",
"lineNumber": 2,
"manufacturerPartNumber": "TS-3200-DD-10-AA",
"notes": null,
"quantity": 40,
"quantityDelivered": null,
"rejectionMessage": null,
"rejectionReason": null,
"state": "UNPROCESSED",
"unitsOfMeasure": "EA",
"universalProductCode": null,
"integrationData": {},
"catalogId": null,
"states": {
"Requested": {
"quantity": 37
},
"AddedToWarehouseRequest": {
"quantity": 64
},
"AcknowledgedByPurchasing": {
"quantity": 90
}
}
}
]

PATCH /requisitions/:id/updateRequisitionState​

Updates the state of a Requisition.

Parameters​

You must specify the ID. The state update is passed in as a query parameter.

NameTypeDescriptionExample
idIDThe ID of the requisition to update."ckmnpybisiy5x08abky4g2d1f"
stateRequisitionStateThe code of the requisition to update.CLOSED

Response​

The updated Requisition.

Example Request​

PATCH https://api.kojo.tech/requisitions/ckmnpybisiy5x08abky4g2d1f/updateRequisitionState?state=CLOSED

Example Response​

{
"createdAt": "2023-12-13T16:43:14.376Z",
"deletedAt": null,
"deliveryLocationId": "cldccucy400kxlgkxq2v5u8ha",
"id": "clq4032a00010lgop77wvdiz9",
"identifier": "REQ-A0001",
"jobId": "cldccucy400kwlgkxnd1cfo0y",
"needByDateCategory": "DATE",
"needByDateDay": "2023-12-16T08:00:00.000Z",
"needByWindow": "AM (7-10 AM)",
"notes": null,
"sentAt": "2023-12-13T16:44:53.654Z",
"manuallyClosedAt": "2024-01-12T17:21:33.987Z",
"state": "CLOSED",
"updatedAt": "2024-01-12T17:21:33.987Z",
"title": null
}