Skip to main content

Delivery Receipts

Delivery Receipts track the arrival of materials at Job sites. Deliveries can be associated or not with a Purchase Order.

Schema​

DeliveryReceipt​

NameTypeDescriptionExample
idIDunique item identifier"clrrttruv000kzay5bj6gyf5u"
deliveryReceiptIdIDdelivery receipt unique identifier"clrrttruv000kzay5bj6gyf5u"
descriptionStringitem description"3/4 EMT"
notesString?delivery receipt item notes"No issues"
quantityNumberoverall quantity"No issues"
quantityReceivedThisReceiptNumberquanitity received in this receipt"No issues"
unitsOfMeasureStringUnit of Measure"EA"
issuesReceiptItemIssuesUnit of Measure"EA"
createdAtDateTimeCreation timestamp"2024-01-10T21:22:26.053Z"
updatedAtDateTimeLast updated timestamp"2024-01-10T21:22:26.053Z"
integrationMessagestring?A message about the status of the integration's sync"PO number already exists"
integrationStateIntegrationState?The status of the Delivery sync to another integrated systemNOT_LINKED

ReceiptItemIssues​

NameTypeDescription
MISSINGNumberAmount of items missing
DAMAGEDNumberAmount of damaged items
NO_ISSUESNumberAmount of items without issues
WRONG_ITEMNumberAmount of wrong items received
BACKORDEREDNumberAmount of items backordered

Enums​

DeliveryReceiptState​

ValueDescription
SUBMITTEDWhen the receipt has been submitted
DRAFTWhen the receipt submition is pending

IntegrationState​

ValueDescription
NOT_LINKEDAll deliveries start in this un-linked state
LINKINGLinking to the other system is in progress
LINKEDThe delivery was successfully linked to the other system
ERRORAn error occurred while trying to sync the delivery to the other system. When this state is used, it's helpful to set an integrationMessage explaining the problem to the user.

Queries​

deliveryReceipt​

Fetches a single Delivery Receipt by id or identifier.

Parameters​

NameDescriptionExample
idThe Kojo ID of the delivery receipt to fetch"ckmnpybisiy5x08abky4g2d1f"
identifierThe identifier of the delivery receipt"DLV-A0001"

Response​

A single Delivery Receipt.

Example Query​

query {
deliveryReceipt(id: "ckmnpybisiy5x08abky4g2d1f") {
id
identifier
notes
state
createdAt
updatedAt
archivedAt
}
}

Example Response​

{
"id": "ckmnpybisiy5x08abky4g2d1f",
"identifier": "DLV-A0001",
"notes": null,
"createdAt": "2024-01-10T21:22:26.053Z",
"archivedAt": null,
"updatedAt": "2024-01-10T21:22:34.850Z",
"state": "SUBMITTED"
}

deliveryReceipts​

Fetches multiple delivery receipts. According to filters.

Parameters​

Accepts all standard pagination parameters.

Allowed orderBy fields: id, identifier, notes, createdAt, updatedAt, archivedAt, state.

Allowed filter fields: id, identifier, notes, createdAt, updatedAt, archivedAt, state.

Response​

A list of Delivery Receipts.

Example Query​

query {
deliveryReceipts(
orderBy: createdAt,
direction: DESC
) {
id
identifier
createdAt
}
}

Example Response​

[
{
"id": "clr8adymd000112nocbtsetzx",
"identifier": "DLV-A0001",
"createdAt": "2024-01-10T21:22:26.053Z",
}
]

orderDeliveryReceipts​

Fetches all delivery receipts associated with a Purchase Order.

Parameters​

NameTypeDescriptionExample
orderIdIDPurchase Order unique ID"ckmnpybisiy5x08abky4g2d1f"

Accepts the same filtering and ordering parameters from deliveryReceipts query.

Example Query​

query {
oderDeliveryReceipts(orderId: "ckmnpybisiy5x08abky4g2d1f"){
id
identifier
createdAt
}
}

Example Response​

[
{
"id": "clr8adymd000112nocbtsetzx",
"identifier": "DLV-A0001",
"createdAt": "2024-01-10T21:22:26.053Z",
}
]

deliveryReceiptItems​

Fetches all delivery receipt Items associated with a delivery.

Parameters​

NameTypeDescriptionExample
deliveryReceiptIdIDDelivery Receipt unique ID"ckmnpybisiy5x08abky4g2d1f"

Example Query​

query {
deliveryReceiptItems(deliveryReceiptId: "ckmnpybisiy5x08abky4g2d1f"){
id
deliveryReceiptId
description
quantity
issues
notes
quantityReceivedThisReceipt
unitsOfMeasure
createdAt
updatedAt
}
}

Example Response​

[
{
"id": "clrrttruw000mzay5lpuy36bu",
"deliveryReceiptId": "clrrttruv000kzay5bj6gyf5u",
"createdAt": "2024-01-24T13:34:13.832Z",
"updatedAt": "2024-01-24T13:34:23.446Z",
"description": "3/4 EMT",
"notes": "test note",
"quantity": 1,
"quantityReceivedThisReceipt": 1,
"unitsOfMeasure": "EA",
"issues": {
"NO_ISSUES": 1
}
}
]

Mutations​

updateDeliveryReceiptIntegrationState​

Updates the Delivery Receipt integration status.

Parameters​

NameTypeDescriptionExample
idIDUnique identifier for orders"ckmnpybisiy5x08abky4g2d1f"
integrationMessagestring?A message about the status of the integration's sync. Required if the status is being set to ERROR"Delivery Receipt already exists"
integrationStateIntegrationStateThe new status of the order's sync to your integrated systemNOT_LINKED

Example Query​

mutation {
updateDeliveryReceiptIntegrationState(
id: "ckmnpybisiy5x08abky4g2d1f",
integrationState: "LINKED",
integrationMessage: ""
) {
id
integrationMessage
integrationState
}
}

Example Response​

{
"id": "ckmnpybisiy5x08abky4g2d1f",
"integrationState": "LINKED",
"integrationMessage": ""
}