Skip to content

List an order's work reports

GET
/orders/{id}/work-reports
curl --request GET \
--url https://example.com/orders/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/work-reports \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>

The work reports drivers made at the stops that delivered this order, by number: the cylinders with their job type and checks, the purchase order number, the customer’s printed name, who to email and whether it has been emailed. What each report prints is fixed when it is made, so later changes to the settings do not change it. A report with anything listed in missing is incomplete: it has no number and is not emailed until the office finishes it. A report whose stop was undone has voidedAt set. Empty when the order has none.

id
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

The order’s work reports

Media typeapplication/json
object
items
required
Array<object>
object
id
required

UUID v7

string format: uuid
number
required
integer | null
> 0
orderId
required

UUID v7

string format: uuid
roundId
required

UUID v7

string | null format: uuid
roundStopId
required

UUID v7

string | null format: uuid
recordedAt
required
string format: date-time
customerName
required
string | null
purchaseOrder
required
string | null
customerSignatureId
required

UUID v7

string | null format: uuid
driverSignatureId
required

UUID v7

string | null format: uuid
emailTo
required

Main_contact: the customer’s main contact. everyone: every contact on the account. ask_driver: the driver picks at the stop.

string
Allowed values: main_contact everyone ask_driver
emailChoice
required
object
mainContact
required
boolean
contactIds
required
Array<string>
<= 50 items
emailExtra
required
Array<string>
emailStatus
required

Incomplete: something is missing (see missing); not numbered or emailed until the office finishes it. pending: numbered, not emailed yet. sent: emailed. failed: the email could not be sent. cancelled: the stop was undone before it was emailed.

string
Allowed values: incomplete pending sent failed cancelled
missing
required
Array<object>
object
code
required
string
Allowed values: notRecorded cylinder jobType checkUnknown check problemNote image customerSignature customerName driverSignature purchaseOrder contact
cylinder
string | null
check
string | null
image
string | null
Allowed values: customerSignature driverSignature photo
voidedAt
required
string | null format: date-time
printed
required
object
businessName
required
string
customer
required
object
name
required
string | null
accountNumber
required
string | null
address
required
string | null
driverName
required
string | null
recordedAt
required
string format: date-time
vehicleName
required
string | null
roundDate
required
string format: date
stopNumber
required
integer
> 0
acknowledgement
required
Array<string>
cylinders
required
Array<object>
object
side
required
string
Allowed values: delivered collected
productId
required

UUID v7

string format: uuid
productName
required
string
serial
required
string | null
quantity
required
integer
> 0
assetId
required

UUID v7

string | null format: uuid
details
required
Array<object>
object
name
required
string
value
required
string
jobType
required
object
id
required

UUID v7

string format: uuid
name
required
string
checks
required
Array<object>
object
checkId
required

UUID v7

string format: uuid
name
required
string
answer
required
string
Allowed values: ok problem
note
required
string | null
photoId
required

UUID v7

string | null format: uuid
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"items": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"orderId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"roundStopId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"customerSignatureId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"driverSignatureId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"emailTo": "main_contact",
"emailChoice": {
"contactIds": [
"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
]
},
"emailStatus": "incomplete",
"missing": [
{
"code": "notRecorded",
"image": "customerSignature"
}
],
"printed": {
"cylinders": [
{
"side": "delivered",
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"assetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"jobType": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
},
"checks": [
{
"checkId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"answer": "ok",
"photoId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
]
}
]
}
}
]
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not an owner or admin, or the plan does not open Assets

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not found, or Assets is not available to this business

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Assets is switched off, or the business already has 50 job types or checks

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}