Last active
February 18, 2016 16:38
-
-
Save syastrebov/a6450ce34e511a892761 to your computer and use it in GitHub Desktop.
New ticket form simple docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"attachments": [ | |
{"blob_auth": "AAAAAAAAAAAAAAAAAA"}, | |
{"blob_auth": "BBBBBBBBBBBBBBBBBB", "is_inline": true} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"person": { | |
"name": "Changed Name" | |
}, | |
"subject": "Modified subject", | |
"department": 2, | |
"product": 2, | |
"priority": 3, | |
"cc": ["agent@deskpro.dev", "user@deskpro.dev"], | |
"labels": ["ticket label 1", "ticket label 2"], | |
"fields": { | |
"1": "2", | |
"5": "2016-02-09 17:28:00", | |
"6": "inline text", | |
"7": "textarea text", | |
"8": ["10", "11"] | |
}, | |
"user_fields": { | |
"1": "2", | |
"5": "2016-02-09 17:28:00", | |
"6": "inline text", | |
"7": "textarea text" | |
}, | |
"organization_fields": { | |
"1": "2", | |
"5": "2016-02-09 17:28:00", | |
"6": "inline text", | |
"7": "textarea text" | |
}, | |
"message": { | |
"message": "my text message", | |
"format": "text" | |
}, | |
"attachments": [ | |
{"blob_auth": "AAAAAAAAAAAAAAAAAA"}, | |
{"blob_auth": "BBBBBBBBBBBBBBBBBB", "is_inline": true} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"id": 5, | |
"ref": "TPDI-0173-OXYX", | |
"auth": "8HRKHZRAD5SR4TP", | |
"parent_ticket": null, | |
"language": null, | |
"department": 2, | |
"category": null, | |
"priority": 3, | |
"workflow": null, | |
"product": 2, | |
"person": 1, | |
"person_email": "admin@deskpro.dev", | |
"agent": null, | |
"agent_team": null, | |
"organization": 1, | |
"linked_chat": null, | |
"email_account": null, | |
"email_account_address": "", | |
"creation_system": "unknown", | |
"creation_system_option": "", | |
"ticket_hash": "none", | |
"status": "awaiting_agent", | |
"hidden_status": null, | |
"is_hold": false, | |
"urgency": 1, | |
"feedback_rating": null, | |
"date_feedback_rating": null, | |
"date_created": "2016-02-08T13:42:22+0000", | |
"date_resolved": null, | |
"date_archived": null, | |
"date_first_agent_assign": null, | |
"date_first_agent_reply": "2016-02-08T13:42:23+0000", | |
"date_last_agent_reply": "2016-02-08T13:42:23+0000", | |
"date_last_user_reply": "2016-02-08T13:42:22+0000", | |
"date_agent_waiting": null, | |
"date_user_waiting": null, | |
"date_status": "2016-02-08T13:42:22+0000", | |
"total_user_waiting": 0, | |
"total_to_first_reply": 1, | |
"locked_by_agent": null, | |
"date_locked": null, | |
"has_attachments": true, | |
"subject": "Modified subject", | |
"original_subject": "Sample Ticket", | |
"properties": null, | |
"problems": [], | |
"count_agent_replies": 1, | |
"count_user_replies": 0, | |
"worst_sla_status": null, | |
"waiting_times": null, | |
"ticket_slas": [], | |
"sent_to_address": [], | |
"fields": { | |
"1": { | |
"value": [ | |
2 | |
], | |
"detail": { | |
"1": { | |
"id": 1, | |
"title": "Desired Sizes" | |
} | |
} | |
}, | |
"5": { | |
"value": "2016-02-09T17:28:00+0000" | |
}, | |
"6": { | |
"value": "inline text" | |
}, | |
"7": { | |
"value": "textarea text" | |
} | |
}, | |
"labels": [ | |
"ticket label 1", | |
"ticket label 2" | |
], | |
"participants": [ | |
3 | |
], | |
"followers": [ | |
2 | |
], | |
"child_tickets": [], | |
"sibling_tickets": [] | |
}, | |
"meta": [], | |
"linked": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"message": { | |
"message": "<p>my html message</p>", | |
"format": "html" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"person": "unknown-email@deskpro.dev" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"person": 2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"person": { | |
"email": "new-user@deskpro.dev", | |
"name": "Some NewUser" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"message": { | |
"message": "my text message", | |
"format": "text" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status": 400, | |
"code": "invalid_input", | |
"message": "Request input is invalid.", | |
"errors": { | |
"fields": { | |
"subject": { | |
"errors": [ | |
{ | |
"code": "This value should not be null.", | |
"message": "This value should not be null." | |
} | |
] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The new ticket form has custom department layouts and number of field types that you can customize in the admin interface. So POST /api/v2/ticket_forms/{context} endpoint params depend on which department you will pass in the request. I reused the existing ticket form type class from the portal (/new-ticket) so the api works the same way as in the portal with the same form structure for now. It has some odd parts which i think should be discussed and improved in future.
{fields: {"1": "2"}}
or if multiple values:
{fields: {"2": ["2", "3"]}}
{fields: {"3": "2016-02-09 17:28:00"}
{fields: {"4": "inline text"}