- Retrieves a ticket by its Id
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.
- https://.app.willowinc.com/api/v3https://.app.willowinc.com/api/v3/tickets/{ticketId}
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);Ticket found.
Gets or sets the list of ticket costs associated with the ticket.
Gets or sets the list of tasks associated with the ticket, ordered by their display order.
Gets or sets the free-form notes recorded against the ticket (used by scheduled tickets).
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.
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.
Gets or sets the latest error reported when writing the ticket to the CMMS, as text; null when there is none.
Gets or sets the human-readable sequence number for the ticket (e.g. "T-549").
Gets or sets the description of the underlying reason or cause associated with this instance.
Gets or sets the type of the assignee.
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.
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.
Gets or sets the source type of the ticket.
Gets or sets the identifier of the source from which the ticket originated.
Gets or sets the date when the ticket was created in an external system.
Gets or sets the date when the ticket was last updated in an external system.
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.
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.
Gets or sets the list of extendable searchable property keys associated with the ticket.
Gets or sets the list of ticket's recommendations.
Gets or sets the attachments associated with the ticket. Only populated when explicitly requested via the includeattachments filter, or when loading a ticket detail.
{ "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 }