Retrieving Ticket Data

Follow

Retrieve a list of current Tickets

URL Query Parameters

  • status - default: all
  • limit - default: 20 - Number or results per page
  • page - default: 1 - Page number
  • priority - default: all
  • assignee - default: unassigned
  • customerId - default: false
  • get_all_results - default: false
  • firstname - Specify a firstname to search for
  • lastname - Specify a lastname to search for

Call

GET /rest/ticket.json

Repsonse

{
  "success":"1",
  "status":"Tickets successfully retrieved",
  "count":"25",
  "ticket":{
    "4":{
      "id":"1",
      "subject":"Out of Office Reply",
      "order":{
        "id":null
      },
      "customer":{
        "id":"1",
        "firstname":"John",
        "lastname":"Smith"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "status":{
        "id":"1",
        "name":"Open"
      },
      "priority":{
        "id":"1",
        "name":"LOW"
      },
      "date":{
        "created":"2012-09-17 21:54:23",
        "updated":"2013-05-31 17:32:11"
      },
      "message_count":6,
      "messages":[
        {
          "id":"20",
          "body":"Hi Instantcart Demo\r<br \/>\r<br \/>\r<br \/>I'm currently out of the office from 18th September 2012 to 25th September 2012.\r<br \/>\r<br \/>\r<br \/>I'll be picking up emails where possible, however please allow extra time for a response.\r<br \/>\r<br \/>\r<br \/>Kind Regards\r<br \/>\r<br \/>\r<br \/>Paul Roberts<br \/><br \/>",
          "internal":"0",
          "date":"2012-09-17 21:54:23"
        },
        {
          "id":"21",
          "body":"Hey John<br><br>Hows it going?",
          "internal":"0",
          "date":"2013-03-13 13:50:24"
        },
        {
          "id":"22",
          "body":"Sure",
          "internal":"0",
          "date":"2013-03-20 16:06:07"
        },
        {
          "id":"23",
          "body":null,
          "internal":"0",
          "date":"2013-03-20 16:07:49"
        },
        {
          "id":"24",
          "body":"Testing Reply<br><br>How you doing<br><br>OK?",
          "internal":"0",
          "date":"2013-05-22 18:17:32"
        },
        {
          "id":"25",
          "body":"Test",
          "internal":"0",
          "date":"2013-05-31 17:32:11"
        }
      ]
    },
    "3":{
      "id":"3",
      "subject":"Question regarding order S10",
      "order":{
        "id":"10"
      },
      "customer":{
        "id":"3",
        "firstname":"Paul",
        "lastname":"Roberts"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "status":{
        "id":"2",
        "name":"Closed"
      },
      "priority":{
        "id":"1",
        "name":"LOW"
      },
      "date":{
        "created":"2012-02-27 17:58:00",
        "updated":"2012-02-27 17:58:00"
      },
      "message_count":3,
      "messages":[
        {
          "id":"17",
          "body":"",
          "internal":"0",
          "date":"2012-02-27 17:58:00"
        },
        {
          "id":"18",
          "body":"Type your message here..",
          "internal":"0",
          "date":"2012-05-21 13:41:04"
        },
        {
          "id":"19",
          "body":"Type your message here..",
          "internal":"0",
          "date":"2012-08-08 19:21:53"
        }
      ]
    },
    "2":{
      "id":"1",
      "subject":"Where my order",
      "order":{
        "id":null
      },
      "customer":{
        "id":"1",
        "firstname":"John",
        "lastname":"Smith"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "status":{
        "id":"2",
        "name":"Closed"
      },
      "priority":{
        "id":"1",
        "name":"LOW"
      },
      "date":{
        "created":"2012-02-02 11:00:04",
        "updated":"2012-02-10 15:28:09"
      },
      "message_count":6,
      "messages":[
        {
          "id":"11",
          "body":null,
          "internal":"0",
          "date":"2012-02-02 11:00:04"
        },
        {
          "id":"12",
          "body":null,
          "internal":"0",
          "date":"2012-02-02 11:04:07"
        },
        {
          "id":"13",
          "body":null,
          "internal":"0",
          "date":"2012-02-02 11:24:06"
        },
        {
          "id":"14",
          "body":"Yes,<br><br>We are working on it<br><br>",
          "internal":"0",
          "date":"2012-02-02 11:25:04"
        },
        {
          "id":"15",
          "body":"Yes<br><br>We are working on it<br><br>OK?<br><br>",
          "internal":"0",
          "date":"2012-02-09 12:56:11"
        },
        {
          "id":"16",
          "body":"OK COOL",
          "internal":"0",
          "date":"2012-02-10 15:28:09"
        }
      ]
    },
    "1":{
      "id":"1",
      "subject":"Question regarding order S6",
      "order":{
        "id":"6"
      },
      "customer":{
        "id":"1",
        "firstname":"John",
        "lastname":"Smith"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "status":{
        "id":"2",
        "name":"Closed"
      },
      "priority":{
        "id":"1",
        "name":"LOW"
      },
      "date":{
        "created":"2011-09-12 15:44:03",
        "updated":"2012-01-23 17:23:33"
      },
      "message_count":5,
      "messages":[
        {
          "id":"1",
          "body":"Testing",
          "internal":"0",
          "date":"2011-09-12 15:44:03"
        },
        {
          "id":"2",
          "body":"Testing Tickets",
          "internal":"0",
          "date":"2011-09-12 16:01:51"
        },
        {
          "id":"3",
          "body":"Type your message here..",
          "internal":"0",
          "date":"2011-09-14 13:31:49"
        },
        {
          "id":"4",
          "body":"Ok, thanks, can you send me just the normal itrm please.",
          "internal":"0",
          "date":"2011-09-28 18:41:08"
        },
        {
          "id":"5",
          "body":"Type your message here..",
          "internal":"0",
          "date":"2011-09-28 18:41:26"
        }
      ]
    }
  }
}

Retrieve the details for one Ticket

 

Call

GET /rest/ticket/{id}.json

Response

{
  "success":"1",
  "status":"Details for ticket id  1",
  "ticket":{
    "1":{
      "id":"1",
      "subject":"Question regarding order S6",
      "order":{
        "id":"6"
      },
      "customer":{
        "id":"1",
        "firstname":"John",
        "lastname":"Smith"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "status":{
        "id":"2",
        "name":"Closed"
      },
      "priority":{
        "id":"1",
        "name":"LOW"
      },
      "date":{
        "created":"2011-09-12 15:44:03",
        "updated":"2012-01-23 17:23:33"
      },
      "message_count":10,
      "messages":[
        {
          "id":"1",
          "body":"Testing",
          "internal":"0",
          "date":"2011-09-12 15:44:03"
        },
        {
          "id":"2",
          "body":"Testing Tickets",
          "internal":"0",
          "date":"2011-09-12 16:01:51"
        },
        {
          "id":"3",
          "body":"Type your message here..",
          "internal":"0",
          "date":"2011-09-14 13:31:49"
        },
        {
          "id":"4",
          "body":"Ok, thanks, can you send me just the normal itrm please.",
          "internal":"0",
          "date":"2011-09-28 18:41:08"
        },
        {
          "id":"5",
          "body":"Type your message here..",
          "internal":"0",
          "date":"2011-09-28 18:41:26"
        },
        {
          "id":"6",
          "body":"",
          "internal":"0",
          "date":"2011-12-29 01:24:54"
        },
        {
          "id":"7",
          "body":"testing",
          "internal":"0",
          "date":"2011-12-30 14:43:02"
        },
        {
          "id":"8",
          "body":"OK\r<br \/>\r<br \/>Kind Regards\r<br \/>\r<br \/>Paul Roberts\r<br \/>\r<br \/>Redbeck\r<br \/>Ecommerce Services\r<br \/>http:\/\/www.redbeck.com\r<br \/>T: 0333 1017 333\r<br \/>E: paul.roberts@redbeck.co.uk\r<br \/>\r<br \/>Looking for Website Support? Call us on 0871 223 5033\r<br \/>\r<br \/>-----Original Message-----\r<br \/>From: Instantcart Demo [mailto:tickets@demo.instantcart.com] \r<br \/>Sent: 30 December 2011 14:43\r<br \/>To: John Smith\r<br \/>Subject: Instantcart Demo [Support Ticket #1] Question regarding order S6\r<br \/>\r<br \/>\r<br \/>testing\r<br \/>\r<br \/>Kind Regards\r<br \/>\r<br \/>Administrator\r<br \/>\r<br \/>Instantcart Demo\r<br \/>http:\/\/demo.instantcart.com\r<br \/>\r<br \/>This email was sent in response to a support ticket sent to\r<br \/>tickets@demo.instantcart.com.\r<br \/>\r<br \/>This email relates to the subject: Question regarding order S6. To get the\r<br \/>full email history, please login to your account and click the My Messages\r<br \/>link. If you do not receive a response by email to your reply, we\r<br \/>recommended checking your online account message history under My Messages.<br \/><br \/>",
          "internal":"0",
          "date":"2011-12-30 14:43:12"
        },
        {
          "id":"9",
          "body":"Any News?\r<br \/>\r<br \/>Kind Regards\r<br \/>\r<br \/>Paul Roberts\r<br \/>\r<br \/>Redbeck\r<br \/>Ecommerce Services\r<br \/>http:\/\/www.redbeck.com\r<br \/>T: 0333 1017 333\r<br \/>E: paul.roberts@redbeck.co.uk\r<br \/>\r<br \/>Looking for Website Support? Call us on 0871 223 5033\r<br \/>\r<br \/>\r<br \/>-----Original Message-----\r<br \/>From: Instantcart Demo [mailto:tickets@demo.instantcart.com] \r<br \/>Sent: 30 December 2011 14:43\r<br \/>To: John Smith\r<br \/>Subject: Instantcart Demo [Support Ticket #1] Question regarding order S6\r<br \/>\r<br \/>\r<br \/>testing\r<br \/>\r<br \/>Kind Regards\r<br \/>\r<br \/>Administrator\r<br \/>\r<br \/>Instantcart Demo\r<br \/>http:\/\/demo.instantcart.com\r<br \/>\r<br \/>This email was sent in response to a support ticket sent to\r<br \/>tickets@demo.instantcart.com.\r<br \/>\r<br \/>This email relates to the subject: Question regarding order S6. To get the\r<br \/>full email history, please login to your account and click the My Messages\r<br \/>link. If you do not receive a response by email to your reply, we\r<br \/>recommended checking your online account message history under My Messages.<br \/><br \/>",
          "internal":"0",
          "date":"2011-12-30 14:46:55"
        },
        {
          "id":"10",
          "body":"test",
          "internal":"0",
          "date":"2012-01-23 17:23:33"
        }
      ]
    }
  }
}

Retrieve the Messages for a Ticket

 

URL Query Parameters

  • limit - default: 20 - Number or results per page
  • page - default: 1 - Page number
  • get_all_results - default: false

Call

GET /rest/ticket/{id}/messages.json

Response

{
  "success":"1",
  "status":"Messages successfully retrieved",
  "messages":{
    "16":{
      "id":"16",
      "body":"OK COOL",
      "internal":"0",
      "date":{
        "date_created":"2012-02-10 15:28:09"
      },
      "admin_user":{
        "id":"1",
        "name":null
      },
      "customer":{
        "id":"0",
        "email":"test@null.co.uk",
        "firstname":"John",
        "lastname":"Smith"
      }
    },
    "15":{
      "id":"15",
      "body":"Yes<br><br>We are working on it<br><br>OK?<br><br>",
      "internal":"0",
      "date":{
        "date_created":"2012-02-09 12:56:11"
      },
      "admin_user":{
        "id":"1",
        "name":null
      },
      "customer":{
        "id":"0",
        "email":"test@null.co.uk",
        "firstname":"John",
        "lastname":"Smith"
      }
    },
    "14":{
      "id":"14",
      "body":"Yes,<br><br>We are working on it<br><br>",
      "internal":"0",
      "date":{
        "date_created":"2012-02-02 11:25:04"
      },
      "admin_user":{
        "id":"1",
        "name":null
      },
      "customer":{
        "id":"0",
        "email":"test@null.co.uk",
        "firstname":"John",
        "lastname":"Smith"
      }
    },
    "13":{
      "id":"13",
      "body":null,
      "internal":"0",
      "date":{
        "date_created":"2012-02-02 11:24:06"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "customer":{
        "id":"1",
        "email":"test@null.co.uk",
        "firstname":"John",
        "lastname":"Smith"
      }
    },
    "12":{
      "id":"12",
      "body":null,
      "internal":"0",
      "date":{
        "date_created":"2012-02-02 11:04:07"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "customer":{
        "id":"1",
        "email":"test@null.co.uk",
        "firstname":"John",
        "lastname":"Smith"
      }
    },
    "11":{
      "id":"11",
      "body":null,
      "internal":"0",
      "date":{
        "date_created":"2012-02-02 11:00:04"
      },
      "admin_user":{
        "id":"0",
        "name":null
      },
      "customer":{
        "id":"1",
        "email":"test@null.co.uk",
        "firstname":"John",
        "lastname":"Smith"
      }
    }
  }
}
Have more questions? Submit a request

Comments

Powered by Zendesk