Delivery Receipts
Delivery Receipts track the arrival of materials at Job sites. Deliveries can be associated or not with a Purchase Order.
Schema​
DeliveryReceipt
​
Name | Type | Description | Example |
---|---|---|---|
id | ID | unique Kojo internal identifier | "clr8adymd000112nocbtsetzx" |
identifier | String? | Receipt identifier | "DLV-A0001" |
purchaseOrder | ID? | Purchase Order ID | "clrrtqmy60007zay5y3kbb6x0" |
notes | String? | Delivery notes | "Any kind of description" |
state | DeliveryReceiptState | Tracks the state of a delivery receipt | SUBMITTED |
issues | String[] | A list of issues with the delivery | SUBMITTED |
warehouseRequest | ID | warehouse request Id | "clr8adymd000112nocbtsetzx" |
notifiedContacts | String[] | List of notified contacts | ["Logan Norton <demo+field128@usekojo.com>"] |
deleted | Boolean | If true the delivery receipt has been deleted | false |
createdAt | DateTime | Timestamp of a delivery receipt creation | "2024-01-10T21:22:26.053Z" |
updatedAt | DateTime | Timestamp of a delivery receipt last update | "2024-01-10T21:22:26.053Z" |
archivedAt | DateTime? | Timestamp of when a receipt is archived/deleted | "2024-01-10T21:22:26.053Z" |
integrationMessage | string? | A message about the status of the integration's sync | "PO number already exists" |
integrationState | IntegrationState? | The status of the Delivery sync to another integrated system | NOT_LINKED |
DeliveryReceiptItem
​
Name | Type | Description | Example |
---|---|---|---|
id | ID | unique item identifier | "clrrttruv000kzay5bj6gyf5u" |
deliveryReceiptId | ID | delivery receipt unique identifier | "clrrttruv000kzay5bj6gyf5u" |
description | String | item description | "3/4 EMT" |
notes | String? | delivery receipt item notes | "No issues" |
quantity | Number | overall quantity | "No issues" |
quantityReceivedThisReceipt | Number | quanitity received in this receipt | "No issues" |
unitsOfMeasure | String | Unit of Measure | "EA" |
itemId | ID | Purchase Order Item Id | "clrrttruv000kzay5bj6gyfff" |
issues | ReceiptItemIssues | Unit of Measure | "EA" |
createdAt | DateTime | Creation timestamp | "2024-01-10T21:22:26.053Z" |
updatedAt | DateTime | Last updated timestamp | "2024-01-10T21:22:26.053Z" |
ReceiptItemIssues
​
Name | Type | Description |
---|---|---|
MISSING | Number | Amount of items missing |
DAMAGED | Number | Amount of damaged items |
NO_ISSUES | Number | Amount of items without issues |
WRONG_ITEM | Number | Amount of wrong items received |
BACKORDERED | Number | Amount of items backordered |
Enums​
DeliveryReceiptState
​
Value | Description |
---|---|
SUBMITTED | When the receipt has been submitted |
DRAFT | When the receipt submition is pending |
Queries​
GET /deliveries/:id
​
Fetches a single Delivery Receipt by id.
Parameters​
Name | Description | Example |
---|---|---|
id | The Kojo ID of the delivery receipt to fetch | "ckmnpybisiy5x08abky4g2d1f" |
Accepts all standard pagination parameters.
Allowed orderBy fields: identifier
, createdAt
, archivedAt
, id
, notes
, updatedAt
, state
.
Allowed filter fields: identifier
, createdAt
, archivedAt
, id
, notes
, updatedAt
, state
.
Response​
A single Delivery Receipt
.
Example Query​
GET https://api.kojo.tech/deliveries/clrru95cj0000nxfh8rd80syo
Example Response​
{
"id": "clrru95cj0000nxfh8rd80syo",
"identifier": "DLV-A0002",
"notes": null,
"createdAt": "2024-01-24T13:46:11.155Z",
"archivedAt": null,
"updatedAt": "2024-01-24T13:46:17.640Z",
"state": "SUBMITTED",
"purchaseOrder": "clrrtqmy60007zay5y3kbb6x0",
"issues": ["DAMAGED"],
"warehouseRequest": null,
"deleted": false,
"notifiedContacts": [],
"createdBy": "clr6fkyru0002q3dwbwh2t6j8",
"release": null
}
GET /deliveries
​
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 Deliveries
.
Example Query​
GET https://api.kojo.tech/deliveries
Example Response​
[
{
"id": "clrru95cj0000nxfh8rd80syo",
"identifier": "DLV-A0002",
"notes": null,
"createdAt": "2024-01-24T13:46:11.155Z",
"archivedAt": null,
"updatedAt": "2024-01-24T13:46:17.640Z",
"state": "SUBMITTED",
"purchaseOrder": "clrrtqmy60007zay5y3kbb6x0",
"issues": ["DAMAGED"],
"warehouseRequest": null,
"deleted": false,
"notifiedContacts": [],
"createdBy": "clr6fkyru0002q3dwbwh2t6j8",
"release": null
}
]
GET /orders/:orderId/deliveries
​
Fetches all delivery receipts associated with an Order.
Parameters​
Name | Type | Description | Example |
---|---|---|---|
orderId | ID | Purchase Order unique ID | "ckmnpybisiy5x08abky4g2d1f" |
Accepts the same filtering and ordering parameters from [GET /deliveries
] endpoint.
Response​
A list of Deliveries
.
Example Query​
GET https://api.kojo.tech/orders/ckmnpybisiy5x08abky4g2d1f/deliveries
Example Response​
[
{
"id": "clrru95cj0000nxfh8rd80syo",
"identifier": "DLV-A0002",
"notes": null,
"createdAt": "2024-01-24T13:46:11.155Z",
"archivedAt": null,
"updatedAt": "2024-01-24T13:46:17.640Z",
"state": "SUBMITTED",
"purchaseOrder": "clrrtqmy60007zay5y3kbb6x0",
"issues": ["DAMAGED"],
"warehouseRequest": null,
"deleted": false,
"notifiedContacts": [],
"createdBy": "clr6fkyru0002q3dwbwh2t6j8",
"release": null
}
]
GET /deliveries/:id/items
​
Fetches all items associated with a delivery
Parameters​
Accepts all standard pagination parameters.
Response​
A list of Deliveries Items
.
Example Query​
GET https://api.kojo.tech/deliveries/clrrttruv000kzay5bj6gyf5u/items
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
}
}
]
POST /deliveries/:id/updateIntegrationState
​
Updates the Delivery Receipt integration status.
Parameters​
Name | Type | Description | Example |
---|---|---|---|
id | ID | Unique identifier for orders | "ckmnpybisiy5x08abky4g2d1f" |
integrationMessage | string? | A message about the status of the integration's sync. Required if the status is being set to ERROR | "Delivery Receipt already exists" |
integrationState | IntegrationState | The new status of the order's sync to your integrated system | NOT_LINKED |
Example Query​
POST https://api.kojo.tech/deliveries/ckmnpybisiy5x08abky4g2d1f/updateIntegrationState
{
"integrationState": "ERROR",
"integrationMessage": "System Error"
}
Example Response​
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"identifier": "DLV-A0001",
"notes": "test",
"createdAt": "2024-02-20T16:53:05.168Z",
"archivedAt": null,
"updatedAt": "2024-02-20T18:22:55.236Z",
"state": "SUBMITTED",
"purchaseOrder": null,
"issues": [
"NO_ISSUES"
],
"warehouseRequest": null,
"deleted": false,
"notifiedContacts": [],
"createdBy": "clsj5mbvh0002vtjozgobx3ct",
"release": null,
"integrationLastSync": null,
"integrationMessage": "System Error",
"integrationState": "ERROR"
}