Enquiries API (1.0)

Download OpenAPI specification:Download

Search over enquiries

Search over enquiries

Authorizations:
CognitoUserPool
query Parameters
filter
string
Example: filter=digStartAfter:2020-08-01

Filters to apply to records

limit
integer [ 1 .. 1000 ]
Example: limit=50

Max number of records to return

offset
integer >= 0
Example: offset=100

Used for paging - offset from start

include
string
Example: include=Address, Referral, WorkingForAuthority

Provide list of extended properties to return

fields
string
Example: fields=userReference,digStartAt

List of basic properties to return (* indicates all)

order
string
Example: order=userReference,-createdAt

Sort order for results - hyphen prefix reverses order

returnGeometry
boolean
Example: returnGeometry=false

Includes geometry in response

Responses

Response samples

Content type
application/json
{
  • "Info": {
    },
  • "Enquiries": [
    ]
}

Create enquiry

Create enquiry

Authorizations:
CognitoUserPool
Request Body schema: application/json
userReference
string <= 100 characters

A user-supplied reference for this enquiry.

digStartAt
required
string <date>

Start date for enquiry activity. Must be no earlier than today.

digEndAt
required
string <date>

Start date for enquiry activity. Must be no earlier than digStartAt.

required
object (Polygon)
isPlanningJob
required
boolean

Indicates if this enquiry relates to planning and design (true) or excavation (false).

activityTypes
required
Array of strings non-empty unique

An array of activity types. All values must be sourced from either the ENQ_ACT_DESIGN (isPlanningJob = true) or ENQ_ACT_EXCAVATE (isPlanningJob = false) domains.

authorityId
integer >= 1

The organisation for whom the enquiry activity is being undertaken. The authorityId must be a valid value returned from a call to GET /community/organisations for the enquiry polygon. Omit this attribute for either a Private enquiry or an enquiry using a user-entered authority name (otherAuthorityName).

otherAuthorityName
string <= 100 characters

A user-entered name for the organisation for whom the enquiry activity is being undertaken. Should only be provided when no authorityId is entered. Omitting both authorityId and otherAuthorityName attributes indicates a Private enquiry.

notes
string <= 500 characters

User supplied notes regarding the enquiry activity. Useful for communicating additional details about the activity with DBYD members.

locationTypes
required
Array of strings non-empty unique
Items Enum: "Road Reserve" "Private"

A list of location types for the enquiry activity.

locationsInRoad
required
Array of strings non-empty unique
Items Enum: "Road" "Nature Strip" "Footpath"

Required when locationTypes includes Road Reserve. A list of locations within the Road Reserver where work is to be undertaken.

source
required
string = 3 characters

An identifier to be used by any application lodging enquiries through the SmarterWX Sentinel API. It's used to identify the source of all enquiries, and the value needs to be set as 'API'.

isSandboxTest
boolean

When true, this enquiry is only processed against the asset owner's own sandbox referral configuration. Only available to user's who belong to an asset owner organisation.

required
object (Address)
autoRenewUntil
string
userTimezone
string

Responses

Request samples

Content type
application/json
{
  • "userReference": "NBN Job Ref 124",
  • "digStartAt": "2020-08-08",
  • "digEndAt": "2020-08-15",
  • "shape": {
    },
  • "isPlanningJob": true,
  • "activityTypes": [
    ],
  • "authorityId": 134,
  • "otherAuthorityName": "Jim Digs",
  • "notes": "We are digging a hole.",
  • "locationTypes": [
    ],
  • "locationsInRoad": [
    ],
  • "source": "API",
  • "isSandboxTest": true,
  • "Address": {
    },
  • "autoRenewUntil": "2021-06-01",
  • "userTimezone": "Australia/Melbourne"
}

Response samples

Content type
application/json
{
  • "id": 234,
  • "userReference": "NBN Job Ref 124",
  • "digStartAt": "2020-08-08",
  • "digEndAt": "2020-08-15",
  • "shape": { },
  • "externalId": 20001234,
  • "isPlanningJob": true,
  • "activityTypes": [
    ],
  • "authorityId": 13,
  • "otherAuthorityName": "Jim Digs",
  • "notes": "We are digging a hole.",
  • "locationTypes": [
    ],
  • "locationsInRoad": [
    ],
  • "autoRenewUntil": "2020-11-01",
  • "isSandboxTest": true,
  • "source": "API",
  • "createdAt": "2020-08-01T03:36:00.000Z",
  • "updatedAt": "2020-08-01T03:36:00.000Z",
  • "userId": 123,
  • "Address": {
    },
  • "Referrals": [
    ]
}

Get details of an enquiry

Get details of an enquiry

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry to retrieve

query Parameters
shareId
string
Example: shareId=abc1234

To validate is this a share enquiry.

include
string
Enum: "ConfirmationPDF" "LogoImageFile"
Example: include=LogoImageFile

Include confirmation pdf and/or logo in responses

Responses

Response samples

Content type
application/json
{
  • "id": 234,
  • "userReference": "NBN Job Ref 124",
  • "digStartAt": "2020-08-08",
  • "digEndAt": "2020-08-15",
  • "shape": { },
  • "externalId": 20001234,
  • "isPlanningJob": true,
  • "activityTypes": [
    ],
  • "authorityId": 13,
  • "otherAuthorityName": "Jim Digs",
  • "notes": "We are digging a hole.",
  • "locationTypes": [
    ],
  • "locationsInRoad": [
    ],
  • "autoRenewUntil": "2020-11-01",
  • "isSandboxTest": true,
  • "source": "API",
  • "createdAt": "2020-08-01T03:36:00.000Z",
  • "updatedAt": "2020-08-01T03:36:00.000Z",
  • "userId": 123,
  • "Address": {
    },
  • "Referrals": [
    ]
}

Update details of an enquiry

Update details of an enquiry

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry to update

Request Body schema: application/json
autoRenewUntil
string

Responses

Request samples

Content type
application/json
{
  • "autoRenewUntil": "2021-06-01"
}

Response samples

Content type
application/json
{
  • "id": 234,
  • "userReference": "NBN Job Ref 124",
  • "digStartAt": "2020-08-08",
  • "digEndAt": "2020-08-15",
  • "shape": { },
  • "externalId": 20001234,
  • "isPlanningJob": true,
  • "activityTypes": [
    ],
  • "authorityId": 13,
  • "otherAuthorityName": "Jim Digs",
  • "notes": "We are digging a hole.",
  • "locationTypes": [
    ],
  • "locationsInRoad": [
    ],
  • "autoRenewUntil": "2020-11-01",
  • "isSandboxTest": true,
  • "source": "API",
  • "createdAt": "2020-08-01T03:36:00.000Z",
  • "updatedAt": "2020-08-01T03:36:00.000Z",
  • "userId": 123,
  • "Address": {
    },
  • "Referrals": [
    ]
}

Get referral details

Get referral details

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry being fetched

referralId
required
integer >= 1
Example: 1

ID of the referral being fetched

query Parameters
returnGeometry
boolean
Example: returnGeometry=false

Includes geometry in response

returnResponses
boolean
Example: returnResponses=false

Includes responses in response

include
string
Value: "LogoImageFile"
Example: include=LogoImageFile

Includes logo in response

Responses

Response samples

Content type
application/json
{
  • "id": 234,
  • "status": "CREATED",
  • "externalId": 2123456789,
  • "updatedAt": "2020-08-01T03:36:00.000Z",
  • "Enquiry": {
    },
  • "Organisation": {
    }
}

Add response for a referral

Add response for a referral

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry being responded to

referralId
required
integer >= 1
Example: 1

ID of the referral being responded to

Request Body schema: application/json
body
required
string
Array of objects
Array of objects
safetyMessage
string [ 25 .. 320 ] characters
webMapURL
string <uri> <= 2000 characters

Responses

Request samples

Content type
application/json
{
  • "body": "<DIV>Our response</DIV>",
  • "Files": [
    ],
  • "Links": [
    ],
  • "safetyMessage": "stringstringstringstrings",
  • "webMapURL": "http://example.com"
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "referral_id": 3456,
  • "body": "<DIV>Our response</DIV>",
  • "Files": [
    ]
}

Get enquiry share url

Get enquiry share url

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry being responded to

Responses

Response samples

Download Combined file of enquiry

Download Combined file of enquiry

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry being responded to

fileType
required
string
Value: "zip"

Type of the file being responded to

query Parameters
shareId
string
Example: shareId=iOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

The shareId token if the enquiry is open from a shared link

Responses

Response samples

Content type
application/json
{
  • "File": {
    },
  • "Job": {
    }
}

Create a job to download a combined responses file

Create a job to download a combined responses file as pdf or zip

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry being processed

fileType
required
string
Enum: "pdf" "zip"

Type of the file being created

Request Body schema: application/json
includeLookUpAndLive
boolean

Whether to include look up and live in the file

shareId
string

The shareId token if the enquiry is open from a shared link

totalAttachmentCount
number

The total number of attachments in the enquiry

selectedAttachmentCount
number

The number of attachments selected for download

hasAdvancedOptions
boolean

Whether advanced options are being used

object

Responses

Request samples

Content type
application/json
{
  • "includeLookUpAndLive": true,
  • "shareId": "iOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "totalAttachmentCount": 10,
  • "selectedAttachmentCount": 5,
  • "hasAdvancedOptions": true,
  • "reponses": {
    }
}

Response samples

Content type
application/json
{
  • "File": {
    },
  • "Job": {
    }
}

Search over referrals

Search over referrals

Authorizations:
CognitoUserPool
query Parameters
filter
string
Example: filter=createdAfter:2020-08-01

Filters to apply to records. createdAfter fetches records from a specified date or defaults to 90 days ago if no date is provided.

limit
integer [ 1 .. 1000 ]
Example: limit=50

Max number of records to return

offset
integer >= 0
Example: offset=100

Used for paging - offset from start

fields
string
Example: fields=createdAt,externalId

List of basic properties to return (* indicates all)

order
string
Example: order=-createdAt

Sort order for results - hyphen prefix reverses order

Responses

Response samples

Content type
application/json
{
  • "Info": {
    },
  • "Referrals": [
    ]
}

Search over referral emails

Search over referral emails

Authorizations:
CognitoUserPool
query Parameters
filter
string
Example: filter=createdAfter:2020-08-01

Filters to apply to records. createdAfter fetches records from a specified date or defaults to 90 days ago if no date is provided.

limit
integer [ 1 .. 1000 ]
Example: limit=50

Max number of records to return

offset
integer >= 0
Example: offset=100

Used for paging - offset from start

fields
string
Example: fields=createdAt,externalId

List of basic properties to return (* indicates all)

order
string
Example: order=-createdAt

Sort order for results - hyphen prefix reverses order

Responses

Response samples

Content type
application/json
{
  • "Info": {
    },
  • "Referrals": [
    ]
}

Search over referral responses

Search over referral responses

Authorizations:
CognitoUserPool
query Parameters
filter
string
Example: filter=createdAfter:2020-08-01

Filters to apply to records

limit
integer [ 1 .. 1000 ]
Example: limit=50

Max number of records to return

offset
integer >= 0
Example: offset=100

Used for paging - offset from start

fields
string
Example: fields=createdAt,externalId

List of basic properties to return (* indicates all)

order
string
Example: order=-createdAt

Sort order for results - hyphen prefix reverses order

Responses

Response samples

Content type
application/json
{
  • "Info": {
    },
  • "Responses": [
    ]
}

List all files associated with the response

List all files associated with the response

Authorizations:
CognitoUserPool
query Parameters
token
required
string
Example: token=1:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Combination of version and JWT token containing the response id

Responses

Response samples

Content type
application/json
{
  • "id": null,
  • "referralId": null,
  • "Files": [
    ],
  • "Enquiry": {
    }
}

Get the download link for a particular file

Get the download link for a particular file

Authorizations:
CognitoUserPool
path Parameters
fileId
required
integer >= 1
Example: 1

ID of the file to retrieve

query Parameters
token
required
string
Example: token=1:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Combination of version and JWT token containing the response id

Responses

Response samples

Content type
application/json
{}

Get the zip file download link for all the files a

Get the zip file download link for all the files associated with the response

Authorizations:
CognitoUserPool
query Parameters
token
required
string
Example: token=1:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Combination of version and JWT token containing the response id

Responses

Response samples

Content type
application/json
{}

Retrieve one response and file details

Retrieve one response and file details

Authorizations:
CognitoUserPool
path Parameters
responseId
required
integer >= 1
Example: 123
query Parameters
shareId
string
Example: shareId=abc1234

To validate whether this content contects to a shared enquiry.

Responses

Response samples

Content type
application/json
{
  • "id": 234,
  • "userId": 123,
  • "body": "<DIV>Our response</DIV>",
  • "Attachments": [
    ]
}

Retrieve the thumbnail for the response body

Retrieve the thumbnail for the response body

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 123
responseId
required
integer >= 1
Example: 123
query Parameters
shareId
string
Example: shareId=abc1234

To validate whether this content connects to a shared enquiry.

Responses

Response samples

Content type
application/json
{
  • "thumbnail": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/BQYH/8QAtRABAAIB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5Pj/3",
  • "width": 200,
  • "height": 200,
  • "cached": true
}

Retrieve the thumbnail for a particular response a

Retrieve the thumbnail for a particular response attachment

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 123
responseId
required
integer >= 1
Example: 123
fileId
required
integer >= 1
Example: 1

ID of the attachment to retrieve

query Parameters
shareId
string
Example: shareId=abc1234

To validate whether this content connects to a shared enquiry.

Responses

Response samples

Content type
application/json
{
  • "thumbnail": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/BQYH/8QAtRABAAIB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5Pj/3",
  • "width": 200,
  • "height": 200,
  • "cached": true
}

Get the link for a particular response attachment

Get the link for a particular response attachment

Authorizations:
CognitoUserPool
path Parameters
fileId
required
integer >= 1
Example: 1

ID of the attachment to retrieve

query Parameters
shareId
string
Example: shareId=iOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

The shareId token if the enquiry is open from a shared link

Responses

Response samples

Content type
application/json
{}

Get all attachments from selected enquiry

Get all attachments from selected enquiry

Authorizations:
CognitoUserPool
path Parameters
enquiryId
required
integer >= 1
Example: 1

ID of the enquiry to retrieve attachments for

query Parameters
shareId
string
Example: shareId=abc1234

The shareId token if the enquiry is open from a shared link

Responses

Response samples

Content type
application/json
{
  • "id": 234,
  • "Referrals": [
    ]
}

Get a bulk enquiry lodgement

Get a bulk enquiry lodgement

Authorizations:
CognitoUserPool
path Parameters
bulkId
required
integer >= 1
Example: 1

ID of the bulk enquiry lodgement to retrieve

query Parameters
include
string
Example: include=BufferJob,SplitJob,ConvertJob,UpdateFilesJob,ProcessFilesJob

Comma-separated list of related jobs to include in the response

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "status": "UPLOADING",
  • "createdAt": "2020-08-01T03:36:00.000Z",
  • "updatedAt": "2020-08-01T03:36:00.000Z"
}

Update a bulk enquiry lodgement

Update a bulk enquiry lodgement

Authorizations:
CognitoUserPool
path Parameters
bulkId
required
integer >= 1
Example: 1

ID of the bulk enquiry lodgement to update

Request Body schema: application/json
bufferDistance
integer
maxSplitAreaSqm
integer
userReference
string <= 100 characters
digStartAt
string <date>
digEndAt
string <date>
isPlanningJob
boolean
activityTypes
Array of strings unique
notes
string <= 500 characters
userTimezone
string
source
string
locationTypes
Array of strings
Items Enum: "Road Reserve" "Private"
locationsInRoad
Array of strings unique
Items Enum: "Road" "Nature Strip" "Footpath"
autoRenewUntil
string <date>

Responses

Request samples

Content type
application/json
{
  • "bufferDistance": 100,
  • "maxSplitAreaSqm": 50000,
  • "userReference": "NBN Job Ref 124",
  • "digStartAt": "2020-08-08",
  • "digEndAt": "2020-08-15",
  • "isPlanningJob": true,
  • "activityTypes": [
    ],
  • "notes": "We are digging a hole.",
  • "userTimezone": "Australia/Melbourne",
  • "source": "APP",
  • "locationTypes": [
    ],
  • "locationsInRoad": [
    ],
  • "autoRenewUntil": "2021-06-01"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "status": "PROCESSING"
}

Preview validation of buffer and split geometry se

Preview validation of buffer and split geometry settings for a bulk enquiry lodgement

Authorizations:
CognitoUserPool
path Parameters
bulkId
required
integer >= 1
Example: 1

ID of the bulk enquiry lodgement to validate

Request Body schema: application/json
bufferDistance
required
integer

Buffer distance in metres (0 when buffer not applied; 10-200 when active)

maxSplitAreaSqm
integer or null

Split area in square metres (0 = disabled; 1000000-19000000 when enabled; null for point-only files)

Responses

Request samples

Content type
application/json
{
  • "bufferDistance": 200,
  • "maxSplitAreaSqm": 0
}

Response samples

Content type
application/json
{
  • "canProceed": false,
  • "requiresSplit": true,
  • "maxBufferedAreaSqm": 40000000,
  • "totalBufferedAreaSqm": 120000000,
  • "features": [
    ],
  • "violations": [
    ]
}