Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 7b0a220

Browse files
committed
document ticket endpoints
1 parent c3001fd commit 7b0a220

File tree

5 files changed

+520
-0
lines changed

5 files changed

+520
-0
lines changed

apiary.apib

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,9 @@ We list all backwards-compatible additions here. These are currently available i
432432
- We added `project_id` to the `tasks.create` endpoint.
433433
- We added the `users.listDaysOff` and `dayOffTypes.list` endpoints.
434434
- We added `email_verification_status` to `users.me`.
435+
- We added ticket endpoints `tickets.list`, `tickets.info`, `tickets.create` and `tickets.update`.
436+
- We added endpoints for ticket messages `tickets.listMessages` and `tickets.getMessage`.
437+
- We added the `ticketStatus.list` endpoint.
435438

436439
#### December 2023
437440
- The `dealPhases.list` endpoint can now filter phases by pipeline id.
@@ -8105,6 +8108,262 @@ Update the current timer. Only possible if there is a timer running.
81058108

81068109
+ Response 204
81078110

8111+
# Group Tickets
8112+
8113+
## Tickets [/tickets]
8114+
8115+
*Required scopes: `tickets`*
8116+
8117+
### tickets.list [POST /tickets.list]
8118+
8119+
Get a list of tickets.
8120+
8121+
+ Request (application/json)
8122+
8123+
+ Attributes (object)
8124+
+ filter (object, optional)
8125+
+ ids: `8607faa8-3d2e-0a66-a71e-e69f447a2ed1`, `21467288-3baa-0027-a910-cd952030dbc2` (array[string], optional)
8126+
+ relates_to (object, optional) - Only lists tickets related to given type.
8127+
+ type (enum, required)
8128+
+ Members
8129+
+ contact
8130+
+ company
8131+
+ id: `2659dc4d-444b-4ced-b51c-b87591f604d7` (string, required)
8132+
+ exclude (object, optional)
8133+
+ status_ids: `a344c251-2494-0013-b433-ccee8e8435e6`, `c11dc02c-3556-0daf-8035-c5b0376eb928` (array[string], optional)
8134+
+ page (Page, optional)
8135+
8136+
+ Response 200 (application/json)
8137+
8138+
+ Attributes (object)
8139+
+ data (array)
8140+
+ (object)
8141+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8142+
+ subject (string)
8143+
+ status (object)
8144+
+ type: `ticketStatus` (string)
8145+
+ id: `aba0ad66-bf59-49fa-b546-45dcbc5e7e6e` (string)
8146+
+ assignee (object, nullable) - Null if unassigned
8147+
+ type: `user` (string)
8148+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8149+
+ created_at: `2017-05-09T11:25:11+00:00` (string)
8150+
+ customer (object)
8151+
+ type: `contact` (enum)
8152+
+ Members
8153+
+ company
8154+
+ contact
8155+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8156+
+ participant (object, nullable)
8157+
+ customer (object)
8158+
+ type: `company` (string)
8159+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8160+
+ last_message_at: `2017-05-09T11:25:11+00:00` (string, nullable)
8161+
8162+
### tickets.info [POST /tickets.info]
8163+
8164+
Get details for a single ticket.
8165+
8166+
+ Request (application/json)
8167+
+ Attributes (object)
8168+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8169+
8170+
+ Response 200 (application/json)
8171+
+ Attributes (object)
8172+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8173+
+ subject (string)
8174+
+ status (object)
8175+
+ type: `ticketStatus` (string)
8176+
+ id: `aba0ad66-bf59-49fa-b546-45dcbc5e7e6e` (string)
8177+
+ assignee (object, nullable) - Null if unassigned
8178+
+ type: `user` (string)
8179+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8180+
+ created_at: `2017-05-09T11:25:11+00:00` (string)
8181+
+ closed_at: `2017-05-09T11:25:11+00:00` (string, nullable)
8182+
+ customer (object)
8183+
+ type: `contact` (enum)
8184+
+ Members
8185+
+ company
8186+
+ contact
8187+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8188+
+ participant (object, nullable)
8189+
+ customer (object)
8190+
+ type: `company` (string)
8191+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8192+
+ last_message_at: `2017-05-09T11:25:11+00:00` (string, nullable)
8193+
+ description: `My ticket details` (string)
8194+
+ custom_fields (array[CustomField])
8195+
8196+
8197+
### tickets.create [POST /tickets.create]
8198+
8199+
Create a ticket.
8200+
8201+
+ Request (application/json)
8202+
+ Attributes (object)
8203+
+ subject: `My ticket subject` (string, required)
8204+
+ customer (object, required)
8205+
+ type: `company` (enum[string], required)
8206+
+ Members
8207+
+ contact
8208+
+ company
8209+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string, required)
8210+
+ ticket_status_id: `46156648-87c6-478d-8aa7-1dc3a00dacab` (string, required)
8211+
+ assignee (object, optional)
8212+
+ type (enum[string], required)
8213+
+ Members
8214+
+ `user`
8215+
+ id: `98b2863e-7b01-4232-82f5-ede1f0b9db22` (string, required)
8216+
+ custom_fields (array[CustomFieldValue], optional)
8217+
+ description: `My ticket details` (string, optional) - Uses Markdown formatting
8218+
+ participant (object, optional)
8219+
+ customer (object, required)
8220+
+ type (enum, required)
8221+
+ Members
8222+
+ `company`
8223+
+ id: `2659dc4d-444b-4ced-b51c-b87591f604d7` (string, required)
8224+
8225+
+ Response 201 (application/json)
8226+
8227+
+ Attributes (object)
8228+
+ data (object)
8229+
+ type: `ticket` (string)
8230+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8231+
8232+
8233+
### tickets.update [POST /tickets.update]
8234+
8235+
Update a ticket.
8236+
8237+
+ Request (application/json)
8238+
+ Attributes (object)
8239+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string, required)
8240+
+ subject: `My ticket subject` (string, optional)
8241+
+ description: `My ticket details` (string, optional) - Uses Markdown formatting
8242+
+ ticket_status_id: `46156648-87c6-478d-8aa7-1dc3a00dacab` (string, optional)
8243+
+ customer (object, optional)
8244+
+ type: `company` (enum[string], required)
8245+
+ Members
8246+
+ contact
8247+
+ company
8248+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string, required)
8249+
+ assignee (object, optional, nullable)
8250+
+ type (enum[string], required)
8251+
+ Members
8252+
+ `user`
8253+
+ id: `98b2863e-7b01-4232-82f5-ede1f0b9db22` (string, required)
8254+
+ participant (object, optional, nullable)
8255+
+ customer (object, required, nullable)
8256+
+ type (enum, required)
8257+
+ Members
8258+
+ `company`
8259+
+ id: `2659dc4d-444b-4ced-b51c-b87591f604d7` (string, required)
8260+
+ custom_fields (array[CustomFieldValue], optional)
8261+
8262+
+ Response 204
8263+
8264+
8265+
### tickets.listMessages [POST /tickets.listMessages]
8266+
8267+
Lists messages of a ticket
8268+
8269+
+ Request (application/json)
8270+
+ Attributes (object)
8271+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8272+
+ filter (object, optional)
8273+
+ type: `customer` (enum, optional)
8274+
+ Members
8275+
+ customer
8276+
+ internal
8277+
+ thirdParty
8278+
+ created_before: `2024-02-01T18:00:00+00:00` (string, optional)
8279+
+ created_after: `2024-01-01T18:00:00+00:00` (string, optional)
8280+
+ page (Page, optional)
8281+
8282+
+ Response 200 (application/json)
8283+
+ Attributes (object)
8284+
+ data (array)
8285+
+ (object)
8286+
+ message_id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8287+
+ body: `<p>This is a message</p>` (string) - Uses HTML formatting
8288+
+ type: `customer` (enum, optional)
8289+
+ Members
8290+
+ customer
8291+
+ internal
8292+
+ thirdParty
8293+
+ created_at: `2017-05-09T11:25:11+00:00` (string)
8294+
+ sent_by (object)
8295+
+ type: `contact` (enum)
8296+
+ Members
8297+
+ company
8298+
+ contact
8299+
+ user
8300+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8301+
+ attachments (array)
8302+
+ (object)
8303+
+ `type`: `file` (string)
8304+
+ `id`: `0686d0da-1797-475b-ae94-27191b2eca4d` (string)
8305+
+ meta (object) - Only included with request parameter `includes=pagination`
8306+
+ page (Pagination)
8307+
+ matches: `12` (number)
8308+
8309+
8310+
### tickets.getMessage [POST /tickets.getMessage]
8311+
8312+
Gets the ticket message.
8313+
8314+
+ Request (application/json)
8315+
+ Attributes (object)
8316+
+ message_id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8317+
8318+
+ Response 200 (application/json)
8319+
+ Attributes (object)
8320+
+ message_id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8321+
+ body: `<p>This is a message</p>` (string) - Uses HTML formatting
8322+
+ raw_body: `<p>This is a message</p>` (string)- Uses HTML formatting
8323+
+ created_at: `2017-05-09T11:25:11+00:00` (string)
8324+
+ sent_by (object)
8325+
+ type: `contact` (enum)
8326+
+ Members
8327+
+ company
8328+
+ contact
8329+
+ user
8330+
+ id: `f29abf48-337d-44b4-aad4-585f5277a456` (string)
8331+
+ attachments (array)
8332+
+ (object)
8333+
+ `type`: `file` (string)
8334+
+ `id`: `0686d0da-1797-475b-ae94-27191b2eca4d` (string)
8335+
+ type: `customer` (enum)
8336+
+ Members
8337+
+ customer
8338+
+ internal
8339+
+ thirdParty
8340+
8341+
## Ticket Status [/ticketStatus]
8342+
8343+
### ticketStatus.list [POST /ticketStatus.list]
8344+
8345+
Get a list of ticket statuses.
8346+
8347+
+ Request (application/json)
8348+
+ Attributes (object)
8349+
+ filter (object, optional)
8350+
+ ids: `46156648-87c6-478d-8aa7-1dc3a00dacab`, `46156648-87c6-478d-8aa7-1dc3a00daca4` (array[string], optional)
8351+
8352+
+ Response 200 (application/json)
8353+
+ Attributes (object)
8354+
+ data (array)
8355+
+ (object)
8356+
+ `id`: `46156648-87c6-478d-8aa7-1dc3a00dacab` (string)
8357+
+ `status`: `new` (enum)
8358+
+ Members
8359+
+ `new`
8360+
+ `open`
8361+
+ `waiting_for_client`
8362+
+ `escalated_thirdparty`
8363+
+ `closed`
8364+
+ `custom`
8365+
+ `label`: `Custom Label` (string) - Only available for `custom` type of status.
8366+
81088367
# Group Files
81098368

81108369
## Files [/files]

src/12-tickets/ticket-status.apib

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Ticket Status [/ticketStatus]
2+
3+
### ticketStatus.list [POST /ticketStatus.list]
4+
5+
Get a list of ticket statuses.
6+
7+
+ Request (application/json)
8+
+ Attributes (object)
9+
+ filter (object, optional)
10+
+ ids: `46156648-87c6-478d-8aa7-1dc3a00dacab`, `46156648-87c6-478d-8aa7-1dc3a00daca4` (array[string], optional)
11+
12+
+ Response 200 (application/json)
13+
+ Attributes (object)
14+
+ data (array)
15+
+ (object)
16+
+ `id`: `46156648-87c6-478d-8aa7-1dc3a00dacab` (string)
17+
+ `status`: `new` (enum)
18+
+ Members
19+
+ `new`
20+
+ `open`
21+
+ `waiting_for_client`
22+
+ `escalated_thirdparty`
23+
+ `closed`
24+
+ `custom`
25+
+ `label`: `Custom Label` (string) - Only available for `custom` type of status.

0 commit comments

Comments
 (0)