Sha256: ce18342a20a617f8be087543b65f67186018e4fe73e77660d36c5a5f0053fef6

Contents?: true

Size: 1.77 KB

Versions: 53

Compression:

Stored size: 1.77 KB

Contents

## Ticket Import

This end-point is for bulk importing tickets. It will allow you to move data from legacy systems into Zendesk. We do not run triggers or the likes during bulk imports like these.

### Ticket Import
`POST /api/v2/imports/tickets.json`

#### Allowed For

 * Admins

#### Request Parameters

 * ticket: a hash holding the parameters for the ticket

```js
{
  "ticket": {
    "requester_id": 827,
    "assignee_id": 19,
    "subject": "Some subject",
    "description": "A description",
    "tags": [ "foo", "bar" ],
    "comments": [
      { "author_id": 827, "value": "This is a comment", "created_at": "2009-06-25T10:15:18Z" },
      { "author_id": 19, "value": "This is a private comment", "public": false }
    ]
  }
}
```

In addition to the parameters that we generally accept for a ticket, the import also allows
you to set the following time stamps on the ticket being imported: `solved_at`, `updated_at`, `created_at`

Handling attachments is done the same way as in the regular tickets API, you upload the files first
and supply the token needed in the comment parameters.

No triggers will be run on tickets imported in this fashion and hence there will not be any detailed
ticket metrics to report on for these kinds of tickets. We recommend you set a tag to signify that these
tickets were added to Zendesk using bulk import.

#### Using curl

```bash
curl https://{subdomain}.zendesk.com/api/v2/imports/tickets.json \
  -v -u {email_address}:{password} -X POST
  -d '{"ticket": {"subject": "Help", "comments": [{ "author_id": 19, "value": "This is a comment" }]}}'
```

#### Example Response

```http
Status: 201 Created
Location: https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json

{
  "ticket": {
    {
      "id":      35436,
      "subject": "Help",
      ...
    }
  }
}
```

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
zendesk_api-0.3.7 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.3.6 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.3.5 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.3.4 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.3.3 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.3.2 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.3.1 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.3.0 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.2.6 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.2.5 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.2.4 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.2.2 lib/zendesk_api/server/docs/ticket_import.md
zendesk_api-0.2.1 lib/zendesk_api/server/docs/ticket_import.md