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" |
| updatedAt | DateTime | When this Requisition was last updated | "2021-03-24 17:26:46.983Z" |
| 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 the 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 | "Important req" |
| 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 |
Queriesβ
requisitionβ
Reads a single requisition by ID. Note that requisitions can only be uniquely identified by this ID.
Parametersβ
| Name | Description | Example |
|---|---|---|
| id | The ID of the requisition to fetch | "ckmnpybisiy5x08abky4g2d1f" |
Responseβ
A single Requisition.
Example Queryβ
query {
requisition(id: "ckmnpybisiy5x08abky4g2d1f") {
id
identifier
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"identifier": "REQ-0001",
}
requisitionsβ
Read all requisitions, with pagination.
Parametersβ
Accepts all standard pagination parameters.
Allowed orderBy fields: createdAt, id, needByDateDay, identifier, updatedAt.
Allowed filter fields: createdAt, id, needByDateDay, identifier, state, title, updatedAt.
Responseβ
A list of Requisition objects.
Example Queryβ
query {
requisitions(
orderBy: identifier,
direction: ASC,
filter: {
createdAt_lt: "2024-01-01T15:10:10"
}
) {
id
identifier
createdAt
}
}
Example Responseβ
[
{
"id": "ckmnpybisiy5x08aasdf13242",
"identifier": "REQ_0001",
"createdAt": "2023-01-26T16:18:35.931Z"
},
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"identifier": "REQ_0002",
"createdAt": "2023-01-26T16:49:04.773Z"
}
]
Mutationsβ
createRequisitionβ
Create a Requisition
Parametersβ
| Name | Type | Description |
|---|---|---|
| requisitionInput | Requisition | Input fields for this requisition |
| requisitionItemInputs | RequisitionItem | Items for this requisition |
Example Queryβ
mutation {
createRequisition(
requisitionInput: { "jobId": "ckmnpybisiy5x08abky4g2d1f" },
requisitionItemInputs: [{ "description": "emt" }],
) {
id
requisitionItems {
description
}
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"requisitionItems": [
{
"description": "emt"
}
]
}
updateRequisitionStateβ
Update an requisitions's state.
Parametersβ
| Name | Type | Description | Example |
|---|---|---|---|
| id | ID | Unique identifier for requisitions | "ckmnpybisiy5x08abky4g2d1f" |
| state | RequisitionState | The state of the requisition | DRAFT |
Example Queryβ
mutation {
updateRequisitionState(
id: "ckmnpybisiy5x08abky4g2d1f",
state: CLOSED,
) {
id
identifier
state
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"identifier": "REQ-0065",
"state": "CLOSED",
}
cancelRequisitionβ
Deletes a requisition.
Parametersβ
| Name | Type | Description | Example |
|---|---|---|---|
| id | ID | Unique identifier for requisitions | "ckmnpybisiy5x08abky4g2d1f" |
Example Queryβ
mutation {
cancelRequisition(
id: "ckmnpybisiy5x08abky4g2d1f"
) {
id
identifier
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"identifier": "REQ-0065"
}