Skip to content

Retrieves a ticket by its Id

Request

The include* query flags let a caller whose identity is not recognised opt into data that is otherwise only returned to Willow platform callers. Platform callers always receive that data, and Mapped and marketplace app callers ignore the flags.

Security
oauth2
Path
ticketIdstring, (uuid)required

The unique identifier of the ticket.

Query
includeDiagnosticsboolean
includeTemplateIdboolean
includeActionedInsightTicketsboolean
includeComputedDatesboolean
const query = new URLSearchParams({
  includeDiagnostics: 'true',
  includeTemplateId: 'true',
  includeActionedInsightTickets: 'true',
  includeComputedDates: 'true'
}).toString();

const ticketId = 'YOUR_ticketId_PARAMETER';
const instance = 'YOUR_instance_PARAMETER';
const resp = await fetch(
  `https://${instance}.app.willowinc.com/api/v3/tickets/${ticketId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    }
  }
);

const data = await resp.text();
console.log(data);

Responses

Ticket found.

Bodyapplication/json
categoryobject(IdName)

Gets or sets the category of the ticket.

jobTypeobject(IdName)

Gets or sets the job type of the ticket.

serviceNeededobject(IdName)

Gets or sets the service needed for the ticket.

subStatusobject(IdName)

Gets or sets the sub-status of the ticket.

commentsArray of objects or null(Comment)

Gets or sets the comments associated with the ticket.

ticketCostsArray of objects or null(TicketCost)

Gets or sets the list of ticket costs associated with the ticket.

tasksArray of objects or null(TicketTask)

Gets or sets the list of tasks associated with the ticket, ordered by their display order.

notesnull or string

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

diagnosticsArray of objects or null(Insight1)

Gets or sets the insight diagnostics linked to the ticket. Returned to Willow platform callers, and to callers with no recognised identity header that pass includeDiagnostics=true; empty otherwise.

templateIdnull or string, (uuid)

Gets or sets the id of the ticket template the ticket was generated from; null for non-template tickets. Returned to Willow platform callers, and to callers with no recognised identity header that pass includeTemplateId=true; null otherwise.

syncErrornull or string

Gets or sets the latest error reported when writing the ticket to the CMMS, as text; null when there is none.

idstring, (uuid)

Gets or sets the unique identifier for the ticket.

sequenceNumbernull or string

Gets or sets the human-readable sequence number for the ticket (e.g. "T-549").

ticketPriorityobject(TicketPriority)

Gets or sets the ticket priority details.

ticketStatusobject(TicketStatus1)

Gets or sets the ticket status details.

insightIdnull or string, (uuid)

Gets or sets the insight identifier associated with the ticket.

summarynull or string

Gets or sets the summary of the ticket.

descriptionnull or string

Gets or sets the description of the ticket.

causenull or string

Gets or sets the description of the underlying reason or cause associated with this instance.

solutionnull or string

Gets or sets the solution text associated with the ticket.

reporterobject(UserProfile)

Gets or sets the reporter of the ticket.

assigneeTypeany(AssigneeType)

Gets or sets the type of the assignee.

Enum:"noAssignee""customerUser""workGroup"
userAssigneeobject(UserProfile)

Gets or sets the user who is assigned to the ticket.

workgroupAssigneeobject(WorkgroupAssignee)

Gets or sets the workgroup assignee for the ticket.

creatorobject(UserProfile)

Gets or sets the creator of the ticket.

closedByobject(UserProfile)

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.

completedByobject(UserProfile)

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.

dueDatenull or string, (date-time)

Gets or sets the due date of the ticket.

createdDatestring, (date-time)

Gets or sets the date when the ticket was created.

updatedDatestring, (date-time)

Gets or sets the date when the ticket was last updated.

startedDatenull or string, (date-time)

Gets or sets the date when the ticket was started.

resolvedDatenull or string, (date-time)

Gets or sets the date when the ticket was resolved.

closedDatenull or string, (date-time)

Gets or sets the date when the ticket was closed.

sourceTypeany(SourceType2)

Gets or sets the source type of the ticket.

Enum:"platform""app""dynamics""mapped"
sourceIdnull or string, (uuid)

Gets or sets the identifier of the source from which the ticket originated.

sourceNamenull or string

Gets or sets the name of the source from which the ticket originated.

externalIdnull or string

Gets or sets the external identifier of the ticket.

externalCreatedDatenull or string, (date-time)

Gets or sets the date when the ticket was created in an external system.

externalUpdatedDatenull or string, (date-time)

Gets or sets the date when the ticket was last updated in an external system.

computedCreatedDatenull or string, (date-time)

Gets or sets the ticket's effective creation date: DateTime? TicketBaseDto.ExternalCreatedDate when the ticket was created in an external system, DateTime TicketBaseDto.CreatedDate otherwise. This is the value the ticket list is sorted by when sorting on createdDate. Returned to Willow platform callers, and to callers with no recognised identity header that pass includeComputedDates=true; null otherwise.

computedUpdatedDatenull or string, (date-time)

Gets or sets the ticket's effective update date: DateTime? TicketBaseDto.ExternalUpdatedDate when the ticket was last updated by an external source, DateTime TicketBaseDto.UpdatedDate otherwise. This is the value the ticket list is sorted by when sorting on updatedDate. Returned to Willow platform callers, and to callers with no recognised identity header that pass includeComputedDates=true; null otherwise.

latitudenull or number, (double)

Gets or sets the latitude of the ticket's location.

longitudenull or number, (double)

Gets or sets the longitude of the ticket's location.

customPropertiesnull or object

Gets or sets the custom properties associated with the ticket.

extendableSearchablePropertyKeysArray of strings or null

Gets or sets the list of extendable searchable property keys associated with the ticket.

scheduledDatenull or string, (date-time)

Gets or sets the scheduled date for the ticket.

occurrenceinteger, (int32)

Gets or sets the occurrence count of the ticket.

locationsArray of objects or null(Location)

Gets or sets the list of ticket locations.

twinobject(BaseTwin)

Gets or sets the twin associated with the ticket.

recommendationsArray of objects or null(TicketRecommendation)

Gets or sets the list of ticket's recommendations.

attachmentsArray of objects or null(AttachmentDetails)

Gets or sets the attachments associated with the ticket. Only populated when explicitly requested via the includeattachments filter, or when loading a ticket detail.

willowUrlnull or string

Gets or sets the ticket URL in Willow App.

insightUrlnull or string

Gets or sets the insight URL in Willow App.

Response
{ "category": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": null }, "jobType": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": null }, "serviceNeeded": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": null }, "subStatus": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": null }, "comments": null, "ticketCosts": null, "tasks": null, "notes": null, "diagnostics": null, "templateId": null, "syncError": null, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "sequenceNumber": null, "ticketPriority": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": null, "priorityLevel": "urgent", "isDefault": true }, "ticketStatus": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": null, "tab": null, "color": null, "locations": null }, "insightId": null, "summary": null, "description": null, "cause": null, "solution": null, "reporter": { "id": null, "name": null, "email": null, "phone": null, "company": null }, "assigneeType": "noAssignee", "userAssignee": { "id": null, "name": null, "email": null, "phone": null, "company": null }, "workgroupAssignee": { "id": null, "name": null }, "creator": { "id": null, "name": null, "email": null, "phone": null, "company": null }, "closedBy": { "id": null, "name": null, "email": null, "phone": null, "company": null }, "completedBy": { "id": null, "name": null, "email": null, "phone": null, "company": null }, "dueDate": null, "createdDate": "2019-08-24T14:15:22Z", "updatedDate": "2019-08-24T14:15:22Z", "startedDate": null, "resolvedDate": null, "closedDate": null, "sourceType": "platform", "sourceId": null, "sourceName": null, "externalId": null, "externalCreatedDate": null, "externalUpdatedDate": null, "computedCreatedDate": null, "computedUpdatedDate": null, "latitude": null, "longitude": null, "customProperties": null, "extendableSearchablePropertyKeys": null, "scheduledDate": null, "occurrence": 0, "locations": null, "twin": { "id": null, "name": null, "modelId": null }, "recommendations": null, "attachments": null, "willowUrl": null, "insightUrl": null }