Tickets
Tickets track a request for help or service raised by a contact of a company, from creation through assignment, workflow transitions and service-level tracking.
The Ticket Model
A request for help or service raised by a contact of a company. Fields marked read-only are kept by the server.
Scheme
- Name
id- Type
- integer
- Description
- Unique identifier
- Name
companyId- Type
- integer required
- Description
- The company the ticket belongs to. Cannot be changed
- Name
branchId- Type
- integer
- Description
- The branch it concerns, or 0
- Name
contactId- Type
- integer
- Description
- The contact who raised it, or 0
- Name
categoryId- Type
- integer
- Description
- Its category, or 0
- Name
priorityId- Type
- integer
- Description
- Its priority; filled in when 0 on creation
- Name
statusId- Type
- integer
- Description
- Its status; the first status of kind new when 0 on creation
- Name
teamId- Type
- integer
- Description
- The team handling it, or 0
- Name
assigneeId- Type
- integer
- Description
- The user handling it, or 0. Must see the company and, with a team, be in it
- Name
title- Type
- string required
- Description
- One-line summary. Required
- Name
description- Type
- string
- Description
- The request in full
- Name
channel- Type
- string
- Description
- Where it came from, for example agent, portal, email, telegram. Fixed once created; defaults to agent
- Name
externalId- Type
- string
- Description
- The id of the message in the channel. Fixed once created; one ticket per channel and externalId
- Name
latitude- Type
- number (double)
- Description
- Place of the request, with longitude; both 0 when there is none
- Name
longitude- Type
- number (double)
- Description
- Place of the request
- Name
created- Type
- object
- Description
- When it was raised
- Name
updated- Type
- object
- Description
- When it last changed, including comments and service-level events
- Name
firstRespondedAt- Type
- object
- Description
- First public comment by a user (or the resolution, if never answered)
- Name
resolvedAt- Type
- object
- Description
- When it was resolved; cleared when reopened
- Name
closedAt- Type
- object
- Description
- When it was closed or cancelled
- Name
dueFirstResponse- Type
- object
- Description
- From the priority, on its calendar
- Name
dueResolution- Type
- object
- Description
- From the priority, on its calendar
- Name
slaPausedAt- Type
- object
- Description
- Set while the ticket is on hold
- Name
scheduledStart- Type
- object
- Description
- When an agent is due to work on it
- Name
scheduledEnd- Type
- object
- Description
- When that work is due to end
- Name
attributes- Type
- object
- Description
- Tags, form answers and other free-form data. The server keeps the _sla_ key (service-level flags)
The Ticket Event Model
One entry in a ticket history.
Scheme
- Name
id- Type
- integer
- Description
- Event identifier
- Name
ticketId- Type
- integer
- Description
- The ticket
- Name
type- Type
- string
- Description
- What happened
- Name
authorType- Type
- string
- Description
- user, or system for what the server did
- Name
authorId- Type
- integer
- Description
- The user who did it, or 0 for the system
- Name
eventTime- Type
- string <date-time>
- Description
- When it happened
- Name
body- Type
- string
- Description
- The text of a comment
- Name
attributes- Type
- object
- Description
- Details: _from_ and _to_ of a status or priority change, the assignee and team before and after, the _clock_ and _due_ of a service-level event
The Ticket Comment Model
Scheme
- Name
body- Type
- string required
- Description
- The text. Required
- Name
internal- Type
- boolean
- Description
- true for a note only the agents see; it does not count as a response
The Ticket Transition Model
Scheme
- Name
statusId- Type
- integer required
- Description
- The status to move to
- Name
comment- Type
- string
- Description
- Optional public comment added with the move
The Ticket Assignment Model
Scheme
- Name
assigneeId- Type
- object
- Description
- The user to assign, 0 to clear, or leave out to keep
- Name
teamId- Type
- object
- Description
- The team to assign, 0 to clear, or leave out to keep
The Ticket SLA Model
Where a ticket stands against its service levels.
Scheme
- Name
firstResponse- Type
- object
- Description
- The first-response clock
- Name
resolution- Type
- object
- Description
- The resolution clock
- Name
overall- Type
- string
- Description
- The worse of the two states, in the order NONE, MET, ON_TIME, PAUSED, AT_RISK, MISSED, BREACHED
- Name
paused- Type
- boolean
- Description
- Whether the ticket is on hold, which stops both clocks
Fetch a list of Tickets
Tickets of the companies the user can see, most recently updated first.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Query Parameters
- Name
companyId- Type
- integer
- Description
- Only records of this company
- Name
branchId- Type
- integer
- Description
- Tickets of this branch
- Name
contactId- Type
- integer
- Description
- Tickets raised by this contact
- Name
categoryId- Type
- integer
- Description
- Tickets of this category
- Name
priorityId- Type
- integer
- Description
- Tickets with this priority
- Name
statusId- Type
- integer
- Description
- Tickets in this status
- Name
teamId- Type
- integer
- Description
- Tickets of this team
- Name
assigneeId- Type
- integer
- Description
- Tickets assigned to this user
- Name
open- Type
- boolean
- Description
- true: tickets not yet resolved, closed or cancelled. false: the others
- Name
sla- Type
- string
- Description
- Tickets whose overall service-level state (the worse of the two clocks) is this
- Name
since- Type
- string <date-time>
- Description
- Only tickets changed at or after this instant, for syncing a mobile app
- Name
keyword- Type
- string
- Description
- Search keyword filter (title and description)
- Name
limit- Type
- integer
- Description
- Limit the number of returned results
- Name
offset- Type
- integer
- Description
- Offset for pagination
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- Ticket
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location 'https://gw.onemap8.com/api/tickets?companyId=<integer>&branchId=<integer>&contactId=<integer>&categoryId=<integer>&priorityId=<integer>&statusId=<integer>&teamId=<integer>&assigneeId=<integer>&open=<boolean>&sla=<string>&since=<date-time>&keyword=<string>&limit=<integer>&offset=<integer>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
[
{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"created": "<date-time>",
"updated": "<date-time>",
"firstRespondedAt": "<date-time>",
"resolvedAt": "<date-time>",
"closedAt": "<date-time>",
"dueFirstResponse": "<date-time>",
"dueResolution": "<date-time>",
"slaPausedAt": "<date-time>",
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}
]
Create a Ticket
The server fills in what is missing: the first status of kind new, the category priority (else the middle priority) and team, channel agent, the due dates from the priority, and the timestamps. The company needs ticket statuses first (see POST /tickets/defaults). A ticket for a (channel, externalId) that already has one is rejected, so channel adapters can retry safely.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Request body schema
- Name
application/json- Type
- schema
- Description
Body schema
- Name
id- Type
- integer
- Description
- Unique identifier
- Name
companyId- Type
- integer required
- Description
- The company the ticket belongs to. Cannot be changed
- Name
branchId- Type
- integer
- Description
- The branch it concerns, or 0
- Name
contactId- Type
- integer
- Description
- The contact who raised it, or 0
- Name
categoryId- Type
- integer
- Description
- Its category, or 0
- Name
priorityId- Type
- integer
- Description
- Its priority; filled in when 0 on creation
- Name
statusId- Type
- integer
- Description
- Its status; the first status of kind new when 0 on creation
- Name
teamId- Type
- integer
- Description
- The team handling it, or 0
- Name
assigneeId- Type
- integer
- Description
- The user handling it, or 0. Must see the company and, with a team, be in it
- Name
title- Type
- string required
- Description
- One-line summary. Required
- Name
description- Type
- string
- Description
- The request in full
- Name
channel- Type
- string
- Description
- Where it came from, for example agent, portal, email, telegram. Fixed once created; defaults to agent
- Name
externalId- Type
- string
- Description
- The id of the message in the channel. Fixed once created; one ticket per channel and externalId
- Name
latitude- Type
- number (double)
- Description
- Place of the request, with longitude; both 0 when there is none
- Name
longitude- Type
- number (double)
- Description
- Place of the request
- Name
created- Type
- object
- Description
- When it was raised
- Name
updated- Type
- object
- Description
- When it last changed, including comments and service-level events
- Name
firstRespondedAt- Type
- object
- Description
- First public comment by a user (or the resolution, if never answered)
- Name
resolvedAt- Type
- object
- Description
- When it was resolved; cleared when reopened
- Name
closedAt- Type
- object
- Description
- When it was closed or cancelled
- Name
dueFirstResponse- Type
- object
- Description
- From the priority, on its calendar
- Name
dueResolution- Type
- object
- Description
- From the priority, on its calendar
- Name
slaPausedAt- Type
- object
- Description
- Set while the ticket is on hold
- Name
scheduledStart- Type
- object
- Description
- When an agent is due to work on it
- Name
scheduledEnd- Type
- object
- Description
- When that work is due to end
- Name
attributes- Type
- object
- Description
- Tags, form answers and other free-form data. The server keeps the _sla_ key (service-level flags)
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- Ticket
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location --request POST 'https://gw.onemap8.com/api/tickets' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}'
Response
{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"created": "<date-time>",
"updated": "<date-time>",
"firstRespondedAt": "<date-time>",
"resolvedAt": "<date-time>",
"closedAt": "<date-time>",
"dueFirstResponse": "<date-time>",
"dueResolution": "<date-time>",
"slaPausedAt": "<date-time>",
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}
Fetch a Ticket
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- Ticket
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
- Name
404- Type
- error
- Description
- Not found
Request
curl --location 'https://gw.onemap8.com/api/tickets/<integer>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"created": "<date-time>",
"updated": "<date-time>",
"firstRespondedAt": "<date-time>",
"resolvedAt": "<date-time>",
"closedAt": "<date-time>",
"dueFirstResponse": "<date-time>",
"dueResolution": "<date-time>",
"slaPausedAt": "<date-time>",
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}
Update a Ticket
The id in the body must be the id in the path. The server keeps created, channel, externalId, the response and resolution timestamps and the due dates whatever is sent. A status change must follow the workflow of the status the ticket is in.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Request body schema
- Name
application/json- Type
- schema
- Description
Body schema
- Name
id- Type
- integer
- Description
- Unique identifier
- Name
companyId- Type
- integer required
- Description
- The company the ticket belongs to. Cannot be changed
- Name
branchId- Type
- integer
- Description
- The branch it concerns, or 0
- Name
contactId- Type
- integer
- Description
- The contact who raised it, or 0
- Name
categoryId- Type
- integer
- Description
- Its category, or 0
- Name
priorityId- Type
- integer
- Description
- Its priority; filled in when 0 on creation
- Name
statusId- Type
- integer
- Description
- Its status; the first status of kind new when 0 on creation
- Name
teamId- Type
- integer
- Description
- The team handling it, or 0
- Name
assigneeId- Type
- integer
- Description
- The user handling it, or 0. Must see the company and, with a team, be in it
- Name
title- Type
- string required
- Description
- One-line summary. Required
- Name
description- Type
- string
- Description
- The request in full
- Name
channel- Type
- string
- Description
- Where it came from, for example agent, portal, email, telegram. Fixed once created; defaults to agent
- Name
externalId- Type
- string
- Description
- The id of the message in the channel. Fixed once created; one ticket per channel and externalId
- Name
latitude- Type
- number (double)
- Description
- Place of the request, with longitude; both 0 when there is none
- Name
longitude- Type
- number (double)
- Description
- Place of the request
- Name
created- Type
- object
- Description
- When it was raised
- Name
updated- Type
- object
- Description
- When it last changed, including comments and service-level events
- Name
firstRespondedAt- Type
- object
- Description
- First public comment by a user (or the resolution, if never answered)
- Name
resolvedAt- Type
- object
- Description
- When it was resolved; cleared when reopened
- Name
closedAt- Type
- object
- Description
- When it was closed or cancelled
- Name
dueFirstResponse- Type
- object
- Description
- From the priority, on its calendar
- Name
dueResolution- Type
- object
- Description
- From the priority, on its calendar
- Name
slaPausedAt- Type
- object
- Description
- Set while the ticket is on hold
- Name
scheduledStart- Type
- object
- Description
- When an agent is due to work on it
- Name
scheduledEnd- Type
- object
- Description
- When that work is due to end
- Name
attributes- Type
- object
- Description
- Tags, form answers and other free-form data. The server keeps the _sla_ key (service-level flags)
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- Ticket
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location --request PUT 'https://gw.onemap8.com/api/tickets/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}'
Response
{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"created": "<date-time>",
"updated": "<date-time>",
"firstRespondedAt": "<date-time>",
"resolvedAt": "<date-time>",
"closedAt": "<date-time>",
"dueFirstResponse": "<date-time>",
"dueResolution": "<date-time>",
"slaPausedAt": "<date-time>",
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}
Delete a Ticket
Deleting a ticket also deletes its history.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Responses
- Name
204- Type
- success
- Description
- No content
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
- Name
404- Type
- error
- Description
- Not found
Request
curl --location --request DELETE 'https://gw.onemap8.com/api/tickets/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
No content
Fetch the history of a Ticket
Created, comments, internal notes, status, assignment, priority, service-level warnings and breaches, and escalations, oldest first.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- TicketEvent
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
- Name
404- Type
- error
- Description
- Not found
Request
curl --location 'https://gw.onemap8.com/api/tickets/<integer>/events' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
[
{
"id": 0,
"ticketId": 0,
"type": "created",
"authorType": "<string>",
"authorId": 0,
"eventTime": "<date-time>",
"body": "<string>",
"attributes": {}
}
]
Comment on a Ticket
The first public comment by a user is the first response. An internal note is only for the agents and never counts as one.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Request body schema
- Name
application/json- Type
- schema
- Description
Body schema
- Name
body- Type
- string required
- Description
- The text. Required
- Name
internal- Type
- boolean
- Description
- true for a note only the agents see; it does not count as a response
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- TicketEvent
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location --request POST 'https://gw.onemap8.com/api/tickets/<integer>/comments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"body": "<string>",
"internal": true
}'
Response
{
"id": 0,
"ticketId": 0,
"type": "created",
"authorType": "<string>",
"authorId": 0,
"eventTime": "<date-time>",
"body": "<string>",
"attributes": {}
}
Move a Ticket to another status
Checks the workflow (the status the ticket is in may list the statuses it can move to), sets resolvedAt and closedAt, and pauses or resumes the service-level clocks around on_hold. An optional comment is added as a public comment.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Request body schema
- Name
application/json- Type
- schema
- Description
Body schema
- Name
statusId- Type
- integer required
- Description
- The status to move to
- Name
comment- Type
- string
- Description
- Optional public comment added with the move
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- Ticket
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location --request POST 'https://gw.onemap8.com/api/tickets/<integer>/transition' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"statusId": 0,
"comment": "<string>"
}'
Response
{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"created": "<date-time>",
"updated": "<date-time>",
"firstRespondedAt": "<date-time>",
"resolvedAt": "<date-time>",
"closedAt": "<date-time>",
"dueFirstResponse": "<date-time>",
"dueResolution": "<date-time>",
"slaPausedAt": "<date-time>",
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}
Assign a Ticket
A field left out is left as it is, and 0 clears it. The assignee must be able to see the ticket company and, when the ticket has a team, be a member of it.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Request body schema
- Name
application/json- Type
- schema
- Description
Body schema
- Name
assigneeId- Type
- object
- Description
- The user to assign, 0 to clear, or leave out to keep
- Name
teamId- Type
- object
- Description
- The team to assign, 0 to clear, or leave out to keep
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- Ticket
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location --request POST 'https://gw.onemap8.com/api/tickets/<integer>/assign' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"assigneeId": "<int64>",
"teamId": "<int64>"
}'
Response
{
"id": 0,
"companyId": 0,
"branchId": 0,
"contactId": 0,
"categoryId": 0,
"priorityId": 0,
"statusId": 0,
"teamId": 0,
"assigneeId": 0,
"title": "<string>",
"description": "<string>",
"channel": "<string>",
"externalId": "<string>",
"latitude": 0,
"longitude": 0,
"created": "<date-time>",
"updated": "<date-time>",
"firstRespondedAt": "<date-time>",
"resolvedAt": "<date-time>",
"closedAt": "<date-time>",
"dueFirstResponse": "<date-time>",
"dueResolution": "<date-time>",
"slaPausedAt": "<date-time>",
"scheduledStart": "<date-time>",
"scheduledEnd": "<date-time>",
"attributes": {}
}
Fetch the service-level state of a Ticket
Each clock (first response and resolution): due date, state and minutes left (negative when late). The overall state is the worse of the two.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- TicketSla
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
- Name
404- Type
- error
- Description
- Not found
Request
curl --location 'https://gw.onemap8.com/api/tickets/<integer>/sla' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
{
"firstResponse": {
"due": "<date-time>",
"state": "NONE",
"remainingMinutes": "<int64>"
},
"resolution": {},
"overall": "<string>",
"paused": true
}
Create the standard ticket workflow for a company
Creates the standard 6 statuses and 4 priorities for a company that has none. Calling it again adds nothing.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Query Parameters
- Name
companyId- Type
- integer
- Description
- The company (required)
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- TicketDefaultsResult
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location --request POST 'https://gw.onemap8.com/api/tickets/defaults?companyId=<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
{
"statuses": 0,
"priorities": 0
}
Fetch the dashboard statistics of a company
Volume, compliance and the trend describe the tickets created in the period; the backlog is what is open now; average times are wall-clock minutes over the tickets answered or resolved in the period. Agents are counted by current assignee.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Query Parameters
- Name
companyId- Type
- integer
- Description
- The company (required)
- Name
from- Type
- string <date-time>
- Description
- Start of the period, an ISO instant. Default: 30 days before _to_
- Name
to- Type
- string <date-time>
- Description
- End of the period (exclusive), an ISO instant. Default: now
- Name
groupBy- Type
- string
- Description
- Trend bucket size. Default: day up to 31 days, week up to about 6 months, otherwise month
- Name
zone- Type
- string
- Description
- IANA time zone the trend buckets (days, weeks Monday to Sunday, months) are counted in. Default: UTC
- Name
teamId- Type
- integer
- Description
- Only tickets of this team
- Name
branchId- Type
- integer
- Description
- Only tickets of this branch
- Name
categoryId- Type
- integer
- Description
- Only tickets of this category
- Name
limit- Type
- integer
- Description
- Length of the ranked lists. Default: 10
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- TicketStatistics
- Name
400- Type
- error
- Description
- Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
- Name
401- Type
- error
- Description
- Unauthorized
Request
curl --location 'https://gw.onemap8.com/api/tickets/stats?companyId=<integer>&from=<date-time>&to=<date-time>&groupBy=<string>&zone=<string>&teamId=<integer>&branchId=<integer>&categoryId=<integer>&limit=<integer>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
{
"range": {
"from": "<date-time>",
"to": "<date-time>",
"groupBy": "<string>",
"zone": "<string>"
},
"totals": {
"created": 0,
"resolved": 0,
"cancelled": 0
},
"backlog": {
"open": 0,
"unassigned": 0,
"onHold": 0,
"atRisk": 0,
"breached": 0,
"byStatus": [
{
"statusId": 0,
"name": "<string>",
"kind": "<string>",
"count": 0
}
]
},
"sla": {
"firstResponse": {
"met": 0,
"missed": 0,
"breached": 0,
"pending": 0,
"compliance": "<double>"
},
"resolution": {}
},
"timing": {
"avgFirstResponseMinutes": "<int64>",
"avgResolutionMinutes": "<int64>",
"medianResolutionMinutes": "<int64>",
"p90ResolutionMinutes": "<int64>"
},
"byCategory": [
{
"id": 0,
"name": "<string>",
"count": 0
}
],
"byPriority": [
{}
],
"byBranch": [
{}
],
"byZone": [
{}
],
"byChannel": [
{}
],
"byTeam": [
{
"teamId": 0,
"name": "<string>",
"open": 0,
"created": 0,
"resolved": 0
}
],
"byAgent": [
{
"userId": 0,
"name": "<string>",
"open": 0,
"resolved": 0,
"avgResolutionMinutes": "<int64>"
}
],
"trend": [
{
"period": "<string>",
"created": 0,
"resolved": 0
}
]
}