Using Zendesk API/SDK for basic ticket management tasks

Zendesk has a well-documented REST-ful API for interations with its apps which can be used to relpicate all sorts of ticket management functionality. There is also an API wrapper released for all major languages. It also has a PHP version. But none of these clients have a thorough documentation like the original API.
And if you find the need to work with the SDK then you have to map the required methods from original API to the SDK which is a tedious task.
Now, following section shows how i managed to use basic Zendesk functionality through SDK:

Connecting to Zendesk API:

Getting tickets submitted by a user through Search API:

It will return 100 results per page/call with a total number of records and next page parameter.

Getting tickets submitted by a user through Tickets API:

Saving ticket:

The first comment is credited to the user whose ID is submitted as submitter_id. Also you can save custom fields as shown above.

Add or update ticket/comment:

Here id is the ticket ID.

Creating a new Zendesk user:

The verified parameter makes sure that Zendesk does not send the activation email to the user and is readily registered without email confirmation.

Finding a ticket:

Getting all comments for a ticket:

alexey

Application developer, movie buff, occasional reader and a huge Manchester United fan.
alexey

Application developer, movie buff, occasional reader and a huge Manchester United fan.