Requisition
Requisitions, also known as field requests, detail the request for materials from the job site.
Schemaβ
Requisition
β
Name | Type | Description | Example |
---|---|---|---|
id | ID | Unique requisition identifier | "ckmnpybisiy5x08abky4g2d1f" |
createdAt | DateTime | When this Requisition was created | "2021-03-24 17:26:46.983Z" |
createdById | ID? | ID of user who created Req | "ckmnpybisiy5x08abky4g2d1f" |
updatedAt | DateTime | When this Requisition was last updated | "2021-03-24 17:26:46.983Z" |
updatedById | ID? | ID of user who last updated Req | "ckmnpybisiy5x08abky4g2d1f" |
createdById | ID | ID of the user who created the requisition | "ckmnpybisiy5x08abky4g2d1f" |
jobId | ID | The ID of the job this Requisition is associated with | See Jobs docs |
identifier | string | The requisitionβs identifier as shown in the app | "REQ-12345" |
state | string | The requisitionβs current state. Could be: DRAFT, OPEN, CLOSED | DRAFT |
orderingAgentId | ID | Purchasing agent (User) id | "ckmnpybisiy5x08abky4g2d1f" |
notes | string? | Notes added to the requisition | "Need these items asap please" |
deletedAt | DateTime? | When this Requisition was deleted | "2021-03-24 17:26:46.983Z" |
deletedById | ID? | ID of user who deleted Req | "ckmnpybisiy5x08abky4g2d1f" |
deliveryLocationId | ID? | ID of Location | "ckmnpybisiy5x08abky4g2d1f" |
manuallyClosedAt | DateTime? | Timestamp of when Requisition was manually closed | "2021-03-24 17:26:46.983Z" |
needByDateCategory | RequisitionNeedByDateCategory | See enum below | ASAP |
needByDateDay | DateTime? | Day requisition was requested to be delivered | "2023-06-23 07:00:00" |
needByWindow | String | Time window requisition was requested to be delivered | "PM (1-5 PM)" |
sentAt | DateTime? | Time requisition was sent | "2023-06-23 15:01:24.248" |
scheduledAt | DateTime? | Time requisition is scheduled for | "2023-06-23 15:01:24.248" |
title | String? | Title given to requisition | "Our very first requisition" |
vendorContactId | String? | If sent directly to the vendor, ID of the vendor contact | "ckmnpybisiy5x08abky4g2d1f" |
Enumsβ
RequisitionNeedByDateCategory
β
Name | Description |
---|---|
ASAP | |
DATE | |
HOLD_FOR_RELEASE |
RequisitionState
β
Name | Description |
---|---|
ACKNOWLEDGED | |
CLOSED | |
DRAFT | |
OPEN | |
IN_REVIEW | |
PARTIALLY_FULFILLED |
REST Endpointsβ
GET /requisitions/:id
β
Read a single requisition. You must specify the ID.
Parametersβ
Name | Description | Example |
---|---|---|
id | The 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.
Name | Type | Description | Example |
---|---|---|---|
id | ID | The ID of the requisition to update. | "ckmnpybisiy5x08abky4g2d1f" |
state | RequisitionState | The 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
}