TicketNote

  • 15.5
This article is may not be up to date with the latest stable release of M4.

Description

The TicketNote endpoint provides the API consumer with access to methods pertaining to ticket notes and related data objects. The endpoint allows consumers to load ticket note data, add new ticket notes, and update ticket notes.

Methods

URL base/Workforce/TicketNote/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the Ticket Note endpoint.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
    {
        "HttpAction": "Post",
        "MethodName": "AddTicketNote",
        "Description": "Method allows for the adding of a ticket note. The newly created ticket note object is returned.",
        "Format": {
            "TicketID": 2734,
            "NoteType": "NOTE",
            "Note": "note text",
            "Subject": "",
            "UserName": "username",
            "ts": "2017-11-20T11:33:34.0299526-05:00",
            "IsClearedNote": false
        }
    },
    {
        "HttpAction": "Get",
        "MethodName": "GetTicketNote",
        "Description": "Returns the record for a single ticket note given the passed in ID value (see Path).",
        "Path": "/TicketNote/GetTicketNote/25032"
    },
    {
        "HttpAction": "Post",
        "MethodName": "GetTicketNote",
        "Description": "Returns the record for a single ticket note given the passed in ticket ID, note, user name, and timestamp.",
        "Format": {
            "TicketID": 2803,
            "Note": "note text",
            "UserName": "username",
            "ts": "2017-11-20T11:33:34.0299526-05:00"
        }
    },
    {
        "HttpAction": "Get",
        "MethodName": "GetTicketNotesByTicket",
        "Description": "Returns ticket notes given the passed in ID value of the ticket (see Path).",
        "Path": "/TicketNote/GetTicketNotesByTicket/25032"
    },
    {
        "HttpAction": "Post",
        "MethodName": "UpdateTicketNote",
        "Description": "Method allows for the updating of a ticket note. The updated ticket note object is returned.",
        "Format": {
            "ID": 1637,
            "TicketID": 6372,
            "NoteType": "NOTE",
            "Note": "note text",
            "Subject": "",
            "UserName": "username",
            "ts": "2017-11-20T11:33:34.0309505-05:00",
            "IsClearedNote": false
        }
    }
]
URL base/Workforce/TicketNote/AddTicketNote
Action POST
Description Adds the specified ticket note object and returns a the newly created ticket note object.
Parameters
Name Required? Type Description
TicketID Yes Integer The ID of the ticket for which this note belongs to.
Note Yes String The text body of the note.
NoteType No String The type of the note. It can be either "NOTE" or "LOG".
Subject No String The subject of the note.
UserName No String The author of the note.
ts No Time The timestamp of when the note was created.
IsClearedNote No Boolean
Sample JSON Package
{
     "TicketID": 2734,
     "NoteType": "NOTE",
     "Note": "note text",
     "Subject": "",
     "UserName": "username",
     "ts": "2017-11-20T11:33:34.0299526-05:00",
     "IsClearedNote": false
}
Returns A JSON TicketNote data object
Sample Return Object
{
      "ID": 342927,
      "TicketID": 2734,
      "NoteType": "NOTE",
      "Note": "note text",
      "Subject": "",
      "UserName": "username",
      "ts": "2017-11-20T11:33:34.0299526-05:00",
      "IsClearedNote": false
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • TicketID: must be an existing Ticket
  • UserName: While the field is not required, it is recommended to include a user name for tracking and display purposes.
URL base/Workforce/TicketNote/GetTicketNote/ID
Action GET
Description Returns a TicketNote object when given an ID of a valid ticket note in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a ticket note in the M4 database.
Returns A JSON TicketNote data object
Sample Return Object
{
      "ID": 342927,
      "TicketID": 2734,
      "NoteType": "NOTE",
      "Note": "note text",
      "Subject": "",
      "UserName": "username",
      "ts": "2017-11-20T11:33:34.0299526-05:00",
      "IsClearedNote": false
}
URL base/Workforce/TicketNote/GetTicketNote
Action POST
Description Returns the record for a single ticket note given the passed in ticket ID, note, user name, and timestamp.
Parameters
Name Required? Type Description
TicketID Yes Integer The ID of the ticket for which this note belongs to.
Note Yes String The text body of the note.
UserName No String The author of the note.
ts No Time The timestamp of when the note was created.
Sample JSON Package
{
     "TicketID": 2734,
     "Note": "note text",
     "UserName": "username",
     "ts": "2017-11-20T11:33:34.0299526-05:00"
}
Returns A JSON TicketNote data object
Sample Return Object
{
      "ID": 342927,
      "TicketID": 2734,
      "NoteType": "NOTE",
      "Note": "note text",
      "Subject": "",
      "UserName": "username",
      "ts": "2017-11-20T11:33:34.0299526-05:00",
      "IsClearedNote": false
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • TicketID: must be an existing Ticket
URL base/Workforce/TicketNote/GetTicketNotesByTicket
Action GET
Description Returns a collection TicketNote objects when given an ID of a valid ticket in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a ticket in the M4 database.
Returns A JSON TicketNote data object
Sample Return Object
{
      "ID": 342927,
      "TicketID": 2734,
      "NoteType": "NOTE",
      "Note": "note text",
      "Subject": "",
      "UserName": "username",
      "ts": "2017-11-20T11:33:34.0299526-05:00",
      "IsClearedNote": false
}
URL base/Workforce/TicketNote/GetTicketNotes
Action POST
Description Gets a collection of TicketNote objects that matches the search criteria.
Parameters
Name Required? Type Description
TicketID No Integer The ID of the ticket.
NoteType No String The type of the note. It can be either "NOTE" or "LOG".
UserName No String The author of the note.
StartDate No Time The start date of the timestamp of when the note was created.
EndDate No Time The end date of the timestamp of when the note was created.
Sample JSON Package
{
    "TicketID": null,
    "UserName": "",
    "StartDate": "2019-02-01T15:08:13.1435401-05:00",
    "EndDate": "2019-02-28T15:08:13.1435401-05:00",
    "NoteType": ""
}
Returns A collection of JSON TicketNote data objects
Sample Return Object
[
    {
        "ID": 7,
        "TicketID": 320,
        "NoteType": "NOTE",
        "Note": "Ticket has been cancelled. Total number of Linecard(s): 0",
        "Subject": null,
        "UserName": "mapcom",
        "ts": "2019-02-04T10:28:44.207",
        "IsClearedNote": false
    },
    {
        "ID": 8,
        "TicketID": 327,
        "NoteType": "NOTE",
        "Note": "Ticket has been cancelled. Total number of Linecard(s): 0",
        "Subject": null,
        "UserName": "mapcom",
        "ts": "2019-02-04T10:28:44.717",
        "IsClearedNote": false
    }
]
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • TicketID: must be an existing Ticket if specified
URL base/Workforce/TicketNote/UpdateTicketNote
Action POST
Description Updates the specified ticket note object and returns the ticket note object.
Parameters
Name Required? Type Description
ID Yes Integer The ID for which this note belongs to.
TicketID Yes Integer The ID of the ticket for which this note belongs to.
Note No String The text body of the note.
NoteType No String The type of the note. It can be either "NOTE" or "LOG".
Subject No String The subject of the note.
UserName No String The author of the note.
ts No Time The timestamp of when the note was created.
IsClearedNote No Boolean
Sample JSON Package
{
     "ID": 342927,
     "TicketID": 2734,
     "NoteType": "NOTE",
     "Note": "note text",
     "Subject": "",
     "UserName": "username",
     "ts": "2017-11-20T11:33:34.0299526-05:00",
     "IsClearedNote": false
}
Returns A JSON TicketNote data object
Sample Return Object
{
      "ID": 342927,
      "TicketID": 2734,
      "NoteType": "NOTE",
      "Note": "note text",
      "Subject": "",
      "UserName": "username",
      "ts": "2017-11-20T11:33:34.0299526-05:00",
      "IsClearedNote": false
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • TicketID: must be an existing Ticket
  • UserName: While the field is not required, it is recommended to include a user name for tracking and display purposes.
URL base/Workforce/TicketNote/DeleteTicketNote/ID
Action GET
Description Deletes a TicketNote object when given an ID of a valid ticket note in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a ticket note in the M4 database.
Returns A JSON Message data object
Sample Return Object
{
    "Message": "The ticket note with ID [1] was deleted successfully."
}

Was this article helpful?

Related Articles