# Get Checklist Analytics

This API endpoint enables fetching a collection of checklists performed during a specific month and year. By providing the desired month and year as parameters, the API response narrows down the results to the exact period, facilitating the analysis of financial data and tracking the progress of checklist efforts. And also include information about TLCs.

Endpoint: GET /api/v1/analytics/checklists
Version: 1.0.0
Security: x-api-key

## Query parameters:

  - `filter[month]` (string)
    Specifies the month for which the checklists should be retrieved. Valid values are the names of the months. Must be used in conjunction with filter[year]. Required if neither filter[modifiedBefore] nor filter[modifiedSince] is provided.
    Example: "march"

  - `filter[year]` (integer)
    Specifies the year for which the checklists should be retrieved. It should be a four-digit numerical value. Must be used in conjunction with filter[month]. Required if neither filter[modifiedBefore] nor filter[modifiedSince] is provided.
    Example: 2023

  - `filter[modifiedBefore]` (string)
    Sets the cutoff date for retrieving checklists, including only those modified before (but not including) the specified date. The date must be in the format YYYY-MM-DD. While filter[modifiedBefore] is required if filter[month] and filter[year] are not provided, it can also be used in conjunction with these filters for more specific queries.
    Example: "2021-01-01"

  - `filter[modifiedSince]` (string)
    Sets the cutoff date for retrieving checklists, including only those modified on or after the specified date. The date must be in the format YYYY-MM-DD. While filter[modifiedSince] is required if filter[month] and filter[year] are not provided, it can also be used in conjunction with these filters for more specific queries.
    Example: "2020-12-31"

  - `filter[entityIds]` (string)
    Comma separated entity ids for which the checklists should be retrieved.
    Example: "5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2"

  - `filter[workflowIds]` (string)
    Comma separated workflow ids for which the checklists should be retrieved
    Example: "5e94d5b63f557b001420baa1,5e94d5b63f557b001420baa2"

  - `page[size]` (integer)
    The number of items to return. If not specified, the API will return a default of 30,000 items, which is the maximum value.
    Example: 12000

  - `page[cursor]` (string)
    Pagination cursor that indicates the starting position for the next set of items
    Example: "5e94d5b63f557b001420bbe3"

  - `allowRedirect` (boolean)
    If set to true, the API will return a 303 redirect response if the response payload is too large. The field body.data.url will include the URL to the actual resource.
    Example: true

## Response 200 fields (application/json):

  - `data` (array)
    Array of Checklists

  - `data._id` (string)
    Id of checklist
    Example: "5e94d5b63f557b001420bbe3"

  - `data.entity` (object)

  - `data.entity._id` (string)
    Id of entity
    Example: "5e94d5b63f557b001420bbe2"

  - `data.entity.name` (string)
    Name of entity
    Example: "John Smith's company"

  - `data.entity.workflow` (object)
    Workflow of entity

  - `data.entity.workflow._id` (string)
    Id of workflow
    Example: "5e94d5b63f557b001420bbe1"

  - `data.entity.workflow.name` (string)
    Name of workflow
    Example: "Close"

  - `data.entity.details` (string)
    User-provided details
    Example: "Client ID: 123ABC"

  - `data.folder` (object)

  - `data.folder._id` (string)
    Id of folder
    Example: "5e94d5b63f557b001420bbe4"

  - `data.folder.name` (string)
    Name of folder
    Example: "Accounts Receivable"

  - `data.description` (string)
    Description of checklist item
    Example: "1200 Accounts Receivable"

  - `data.itemStatus` (string)
    Enum: "On Track", "Ready for Review", "Late (Preparer)", "Late (Reviewer)", "Complete (On Time)", "Complete (Prepared Late)", "Complete (Reviewed Late)", "Complete (Prepared & Reviewed Late)", "Out of Balance"

  - `data.frequency` (any)
    Enum: "Monthly", "Quarterly", "Annually", "Weekly", "Bi-Weekly", "Non-Recurring", "Custom"

  - `data.frequencyMonths` (array)
    Example: ["june"]

  - `data.signatures` (array)

  - `data.signatures.assignedToUser` (object)

  - `data.signatures.assignedToUser.name` (object)

  - `data.signatures.assignedToUser.name.first` (string)
    Example: "John"

  - `data.signatures.assignedToUser.name.last` (string)
    Example: "Smith"

  - `data.signatures.assignedToUser.email` (string)
    User email address
    Example: "john.smith@example.com"

  - `data.signatures.assignedToGroup` (object)

  - `data.signatures.assignedToGroup.id` (string)
    Example: "5e94d5b63f557b001420bbe4"

  - `data.signatures.assignedToGroup.name` (string)
    Example: "Group Name"

  - `data.signatures.signedBy` (object)

  - `data.signatures.signedDate` (string)
    Date when checklist was signed

  - `data.signatures.dueDate` (string)
    Date when checklist is due

  - `data.signatures.estimatedTimeMinutes` (integer)
    Estimated completion time (minutes)
    Example: 90

  - `data.signatures.group` (string)
    Enum: "preparer", "reviewer", "unassigned"

  - `data.reviewNotes` (array)

  - `data.reviewNotes.author` (object)

  - `data.reviewNotes.assignedTo` (object)

  - `data.reviewNotes.message` (string)
    Message of note

  - `data.reviewNotes.created` (string)
    Date when comment was created
    Example: "2021-01-01T00:00:00.000Z"

  - `data.reviewNotes.comments` (array)

  - `data.reviewNotes.comments.author` (object)

  - `data.reviewNotes.comments.message` (string)
    Message of comment

  - `data.reviewNotes.comments.created` (string)
    Date when comment was created
    Example: "2021-01-01T00:00:00.000Z"

  - `data.tags` (array)

  - `data.tags.name` (string)
    Name of tag
    Example: "non_close"

  - `data.updatedAt` (string)
    Date when checklist was last updated
    Example: "2021-01-01T00:00:00.000Z"

  - `data.period` (object)

  - `data.period.month` (string)
    Month of period
    Example: "december"

  - `data.period.year` (string)
    Year of period
    Example: "2023"

  - `links` (object)

  - `links.self` (string)
    Link to self
    Example: "/api/v1/analytics/checklists?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3"

  - `links.next` (string)
    Pagination link pointing to the next page
    Example: "/api/v1/analytics/checklists?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe6"

## Response 303 fields (application/json):

  - `data` (object)

  - `data.url` (string)
    The URL to the new location of the resource.

## Response 400 fields (application/json):

  - `message` (object)
    Reason(s) for the errors related to incorrect query keys or values that are out of bounds

  - `message.errors` (array)

  - `message.errors.field` (string)
    The field that caused the error
    Example: "filter[month]"

  - `message.errors.message` (string)
    The error message
    Example: "filter[month] is required"

  - `name` (string)
    BadRequest
    Example: "BadRequest"

  - `status` (integer)
    The HTTP status code.
    Example: 400

## Response 401 fields (application/json):

  - `message` (string)
    Reason for the error such as incorrect service access, malformed, expired or deactivated token.
    Example: "Invalid token"

  - `name` (string)
    Unauthorized
    Example: "Unauthorized"

  - `status` (integer)
    The HTTP status code.
    Example: 401

## Response 413 fields (application/json):

  - `message` (string)
    Reason for the error related to the payload size
    Example: "Response size is greater than 1MB"

  - `name` (string)
    PayloadTooLarge
    Example: "PayloadTooLarge"

  - `status` (integer)
    The HTTP status code.
    Example: 413


