Api Ticket Create - UppCRM/UppApiDocs GitHub Wiki

Create Ticket

Url - https://app.upp.io/rest/v1/tickets/

Method - POST

parameters

Attributes Type Value Description Required
accountId id context.account[0] account id for ticket Optional
identifier string TIC-1 Identifier of the ticket Optional
title string Ticket1 Title of the ticket Yes
statusTicket id 1.New, 2.open, 3.pending, 4.closed Ticket status Optional
description string Loreum ipsum dolar Ticket Description Optional
priorityTicket id 1.Normal, 2.longterm, 3.high Ticket priority Optional

description

This API call creates a new ticket with given details.

example

Url - https://app.upp.io/rest/v1/tickets

request

//header
{
	"api-key": pLBhQ7ihuM0JXNVI7ixDQwP7BlAa7XCxgk4Sxg58S2DaohZN6NULvKxQpKOskzE8
}
//data
{
	"statusTicket": "New",
	"title": "Ticket1",
	"identifier": "TIC-1",
	"uniqueNumber": "1",
	"accountId": context.account[0],
	"description": "Loreum ipsum dolar sit amet",
	"teamId": context.team[0],
	"priorityTicket": "Normal",
	"createdOn": 458796,
	"modifiedOn": 120456,
	"customFields": [
		{
			identifier: "transactionsThisMonth",
			value: 20
		}
	],
}

response

{
	"success": true,
	"errors": null,
	"result": {
		"id": 58a6b00d4de5a8611522948c,
		"statusTicket": "New",
		"name": "Ticket1",
		"identifier": "TIC-1",
		"uniqueNumber": "1",
		"accountId": context.account[0],
		"description": "Loreum ipsum dolar sit amet",
		"teamId": context.team[0],
		"priorityTicket": "Normal",
		"createdOn": 458796,
		"modifiedOn": 120456,
		"customFields": [
			{
				identifier: "transactionsThisMonth",
				value: 20
			}
		],
	}

}

errors

For example, if ticket title is not specified, error will be shown as,

request

//header
{
	"api-key": pLBhQ7ihuM0JXNVI7ixDQwP7BlAa7XCxgk4Sxg58S2DaohZN6NULvKxQpKOskzE8
}
//data
{
	"title": ""
}

response

{
	"result": "",
	"errors": [
		"Title is required field" 
	]
	"success": 0
}  

error Messages

The possible error for this API call is listed below.

Errors Explanation
Title is required field To create a ticket, title is mandatory. If title is not specified, error will be displayed.
Title already exist Ticket title is uniqe, if the existing title is entered, error will be displayed.
Invalid ticket status Ticket status can be open, pending, closed. If none of the ticket status is enabled, it results in error.
Invalid ticket priorty Ticket priority can be new, open, pending, closed. If none of the priority is selected, error will be displayed.
Invalid teamid Team id should be valid. If the entered team id is not valid, error will be displayed.eg - context.team[0].
Invalid API KEY If the generated API KEY and the API KEY that is specified don't match, then it results in invalid API KEY.