Recent searches


No recent searches

Ken McCartney's Avatar

Ken McCartney

Joined Jan 20, 2023

·

Last activity Jan 20, 2023

Following

0

Followers

0

Total activity

2

Votes

0

Subscription

1

ACTIVITY OVERVIEW

Latest activity by Ken McCartney

Ken McCartney created a post,

Post Developer - Zendesk APIs

Hey everyone!  I'm migrating some tickets to Zendesk, and using the imports/tickets endpoint.

I have uploaded some files that go along with the tickets, but when I try to create comments on my tickets, it claims that the uploads parameter is invalid for comments.  Here's a sample call:

    {
        "ticket": {
            "external_id": "x",
            "assignee_id": "x",
            "created_at": "2022-11-22T18:49:21Z",
            "subject": "Zendesk Merge Test Ticket:   Webform 3 with attachment",
            "description": "",
            "priority": "",
            "status": "open",
            "group_id": "x",
            "ticket_form_id": "x",
            "brand_id": "x",
            "requester_id": "x",
            "tags": [
                "no_verification_needed",
                "other/unknown",
                "other_call_back_request",
                "pre-application_help",
                "sms_verified_-_no_further_client_verification_needed"
            ],
            "custom_fields": {
                "request": {
                    "custom_fields": {
                        "id": x,
                        "value": "x"
                    }
                }
            },
            "comments": [
                {
                    "author_id": "x",
                    "created_at": "2022-11-22T18:49:21Z",
                    "body": "Original Comment."
                },
                {
                    "author_id": "x",
                    "created_at": "2023-01-04T15:13:54Z",
                    "body": "comment with 1 attachment",
                    "uploads": [
                        "zmxrhTsTvLJPmn7dVShufkoTA"
                    ]
                },
                {
                    "author_id": "x",
                    "created_at": "2023-01-08T06:38:05Z",
                    "body": "Testing multiple files.",
                    "uploads": [
                        "6kbSPIUHaDofksZBvznJRWlK1",
                        "qfhDkaNCVAwPN7Nnxc1an8vFw"
                    ]
                }
            ]
        }
    }

And here is the response:

    {
        "error": "RecordInvalid",
        "description": "Record validation errors",
        "details": {
            "uploads": [
                {
                    "description": "Uploads is invalid",
                    "error": "InvalidValue"
                }
            ]
        }
    }

Can I assume then, that I cannot attach uploads to comments as part of the import api?

If so, are there restrictions on adding comments (with uploads) to closed tickets?

If I update a ticket multiple times with {"ticket" : {"comment" : {"body":"x"},"uploads":["x":"y"], "author_id" : "x", "created_at" : date}} will it keep creating new comments?

Thanks!!

 

Posted Jan 20, 2023 · Ken McCartney

0

Followers

9

Votes

7

Comments