Guide du développeur

Apprenez comment configurer et utiliser nos API ouvertes
afin d'intégrer librement Deskero à toute autre solution de logiciel !

Ticket types

List

Get a paginated list of ticket types

GET https://api.deskero.com/ticketType/list

Headers

Header Value
Authorization Bearer {{bearer}}
Accept application/json
clientId {{clientId}}

URL parameters

Field name Value Required Default
page int value for page to show false 1

Example request

$ curl https://api.deskero.com/ticketType/list \ 
	-v \
	-H "Accept: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef"

Example response

{
	"ticket": {
		"totalRecords": 50,
		"recordsPerPage": 25,
		"previousQuery": null,
		"nextQuery": "https://api.deskero.com/ticketType/list?page=2",
		"records": [
			See ticket type detail
		]
	}
}

Search

Search a ticket type

GET https://api.deskero.com/ticketType/list

Headers

Header Value
Authorization Bearer {{bearer}}
Accept application/json
clientId {{clientId}}

URL parameters

Field name Value Required Default
page int value for page to show false 1
{{fieldName}} a value to search false

Example request

$ curl https://api.deskero.com/ticketType/list?type=incident\ 
	-v \
	-H "Accept: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef"

Example response

{
	"ticket": {
		"totalRecords": 1,
		"recordsPerPage": 25,
		"previousQuery": null,
		"nextQuery": null,
		"records": [
			See ticket type detail
		]
	}
}

Detail

Show a single ticket type

GET https://api.deskero.com/ticketType/{{ticketTypeId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Accept application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticketType/50913dd4c2e67797f82e5bb2 \ 
	-v \
	-H "Accept: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef"

Example response

{
	"id": "50913dd4c2e67797f82e5bb2",
	"type": "incident",
	"labels": {
		"en": "incident",
		"it": "assistenza",
		"fr": "assistance",
		"es": "asistencia"
		}
}

Create

Create a new ticket type

POST https://api.deskero.com/ticketType/insert

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticketType/insert \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X POST \
	-d '{
		"type": "notification",
		"labels": {
			"en": "notification",
			"it": "notifica",
			"fr": "notification",
			"es": "notificación"
		}
	}'

Example response

Created ticket type id

{
	"id": "5277c21ce4b0d3bd74d43841"
}

Update

Update a ticket type

PUT https://api.deskero.com/ticketType/update/{{ticketTypeId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticketType/update/5277c21ce4b0d3bd74d43841 \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X PUT \
	-d '{
		"type": "notification",
		"labels": {
			"en": "notification",
			"it": "notifica",
			"fr": "notification",
			"es": "notificación"
		}
	}'

Example response

Updated ticket type id

{
	"id": "5277c21ce4b0d3bd74d43841"
}

Delete

Delete a ticket type

DELETE https://api.deskero.com/ticketType/delete/{{ticketTypeId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticketType/delete/5277c21ce4b0d3bd74d43841 \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X DELETE

Example response

Deleted ticket type id

{
	"id": "5277c21ce4b0d3bd74d43841"
}

Fields

Field name Description
id auto-generated id
type unique type name
labels type name localization
Fermer