Docketbook supports the programmatic creation and routing of dockets between suppliers, contractors and customers in the construction industry. Dockets can be created from calls made to REST API end points and routed to the appropriate person or project, either internal or external to the Docketbook environment.
Dockets are routed to the correct location based on either Dockebook Project ID, Docketbook Company ID + PO Number or email address / mobile phone number.
Routing dockets via Docketbook brings the benefits of remote device signing of dockets (contactless signing), independent verification of docket delivery and on-platform issue resolution.
This document provides guidance around the technical expectations of those interacting with the third-party docket creation API. The intent of this API is to strike a balance between capturing the dockets of our mutual customers in an efficient way whilst ensuring that authenticity needs are met.
While the focus of this document is technical in nature, this section is intended to provide a high-level functional overview of the process described herein.
Dockets are created by the ingestion of JSON or XML formatted data to an authenticated API end point. Dockets consist of a set of required information including Customer, Date, Line Item Descriptions, quantities and units of measure. In addition, dockets may contain custom information such as water quantities or lot numbers. These can be defined in the Docket Template and populated using the appropriate tags in the data payload.
Dockets can be routed to parties both ‘on Docketbook’ and off-platform. For Docketbook customers, the payload must contain either the Organisation Group ID referring to the receiving project, or the Organisation ID of the receiving company and a Purchase Order number to route the docket to on the customer side.
For off-platform routing, each docket must contain either a recipient email address or mobile phone number. This will deliver the docket as a linked PDF to the recipient email or text message. The recipient will also have access to their docket history by creating an account on Docketbook.
Verification of Receipt
Docketbook supports contactless signing of dockets for dockets received both on an off platform. Signed PDFs are available to both parties (either on platform or via API call).
Further, Docketbook supports a cross-company Accept/Reject process. For customers on platform, the user can accept, or more importantly, reject a docket and the issue resolution process can address docket issues prior to invoicing.
Finally, each docket is supported by an audit log, which records when, and by whom, dockets were sent, signed and accepted/rejected.
This API consists of a series of HTTPS REST based endpoints that accept different data formats depending on the preference of the integrating partner. Partners will be identified by way of shared secrets that are included in the headers of requests sent to the API. Future development may see the use of access keys that are used to sign the request. It is expected that partners secure their key material appropriately and in the event of a breach, Docketbook will work with the partner to cycle the affected keys.
The default format expected will be JSON. The below example sets out a single docket sent by the integration partner for routing to a customer.
A full request payload would look like:
The XML format mimics the JSON format defined above, which would look like the following
<?xml version="1.0" encoding="UTF-8"?>
Receiver Discovery Process
There are N methods by which customer matching takes place, each with its own advantages/tradeoffs. It is up to the partner to decide which method best suits their needs based on the experience they want for the mutual customer and how their internal systems make data available for export. The different options depend on how explicit the partner wants to be about docket routing.
Note that use of the overarching “organisation” or “organisationGroup” fields should be targeted at customers known to be on-platform and be customer specific.
Customer Organisation Group
A customer organisation group would be generally analogous to an organisation unit, functional division or project. It is identified either via a UUID or via a pseudo email address, both of which are Docketbook assigned.
In the email address case, it can be included in the “addresses” element of each docket entry.
Alternatively the UUID can be supplied in the overarching request payload like so
In the case of both a top level UUID and docket specific contact being specified, the union is taken.
The benefit of this method is that customer dockets are delivered to the most relevant place for processing. This avoids the overhead on the customer side in terms of locating the correct destination for a docket that enters a common receiving point. The downside is that additional data tracking is required on the integration partner side, namely the Organisation Group UUID and/or email addresses need to be stored and included in requests.
Request per Customer Organisation
If the partner is not able to easily track organisation groups, another option is to use the unique identifiers for the receiving organisation. This is also a UUID assigned by Docketbook during creation and its use would look like
Each organisation on Docketbook also contains a default organisation group, which comes with its own UUID/pseudo email address. As such, it is also possible to use that email address as part of the customer contact “addresses” field to achieve the same organisation level routing.
Request per Partner
In the event of sending dockets to customers that are not on-platform, the first two options are not available or there is a preference for just using the “addresses” field in the customer contact, a simple request can be used that looks like:
In this instance, each docket must individually specify the correct destinations in the “addresses” field of the customerContact.
Extraction and Routing Process
To avoid each partner having to implement retry behavior and have potentially long running requests, dockets submitted to the endpoint will be queued for processing rather than being handled interactively. As such, the endpoint will return a payload like so
// Successful request - HTTP Status Code 200
Should a docket fail to process, an error will be raised and stored. A list of failures can be queried like so
If desired, an email for each non-transient failure can be configured at the partner’s request.
Customer Side Matching
Docketbook supports the concept of orders, which serve as a way to group dockets together in the context of an overarching collection of work, such as a purchase order. As such, it is useful for customers that any dockets ingested for them be matched to orders where possible.
In the event that a customerRefNo is not supplied on the submitted docket, no matching takes place and currently no further processing is done to find the correct destination for a docket. This is not a problem if an organisation group is discoverable for the docket, however if an organisation is used then the docket will be received into a common point, requiring the customer to route it themselves.
If a customerRefNo is supplied, Docketbook will search the destination organisation group (or entire organisation if that is all that is provided) for an order that contains a matching customerRefNo. If one is found, the docket will be routed to that organisation group and associated with that order.
Was this article helpful?
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
We appreciate your effort and will try to fix the article