Get All Available Dates for Inspection

Gets available dates for scheduling an inspection, starting on the specified {startDate}. This API allows a date range of up to 31 days. Note that this API does not filter the available dates based on the Schedule Cut-off Time and Schedule Number of Days Out fields on the Civic Platform inspection calendar. To filter the available dates based on the Schedule Cut-off Time and Schedule Number of Days Out inspection calendar fields, set both {validateScheduleNumOfDays} and {validateScheduleNumOfDays} parameters to true.

Resource Information

Scopeinspections

Deprecated scope name:   get_inspection_available_dates

App TypeAll
Authorization TypeAccess token
URI /v4/inspections/availableDates?lang={lang}&typeId={typeId}&recordId={recordId}&startDate={startDate}&validateCutOffTime={validateCutOffTime}&validateScheduleNumOfDays={validateScheduleNumOfDays}&limit={limit}&offset={offset}
HTTP MethodGET
Automation Version(s)7.3.2

Request Information

Field or ParameterTypeRequiredValuesDescriptionAutomation Version
fieldsstringNo Comma-delimited names of fields to be returned in the response. Note: Field names are case-sensitive and only first-level fields are supported. Invalid field names are ignored.7.3.2
langStringNo Indicates the language applied.7.3.2
limitlongNo Indicates the number of items that are returned in each page.7.3.2
offsetlongNo Indicates the offset start of each page by the number specified.7.3.2
recordIdstringYes Get All Records Search Records Get My Records The unique ID associated with a record.7.3.2
startDatestringYes The date the contact became active.7.3.2
typeIdlongYes A unique system applied identifier of the type.7.3.2
validateCutOffTimestringNotrue | falseIf true, the Schedule Cut-off Time field setting on the Civic Platform Inspection Calendar is used to filter the returned available dates. If validateCutOffTime is set to true, the validateScheduleNumOfDays must also be set to true. The default value is false, which ignores the Schedule Cut-off Time field on the inspection calendar.7.3.3.9.4
validateScheduleNumOfDaysstringNotrue | falseIf true, the Schedule Number of Days Out field setting on the Civic Platform Inspection Calendar is used to filter the returned available dates. If validateScheduleNumOfDays is set to true, the validateCutOffTime must also be set to true. The default value is false, which ignores the Schedule Number of Days Out field on the inspection calendar.7.3.3.9.4

Example

Sample Request Head

GET https://apis.accela.com/v4/inspections/availabledates?recordId=ISLANDTON-13CAP-00000-00062&startDate=2014-10-01&limit=10

Notes

The following sample request uses the ISLANDTON agency in the TEST environment on the Accela Developer Sandbox. Click the "Send to Hurl.It" link below to submit the sample request. Replace YOUR-ACCESS-TOKEN before submitting the request.

curl
   -H 'Content-type: application/json'
   -H 'Accept: application/json'
   -H 'Authorization: YOUR-ACCESS-TOKEN'
   -X GET https://apis.accela.com/v4/inspections/availabledates
   -d recordId=ISLANDTON-13CAP-00000-00062
   -d startDate=2014-10-01
   -d limit=10

Response Information

FieldTypeDescriptionAutomation Version
result[]dateContains dates.7.3.2
statusintegerThe record status.7.3.3

Example

Sample Response Body

{
  "status": 200,
  "page": {
    "offset": 0,
    "limit": 10,
    "hasmore": true
  },
  "result": [
    "2014-10-10T07:00:00Z",
    "2014-10-12T07:00:00Z",
    "2014-10-13T07:00:00Z",
    "2014-10-14T07:00:00Z",
    "2014-10-15T07:00:00Z",
    "2014-10-16T07:00:00Z",
    "2014-10-17T07:00:00Z",
    "2014-10-19T07:00:00Z",
    "2014-10-20T07:00:00Z",
    "2014-10-21T07:00:00Z"
  ]
}