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 [ 2 .. 16 ] characters

An identifier to be used by any application lodging enquiries through the SmarterWX Sentinel API. This is used to identify the source of all enquiries.

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

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": "WEB",
  • "isSandboxTest": true,
  • "Address": {
    },
  • "autoRenewUntil": "2021-06-01",
  • "userTimezone": "Australia/Melbourne\" responses: "
}

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": "WEB",
  • "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": "WEB",
  • "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": {
    }
}

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

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
{}