Skip to main content

Delivery Receipts (Field)

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

important

This endpoint supports Field Deliveries only. It does not cover Warehouse Deliveries.

Schema​

DeliveryReceipt​

NameTypeDescriptionExample
idIDunique item identifier"clrrttruv000kzay5bj6gyf5u"
deliveryReceiptIdIDdelivery receipt unique identifier"clrrttruv000kzay5bj6gyf5u"
descriptionStringitem description"3/4 EMT"
notesString?delivery receipt item notes"No issues"
quantityfloatoverall quantity5
quantityReceivedThisReceiptfloatquantity received in this receipt3
unitsOfMeasureStringUnit of Measure"EA"
issuesJsonIssue counts for this item, keyed by issue type{ "MISSING": 1, "DAMAGED": 0 }
deletedBoolean?If true the delivery receipt has been deletedfalse
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
attachmentsFile[]List of files attached to the delivery receipt (read-only)[{ "id": "...", "name": "packing-slip.pdf", "url": "https://..." }]

File​

NameTypeDescriptionExample
idIDUnique file identifier"clr8adymd000112nocbtsetzx"
nameStringFile name"packing-slip.pdf"
urlStringURL to download the file"https://storage.kojo.tech/files/..."
createdAtDateTimeFile upload timestamp"2024-01-10T21:22:26.053Z"
updatedAtDateTimeFile last updated timestamp"2024-01-10T21:22:26.053Z"

ReceiptItemIssues​

The issues field is a Json object whose keys are issue types and whose values are counts.

NameTypeDescription
MISSINGintAmount of items missing
DAMAGEDintAmount of damaged items
NO_ISSUESintAmount of items without issues
WRONG_ITEMintAmount of wrong items received
BACKORDEREDintAmount 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
OUT_OF_SYNCA change was made after linking; the record must be re-synced to the other system
LINKING_CHANGE_ORDERA related change order is currently being synced to the other system
COS_NOT_LINKEDA related change order has not yet been linked to the other system
COS_WITH_ERRORSAn error occurred while syncing a related change order 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
attachments {
id
name
url
}
}
}

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",
"attachments": [
{
"id": "clr8adymd000112nocbtsetzx",
"name": "packing-slip.pdf",
"url": "https://storage.kojo.tech/files/packing-slip.pdf"
}
]
}

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.

Accepts an includeDeleted boolean parameter which determines if deleted delivery receipts will be returned (e.g. includeDeleted: true). By default, deleted delivery receipts are not returned. Deleted receipts are returned with deleted set to true.

Deleting a delivery receipt updates its updatedAt timestamp, so combining includeDeleted with an updatedAt filter surfaces receipts deleted since your last sync.

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": ""
}