# Retrieves a ticket by its Id

Endpoint: GET /tickets/{ticketId}
Version: v3
Security: oauth2

## Security:

  - `oauth2` (unknown)
    oauth2

## Path parameters:

  - `ticketId` (string, required)

## Response 200:

  - `200` (unknown)
    Ticket found.

## Response 200 fields (application/json):

  - `category` (object)
    Gets or sets the category of the ticket.

  - `category.id` (string, required)

  - `category.name` (null | string, required)

  - `jobType` (object)
    Gets or sets the job type of the ticket.

  - `serviceNeeded` (object)
    Gets or sets the service needed for the ticket.

  - `subStatus` (object)
    Gets or sets the sub-status of the ticket.

  - `comments` (null | array)
    Gets or sets the comments associated with the ticket.

  - `comments.id` (string)
    Gets or sets the unique identifier for the comment.

  - `comments.text` (null | string)
    Gets or sets the text content of the comment.

  - `comments.createdDate` (string)
    Gets or sets the date and time when the comment was created.

  - `comments.creator` (object)
    Gets or sets the user profile of the comment creator.

  - `comments.creator.id` (null | string)
    Gets or sets the unique identifier for the user.

  - `comments.creator.name` (null | string)
    Gets or sets the name of the user.

  - `comments.creator.email` (null | string)
    Gets or sets the email address of the user.

  - `comments.creator.phone` (null | string)
    Gets or sets the phone number of the user.

  - `comments.creator.company` (null | string)
    Gets or sets the company name associated with the user.

  - `ticketCosts` (null | array)
    Gets or sets the list of ticket costs associated with the ticket.

  - `ticketCosts.phase` (string)
    Gets or sets the current phase of ticket cost calculation.
    Enum: "estimated", "planned", "actual"

  - `ticketCosts.category` (string)
    Gets or sets the category used to classify the type of ticket cost.
    Enum: "tool", "material", "labor", "total"

  - `ticketCosts.unit` (null | string)
    Gets or sets the unit of measurement associated with the value.

  - `ticketCosts.value` (number)
    Gets or sets the numeric value represented by this instance.

  - `tasks` (null | array)
    Gets or sets the list of tasks associated with the ticket, ordered by their display order.

  - `tasks.id` (string)
    Gets or sets the unique identifier.

  - `tasks.taskName` (null | string)
    Gets or sets the task name.

  - `tasks.isCompleted` (boolean)
    Gets or sets a value indicating whether the task is completed.

  - `tasks.order` (integer)
    Gets or sets the display order.

  - `tasks.numberValue` (null | number)
    Gets or sets the numeric value for the task.

  - `tasks.type` (string)
    Gets or sets the task type.
    Enum: "numeric", "checkbox"

  - `tasks.decimalPlaces` (null | integer)
    Gets or sets the number of decimal places.

  - `tasks.minValue` (null | number)
    Gets or sets the minimum value.

  - `tasks.maxValue` (null | number)
    Gets or sets the maximum value.

  - `tasks.unit` (null | string)
    Gets or sets the unit of measurement.

  - `notes` (null | string)
    Gets or sets the free-form notes recorded against the ticket (used by scheduled tickets).

  - `diagnostics` (null | array)
    Gets or sets the insight diagnostics linked to the ticket.
Internal calls only.

  - `diagnostics.id` (string)
    Gets or sets the unique identifier of the insight.

  - `diagnostics.customerId` (string)
    Gets or sets the unique identifier of the customer associated with the insight.

  - `diagnostics.sequenceNumber` (null | string)
    Gets or sets the sequence number of the insight.

  - `diagnostics.equipmentId` (null | string)
    Gets or sets the unique identifier of the equipment associated with the insight.

  - `diagnostics.twinId` (null | string)
    Gets or sets the twin identifier of the insight.

  - `diagnostics.twinName` (null | string)
    Gets or sets the name of the twin associated with the insight.

  - `diagnostics.type` (string)
    Gets or sets the type of the insight.
    Enum: "fault", "energy", "alert", "note", "goldenStandard", "infrastructure", "integrityKpi", "energyKpi", "edgeDevice", "dataQuality", "commissioning", "comfort", "wellness", "calibration", "diagnostic", "predictive", "alarm", "maintenance"

  - `diagnostics.insightType` (string)
    Gets or sets the type of the insight (standard or scenario).
    Enum: "standard", "scenario"

  - `diagnostics.category` (string)
    Gets or sets the category of the insight.
    Enum: "fault", "energy", "alert", "note", "goldenStandard", "infrastructure", "integrityKpi", "energyKpi", "edgeDevice", "dataQuality", "commissioning", "comfort", "wellness", "calibration", "diagnostic", "predictive", "alarm", "maintenance"

  - `diagnostics.name` (null | string)
    Gets or sets the name of the insight.

  - `diagnostics.description` (null | string)
    Gets or sets the description of the insight.

  - `diagnostics.recommendation` (null | string)
    Gets or sets the recommendation for the insight.

  - `diagnostics.impactScores` (null | array)
    Gets or sets the impact scores associated with the insight.

  - `diagnostics.impactScores.name` (null | string)
    Gets or sets the name of the impact score.

  - `diagnostics.impactScores.fieldId` (null | string)
    Gets or sets the field ID of the impact score.

  - `diagnostics.impactScores.value` (number)
    Gets or sets the value of the impact score.

  - `diagnostics.impactScores.unit` (null | string)
    Gets or sets the unit of the impact score.

  - `diagnostics.impactScores.externalId` (null | string)
    Gets or sets the external ID that matches a time series in ADX.

  - `diagnostics.impactScores.ruleId` (null | string)
    Gets or sets the rule ID associated with the impact score.

  - `diagnostics.impactScores.description` (null | string)
    Gets or sets the description of the impact score.

  - `diagnostics.priority` (integer)
    Gets or sets the priority of the insight.

  - `diagnostics.lastStatus` (string)
    Gets or sets the last status of the insight.
    Enum: "open", "ignored", "inProgress", "resolved", "new", "deleted", "readyToResolve"

  - `diagnostics.state` (string)
    Gets or sets the state of the insight.
    Enum: "inactive", "active", "disabled", "insufficientData", "archived"

  - `diagnostics.createdDate` (string)
    Gets or sets the date when the insight was created.

  - `diagnostics.updatedDate` (string)
    Gets or sets the date when the insight was last updated.

  - `diagnostics.occurredDate` (string)
    Gets or sets the date when the insight occurred.

  - `diagnostics.detectedDate` (string)
    Gets or sets the date when the insight was detected.

  - `diagnostics.sourceType` (string)
    Gets or sets the source type of the insight.
    Enum: "willow", "app", "inspection"

  - `diagnostics.sourceId` (null | string)
    Gets or sets the unique identifier of the source associated with the insight.

  - `diagnostics.sourceName` (null | string)
    Gets or sets the name of the source associated with the insight.

  - `diagnostics.primaryModelId` (null | string)
    Gets or sets the primary model identifier of the insight.

  - `diagnostics.externalId` (null | string)
    Gets or sets the external identifier of the insight.

  - `diagnostics.externalStatus` (null | string)
    Gets or sets the external status of the insight.

  - `diagnostics.externalMetadata` (null | string)
    Gets or sets the external metadata of the insight.

  - `diagnostics.occurrenceCount` (integer)
    Gets or sets the occurrence count of the insight.

  - `diagnostics.createdUserId` (null | string)
    Gets or sets the unique identifier of the user who created the insight.

  - `diagnostics.ruleId` (null | string)
    Gets or sets the rule identifier associated with the insight.

  - `diagnostics.ruleName` (null | string)
    Gets or sets the rule name associated with the insight.

  - `diagnostics.newOccurrence` (boolean)
    Gets or sets a value indicating whether the insight is a new occurrence.

  - `diagnostics.previouslyIgnored` (integer)
    Gets or sets the count of times the insight was previously ignored.

  - `diagnostics.previouslyResolved` (integer)
    Gets or sets the count of times the insight was previously resolved.

  - `diagnostics.floorId` (null | string)
    Gets or sets the unique identifier of the floor associated with the insight.

  - `diagnostics.reported` (boolean)
    Gets or sets a value indicating whether the insight has been reported.

  - `diagnostics.commentCount` (integer)
    Gets or sets the comment count for the insight.

  - `diagnostics.lastResolvedDate` (null | string)
    Gets or sets the date when the insight was last resolved.

  - `diagnostics.lastIgnoredDate` (null | string)
    Gets or sets the date when the insight was last ignored.

  - `diagnostics.locations` (null | array)
    Gets or sets the locations associated with the insight.

  - `diagnostics.locationDetails` (null | array)
    Gets or sets the location details, including twin ID, name, and model ID.

  - `diagnostics.locationDetails.id` (null | string)
    Gets or sets location Id (Scope's twinId).

  - `diagnostics.locationDetails.name` (null | string)
    Gets or sets location name.

  - `diagnostics.locationDetails.modelId` (null | string)
    Gets or sets location model Id.

  - `diagnostics.tags` (null | array)
    Gets or sets the tags associated with the insight.

  - `diagnostics.isDiagnosticsData` (boolean)
    Gets or sets a value indicating whether the insight contains diagnostics data.

  - `diagnostics.ignoreUntil` (null | string)
    Gets or sets the ignore expiry date for the insight.

  - `diagnostics.openTicketCount` (integer)
    Gets or sets the number of open tickets for the insight.

  - `diagnostics.completedTicketCount` (integer)
    Gets or sets the number of Completed tickets for the insight.

  - `diagnostics.closedTicketCount` (integer)
    Gets or sets the number of closed tickets for the insight.

  - `diagnostics.ticketClosedDate` (null | string)
    Gets or sets the ticket closed date.

  - `diagnostics.ticketCompletedDate` (null | string)
    Gets or sets the ticket completed date.

  - `diagnostics.secondaryTwins` (null | array)
    Gets or sets the secondary twins "secondary components" of the insight.

  - `diagnostics.secondaryTwins.id` (null | string)
    Gets or sets twin Id.

  - `diagnostics.secondaryTwins.name` (null | string)
    Gets or sets twin Name.

  - `diagnostics.secondaryTwins.modelId` (null | string)
    Gets or sets model id.

  - `diagnostics.secondaryTwins.eTag` (null | string)
    Gets or sets unique tag of location for changes.

  - `diagnostics.recommendations` (null | array)
    Gets or sets the recommendations of the insight.

  - `diagnostics.recommendations.id` (string)
    Gets or sets the unique identifier for the recommendation.

  - `diagnostics.recommendations.name` (null | string)
    Gets or sets the name of the recommendation.

  - `diagnostics.recommendations.recommendation` (null | string)
    Gets or sets the recommendation.

  - `diagnostics.recommendations.tags` (null | array)
    Gets or sets the tags for recommendation.

  - `diagnostics.recommendations.ignored` (boolean)
    Gets or sets a value indicating whether the recommendation is ignored or not.

  - `diagnostics.recommendations.tickets` (null | array)
    Gets or sets the recommendation's tickets.

  - `diagnostics.recommendations.tickets.id` (string)
    Gets or sets the ticket id.

  - `diagnostics.recommendations.tickets.summary` (null | string)
    Gets or sets the ticket summary.

  - `diagnostics.recommendations.tickets.createdDate` (string)
    Gets or sets the ticket created date.

  - `diagnostics.recommendations.tickets.ticketStatus` (object)
    Gets or sets the ticket status details.

  - `diagnostics.recommendations.tickets.ticketStatus.id` (string)
    Gets or sets the unique identifier for the ticket status.

  - `diagnostics.recommendations.tickets.ticketStatus.name` (null | string)
    Gets or sets the name of the ticket status.

  - `diagnostics.recommendations.tickets.ticketStatus.tab` (null | string)
    Gets or sets the status's tab that can be used to filter ticket status in UI.

  - `diagnostics.recommendations.tickets.ticketStatus.color` (null | string)
    Gets or sets the color associated with the ticket status.

  - `diagnostics.dependencyCount` (integer)
    Gets or sets the number of insight's dependencies.

  - `diagnostics.actionStatus` (string)
    Gets or sets the action status of the insight.
    Enum: "needsAction", "inProgress", "unsuccessfullyActioned", "successfullyActioned"

  - `diagnostics.actionStatusV2` (string)
    Gets or sets the action status of the insight, using InsightActionStatusV2.None
when the insight matches no category (rather than coercing to
InsightActionStatusV2.NeedsAction as the deprecated InsightActionStatus InsightDto.ActionStatus does).
    Enum: "none", "needsAction", "inProgress", "unsuccessfullyActioned", "successfullyActioned"

  - `diagnostics.scenarioId` (null | string)
    Gets or sets the insights parent scenario id.

  - `diagnostics.scenarioName` (null | string)
    Gets or sets the insights parent scenario name.

  - `diagnostics.firstExecutedCommandDate` (null | string)
    Gets or sets the first executed command date for the insight.

  - `diagnostics.descriptionUpdatedDate` (null | string)
    Gets or sets the date when the insight description was last updated.

  - `diagnostics.twinsIncludedCount` (null | integer)
    Gets or sets the number of twins included in the scenario insight.

  - `diagnostics.groupedInsightsCount` (null | integer)
    Gets or sets the number of grouped insights in the scenario insight.

  - `templateId` (null | string)
    Gets or sets the id of the ticket template the ticket was generated from; null for non-template tickets.
Internal calls only.

  - `id` (string)
    Gets or sets the unique identifier for the ticket.

  - `sequenceNumber` (null | string)
    Gets or sets the human-readable sequence number for the ticket (e.g. "T-549").

  - `ticketPriority` (object)
    Gets or sets the ticket priority details.

  - `ticketPriority.id` (string)
    Gets or sets the unique identifier for the ticket priority.

  - `ticketPriority.name` (null | string)
    Gets or sets the name of the ticket priority.

  - `ticketPriority.priorityLevel` (string)
    Gets or sets the priority level of the ticket.
    Enum: "urgent", "high", "medium", "low"

  - `ticketPriority.isDefault` (boolean)
    Gets or sets a value indicating whether this priority is the default for its priority level.

  - `ticketStatus` (object)
    Gets or sets the ticket status details.

  - `ticketStatus.id` (string)
    Gets or sets the unique identifier for the ticket status.

  - `ticketStatus.name` (null | string)
    Gets or sets the name of the ticket status.

  - `ticketStatus.tab` (null | string)
    Gets or sets tab can be used to filter ticket status in UI
also used to categorize ticket status to Open, Completed or Closed
each ticket status, mapped to a Tab value
e.g. to determine if ticket is closed we check all status under Closed tab.

  - `ticketStatus.color` (null | string)
    Gets or sets the color associated with the ticket status.

  - `ticketStatus.locations` (null | array)
    Gets or sets the location IDs this status is scoped to.
An empty list means the status applies to every location.

  - `insightId` (null | string)
    Gets or sets the insight identifier associated with the ticket.

  - `summary` (null | string)
    Gets or sets the summary of the ticket.

  - `description` (null | string)
    Gets or sets the description of the ticket.

  - `cause` (null | string)
    Gets or sets the description of the underlying reason or cause associated with this instance.

  - `solution` (null | string)
    Gets or sets the solution text associated with the ticket.

  - `reporter` (object)
    Gets or sets the reporter of the ticket.

  - `assigneeType` (string)
    Gets or sets the type of the assignee.
    Enum: "noAssignee", "customerUser", "workGroup"

  - `userAssignee` (object)
    Gets or sets the user who is assigned to the ticket.

  - `workgroupAssignee` (object)
    Gets or sets the workgroup assignee for the ticket.

  - `workgroupAssignee.id` (null | string)
    Gets or sets the workgroup identifier.

  - `workgroupAssignee.name` (null | string)
    Gets or sets the workgroup name.

  - `creator` (object)
    Gets or sets the creator of the ticket.

  - `closedBy` (object)
    Gets or sets the identity that moved the ticket into a Closed-tab status.
A Willow user or an external profile, resolved the same way as UserProfileDto TicketBaseDto.Creator.

  - `completedBy` (object)
    Gets or sets the identity that moved the ticket into a Completed-tab status.
A Willow user or an external profile, resolved the same way as UserProfileDto TicketBaseDto.Creator.

  - `dueDate` (null | string)
    Gets or sets the due date of the ticket.

  - `createdDate` (string)
    Gets or sets the date when the ticket was created.

  - `updatedDate` (string)
    Gets or sets the date when the ticket was last updated.

  - `startedDate` (null | string)
    Gets or sets the date when the ticket was started.

  - `resolvedDate` (null | string)
    Gets or sets the date when the ticket was resolved.

  - `closedDate` (null | string)
    Gets or sets the date when the ticket was closed.

  - `sourceType` (string)
    Gets or sets the source type of the ticket.
    Enum: "platform", "app", "dynamics", "mapped"

  - `sourceId` (null | string)
    Gets or sets the identifier of the source from which the ticket originated.

  - `sourceName` (null | string)
    Gets or sets the name of the source from which the ticket originated.

  - `externalId` (null | string)
    Gets or sets the external identifier of the ticket.

  - `externalCreatedDate` (null | string)
    Gets or sets the date when the ticket was created in an external system.

  - `externalUpdatedDate` (null | string)
    Gets or sets the date when the ticket was last updated in an external system.

  - `latitude` (null | number)
    Gets or sets the latitude of the ticket's location.

  - `longitude` (null | number)
    Gets or sets the longitude of the ticket's location.

  - `customProperties` (null | object)
    Gets or sets the custom properties associated with the ticket.

  - `extendableSearchablePropertyKeys` (null | array)
    Gets or sets the list of extendable searchable property keys associated with the ticket.

  - `scheduledDate` (null | string)
    Gets or sets the scheduled date for the ticket.

  - `occurrence` (integer)
    Gets or sets the occurrence count of the ticket.

  - `locations` (null | array)
    Gets or sets the list of ticket locations.

  - `twin` (object)
    Gets or sets the twin associated with the ticket.

  - `twin.id` (null | string)
    Gets or sets the unique identifier for the twin.

  - `twin.name` (null | string)
    Gets or sets the name of the twin.

  - `twin.modelId` (null | string)
    Gets or sets the twin's model id.

  - `recommendations` (null | array)
    Gets or sets the list of ticket's recommendations.

  - `recommendations.id` (string)
    Gets or sets the unique identifier for the recommendation entity.

  - `recommendations.name` (null | string)
    Gets or sets the name of the recommendation.

  - `recommendations.recommendation` (null | string)
    Gets or sets the recommendation.

  - `recommendations.tags` (null | array)
    Gets or sets the tags for recommendation.

  - `attachments` (null | array)
    Gets or sets the attachments associated with the ticket.
Only populated when explicitly requested via the `includeattachments` filter,
or when loading a ticket detail.

  - `attachments.id` (string)
    Gets or sets the unique identifier for the attachment.

  - `attachments.fileName` (null | string)
    Gets or sets the file name of the attachment.

  - `willowUrl` (null | string)
    Gets or sets the ticket URL in Willow App.

  - `insightUrl` (null | string)
    Gets or sets the insight URL in Willow App.

## Response 401:

  - `401` (unknown)
    Unauthorized.

## Response 401 fields (application/json):

  - `type` (null | string)

  - `title` (null | string)

  - `status` (null | integer)

  - `detail` (null | string)

  - `instance` (null | string)

## Response 404:

  - `404` (unknown)
    Ticket not found.

## Response 404 fields (application/json):

  - `type` (null | string)

  - `title` (null | string)

  - `status` (null | integer)

  - `detail` (null | string)

  - `instance` (null | string)

