Hi, Humans. How may we help you?

[Enterprise] Tickets API
46 min
Created by Karine Moreira on 12/9/2024 3:29 PM
Updated by Leonora Alves on 2/18/2025 3:41 PM

Our API's allow up to 10 requests per minute. To increase this limit, contact support. Find out more about API times and limits.

⚠️Attention: In the Tickets API, after 3 requests with error, the code 429 - Too many failed requests will be returned, blocking requests for 60 seconds. This time is left after 3 more consecutive errors. The waiting time is in the retry-after parameter of the response header.

https://api.movidesk.com/public/v1

Tickets

URL:    /tickets
Methods: GET / POST / PATCH

Tickets/Past

URL:    /tickets/past
Methods: GET

⚠️Attention: The route  /tickets brings the tickets with the update date (lastupdate) less than 90 days. Tickets that have an older update date must be searched for on the route /tickets/past.  The maximum return quantity on a ticket list GET will be 100 tickets per page.



Layout

ticket

Property

Type

Size

Mandatory

Description

id

string

10

 

Ticket number (read only).

protocol

string

30

 

Ticket protocol (read only). *If not used, it will be displayed as null.

type

int

1

Ticket type. 1 = Internal 2 = Public.

subject

string

350

 

Ticket subject.

category

string

128

 

Ticket category name. An existing category must be entered that is related to the type and service (if informed) of the ticket.

urgency

string

128

 

Name of the ticket urgency. An existing urgency must be informed that is related to the category (if it is stated in the ticket).

status

string

128

*

Ticket status name. To change this field, the justification must also be provided. The status must be existing and related to the ticket type. *If not informed, the New default base status will be used.

baseStatus

string

128

 

Name of the ticket's base status (Read only).

New,
InAttention,
Stopped,
Canceled,
Resolved,
Closed

justification

string

128

 

Name of the ticket justification. An existing justification that is related to the ticket status must be provided. Completing this field is mandatory when the ticket status requires it. To change this field, the status must also be entered.

origin

int

1

 

Ticket opening channel (Read only).

1

Via the web by the customer

2

Via web via agent

3

Received via email

4

System trigger

5

Chat (online)

7

Email sent by the system

8

Contact form

9

Via web API

13

ReceivedCall

14

MadeCall

15

LostCall

16

DropoutCall

21

NotAnsweredCall

23

WhatsApp Business

24

NLU

26

WhatsApp (NLU)


createdDate

datetime UTC

7

Ticket opening date. The date entered must be in UTC* format. *If not provided, it will be filled in with the current date. Read-only after creation.

originEmailAccount

string

128

 

Email account where the ticket was received (Read only).

owner

person

 

 

Details of the person responsible for the ticket. To change this field, the team responsible for the ticket must also be informed. 

ownerTeam

string

128

 

Team responsible for the ticket. To change this field, the person responsible for the ticket must also be informed. If the person responsible for the ticket is informed, the person responsible's team must be associated with them.

createdBy

person

 

Ticket generator data. 

serviceFull

array

1024

 

List with the names of the service levels selected in the ticket (Read only).

serviceFirstLevelId

int

10

 

Id (Code) of the service selected in the ticket.

serviceFirstLevel

string

1024

 

Name of the first level of service selected in the ticket (Read only).

Name of the service that is selected in the ticket.

serviceSecondLevel

string

1024

 

Name of the second level of service selected in the ticket (Read only).

serviceThirdLevel

string

1024

 

Name of the third level of service selected in the ticket (Read only).

First-level service name.
image (37).png

contactForm

string

128

 

Name of the contact form through which the ticket was opened (Read only).

tags

array

 

 

List of strings with the TAGs to which the ticket is related. If non-existent TAGs are reported, they will be added to the database.

cc

string

1024

 

List of emails entered in the Cc field, separated by commas (Read only).

resolvedIn

datetime UTC

 

 

Date on which the ticket was indicated by the agent as resolved. The date entered must be in UTC format.

reopenedIn

datetime UTC

 

 

Date on which the ticket was last reopened (Read only).

closedIn

datetime UTC

 

 

Date on which the ticket was indicated as closed. The date entered must be in UTC format.

lastActionDate

datetime UTC

 

 

UTC date of the ticket's last action (Read only).

actionCount

int

 

 

Number of ticket actions (Read only).

lastUpdate

datetime UTC

 

 

UTC date of last ticket change (Read only).

lifetimeWorkingTime

int

 

 

Ticket lifetime in minutes in business hours since opening (Read only).

stoppedTime

int

 

 

Time that the ticket was in stopped status in minutes in running hours (Read only).

stoppedTimeWorkingTime

int

 

 

Time that the ticket was in stopped status in minutes in working hours (Read only).

resolvedInFirstCall

bool

 

 

Indicator that represents whether the ticket was resolved at the time of opening or at a later time (Read only).

chatWidget

string

128

 

Chat application through which the ticket was opened (Read only).

chatGroup

string

128

 

Chat group through which the ticket was opened (Read only).

chatTalkTime

int

 

 

Chat duration time in seconds (Read only).

chatWaitingTime

int

 

 

Time the customer spent waiting to be served in seconds (Read only).

lettuceAgreement

string

128

 

SLA agreement used in the ticket (Read only).

slaAgreementRule

string

128

 

SLA contract rule (Read only).

slaSolutionTime

int

 

 

SLA contract resolution time (Read only).

slaResponseTime

int

 

 

SLA contract response time (Read only).

slaSolutionChangedByUser

bool

 

 

Indicates whether the SLA agreement was manually changed by the user (Read only).

slaSolutionChangedBy

person

 

 

Data of the person who changed the SLA contract (Read only).

slaSolutionDate

datetime UTC

 

 

SLA resolution date. If informed, it will be considered that the SLA was manually changed by the user who created the action. The date entered must be in UTC format.

slaSolutionDateIsPaused

bool

 

 

Indicates whether the SLA resolution date is paused (Read only).

slaResponseDate

datetime UTC

 

 

UTC date of SLA response (Read only).

slaRealResponseDate

datetime UTC

 

 

Actual UTC date of the SLA response (Read only).

clients

person

 

  ✓  

List of ticket customers. 

actions

actions

 

List of ticket actions. 

parentTickets

parentTickets

 

 

List of parent tickets.

childrenTickets

childrenTickets

 

 

List of child tickets.

ownerHistories

ownerHistories

 

 

List of ticket responsibilities history (Read only).

statusHistories

statusHistories

 

 

List of ticket status histories (Read only). 

customFieldValues

customField

 

 

List with the values of the additional ticket fields. 

⚠️ Attention: Support APIs can take a few minutes to update tickets, users, and other records, which may result in them not appearing immediately in search results.



Tickets » Customers

ticket.clients[n]

Property

Type

Size

Mandatory

Description

id

string

64

Customer Id (Contact) (Read only).

businessName

string

128

 

Customer name (Read only).

email

string

128

 

Customer's main email (Read only).

phone

string

128

 

Customer's main phone number (Read only).

personType

int

1

✓ 

Person = 1, Company = 2, Department = 4 (Read only).

profileType

int

1

✓ 

Agent = 1, Customer = 2 (Read only).

isDeleted

bool

 

 

True if the client was deleted (Read only).

organization

person

 

 

Customer organization (Read only).



Tickets » Actions

ticket.actions[n]

Property

Type

Size

Mandatory

Description

id

int

10

Id (Action number) (Read only). *You must be informed when it is necessary to change the existing action.

type

int

1

Action type: 1 = Internal 2 = Public. 

origin

int

1

 

Action origin (Read only).

0

First Action

1

Via the web by the customer

2

Via web via agent

3

Received via email

4

System trigger

5

Chat (online)

6

Chat (offline)

7

Email sent by the system

8

Contact form

9

Via web API

10

Automatic ticket opening

13

Incoming call Telephony integration

14

Call made Telephony integration

15

Missed call Telephony integration

16

Call that was dropped from the waiting queue Telephony integration

21

Missed call Telephony integration

23

WhatsApp Business

24

NLU

25

Active WhatsApp

26

WhatsApp (NLU)

27

Active WhatsApp (NLU)


description

string

 max

Description of the action. In writing operations, this field will be interpreted as HTML and must be correctly formatted to be displayed normally on the ticket screen. In read operations, this field is text only.

htmlDescription

string

max

 

Description of the action in HTML format (Read only). *This field is only returned when the search is done by Ticket ID. It will not be returned in the Ticket listing. To return HTML, you must use the /tickets/htmldescription endpoint.

status

string

128

 

Action status (Read only).

justification

string

128

 

Justification of the action (Read only).

createdDate

datetime UTC

 

Action creation date. The date entered must be in UTC format. *If not provided, it will be filled in with the current date.

createdBy

person

 

 *

Action generator data. *Mandatory only if there is a record of notes when creating or changing the action via API. 

isDeleted

bool

 

 

True if the action was deleted (Read only).

timeAppointments

appointments

 

 

Time stamp data. 

expenses

expenses

 

 

Expense data. 

attachments

attachments

 

 

Attachment data (Read only). 

tags

array

 

 

List of strings with the TAGs to which the action is related. If non-existent TAGs are reported, they will be added to the database.



Tickets » Actions » Timesheets

ticket.actions.timeAppointments[n]

Property

Type

Size

Mandatory

Description

id

int

 

 *

Id (Code) of the note (Read only). *You must be informed when it is necessary to change the existing note.

activity

string

128

It must be an activity previously registered in the system.

date

datetime

 

It must contain the date with the hours reset Ex: 2016-08-24T00:00:00.

periodStart

time

 

*

Initial period of appointment. Ex: 08:00:00. *Mandatory when determined via parameterization.

periodEnd

time

 

*

Final period of the appointment. Ex: 12:00:00. *Mandatory when determined via parameterization.

workTime

time

 

 *

Total appointment time. Ex: 04:00:00. *Mandatory when determined via parameterization.

accountedTime

decimal

 

 

Time recorded in decimal. Ex: 7.7666666666666666 (Read only)

workTypeName

string

 

Type of time indicated.

createdBy

person

 

 ✓

Note generator data. 

createdByTeam

team

 

*

Data from the note generator team. 



Tickets » Actions » Expenses

ticket.actions.expenses[n]

Property

Type

Size

Mandatory

Description

id

int

 1

 

Unique Expense Identifier Field.

type

string

128

Description of the Type of Expense related to the note.

serviceReport

string

 128

 

Number of the Service Report issued containing the expense. Read Only.

createdBy

person

 128

ID of the person who reported the expense.

createdByTeam

team

  128

 

Team name of the person who reported the expense. 

date

datetime

UTC

 

 ✓

Date of creation of the person. It must be less than or equal to the current date. The date entered must be in UTC* format.

quantity

int

 

Note quantity. Mandatory when the value field is not provided.

value

decimal

 18,2

 

Value in currency indicated. Mandatory when the quantity field is not provided.



Tickets » Actions » Attachments

ticket.actions.attachments[n]

Property

Type

Size

Mandatory

Description

fileName

string

255

Name of the uploaded file (Read only).

path

string

255

Hash of the sent file (Read only).

createdBy

person

 

 

Data of the person who sent the file (Read only). 

createdDate

datetime UTC

 

 

UTC date the file was uploaded (Read only).



Tickets » Parent/Children Tickets

ticket.parentTickets[n]
ticket.childrenTickets[n]

Property

Type

Size

Mandatory

Description

id

int

 

✓ 

Ticket ID (Number).

subject

string

128

 

Ticket subject (Read only).

isDeleted

bool

 

 

True if deleted (Read only).



Tickets » Responsibility histories

ticket.ownerHistories[n]

Property

Type

Size

Mandatory

Description

ownerTeam

string

 128

  

Team responsible for the ticket (Read only).

owner

person

 

 

Details of the person responsible for the ticket (Read only).

permanencyTimeFullTime

double

 

 

Time of stay of the person responsible for the ticket in seconds. (Read only).

permanencyTimeWorkingTime

double

 

 

Useful time spent by the person responsible for the ticket in seconds. (Read only).

changedBy

person

 

 

Data of the person who changed the person responsible for the ticket (Read only). 

changedDate

datetime UTC

 

 

UTC date that the person responsible for the ticket was changed (Read only).



Tickets » Status histories

ticket.statusHistories[n]

Property

Type

Size

Mandatory

Description

status

string

 128

  

Ticket status (Read only).

justification

string

 128

 

Ticket justification (Read only). 

permanencyTimeFullTime

double

 

 

Ticket status dwell time in seconds. (Read only).

permanencyTimeWorkingTime

double

 

 

Useful duration of the ticket status in seconds. (Read only).

changedBy

person

 

 

Data of the person who changed the ticket status (Read only). 

changedDate

datetime UTC

 

 

UTC date the ticket status was changed (Read only).



Tickets » Additional fields

ticket.customFieldValues[n]

Property

Type

Size

Mandatory

Description

customFieldId

int

64

Additional field ID (can be obtained from the list of additional fields on the website).

customFieldRuleId

int

64

Id of the additional fields display rule (can be obtained from the list of display rules on the website).

line

int

64

Line number of the rule displayed on the ticket screen. When the rule does not allow the addition of new lines, the value 1 must be entered and additional field values must not be repeated for the rule id together with the field id. To change the value of a field, the line in which it is located must be entered. Fields that are in the database and not sent in the body of the request will be deleted.

value

string

max

 *

Text value of the additional field. *Required when the field type is: single-line text, multi-line text, HTML text, regular expression, numeric, date, time, timestamp, email, phone or URL. The date fields must be in *UTC time and in the format YYYY-MM-DDThh:MM:ss.000Z and the time field must be entered together with the fixed date "1991-01-01". The numeric field must be in Brazilian format, for example "1,530.75".

items

items

 

List of items. *Required when the field type is: list of values, list of people, list of customers, list of agents, multiple selection or single selection. Only one item must be entered if the additional field does not allow multiple selection. When the field is file, it is read-only. 

*Observation: Only additional fields that have their display rules being met at the time of the query will be presented in the customFieldValues property query.



Tickets » Additional fields » Items

ticket.customFieldValues.items[n]

Property

Type

Size

Mandatory

Description

personId

int

64

*

Company, department or person ID. *Mandatory when the field type is a list of people.

clientId

int

64

*

Company, department or person ID. *Mandatory when the field type is customer list.

team

string

128

*

Team name. *Mandatory when the field type is agent list (the personId can be entered to specify the team agent).

customFieldItem

string

256

*

Additional field item name. *Mandatory when the field type is: list of values, multiple selection or single selection.



Person

ticket.clients[n].organization
ticket.actions[n].createdBy
ticket.actions[n].timeAppointments[n].createdBy
ticket.owner
ticket.createdBy
ticket.slaSolutionChangedBy

Property

Type

Size

Mandatory

Description

id

string

64

 ✓ 

Person ID being:

ticket.owner - Email of the responsible agent

ticket.clients - Contact ID

businessName

string

128

 

Name (Read only).

email

string

128

 

Main email (Read only).

phone

string

128

 

Main phone (Read only).

personType

int

1

 

Person type: Person = 1, Company = 2, Department = 4 (Read only).

profileType

int

1

 

Person profile: Agent = 1, Customer = 2 (Read only).



Team

ticket.actions[n].timeAppointments[n].createdByTeam

Property

Type

Size

Mandatory

Description

id

int

 

 ✓ 

Team ID (Read only).

name

string

128

 

Team name (Read only).

*UTC: Universal Time Coordinated is the reference time zone from which all other time zones in the world are calculated. Ex: If your time zone is Brasília (UTC-03:00) and the current time is 3:30 pm, the UTC time will be 6:30 pm.



Working with the data

To access the data, it is necessary to generate an API key (token). To do this, access Support Service > Settings > Account > Parameters, on the environment tab, and click "Generate new key". You can generate a new key whenever you need, but this will cause programs that used the old key to stop working.

The entire data flow (View/Insert/Change) must be in JSON format as shown in the example below:

{ 
  "id":1,
 "protocol":"MOVI202109000001",
  "type":2,
  "subject":"Subject",
  "category":"Category",
  "urgency":"Urgency",
  "status":"Status",
  "baseStatus":"Status base",
  "justification":"Justification",
  "origin":9,
  "createdDate":"2016-11-18T14:25:07.1920886",
  "originEmailAccount":"[email protected]",
  "owner":{ 
    "id":"CodRefDoResponsável",
    "personType":1,
    "profileType":1,
    "businessName":"Name of person responsible",
    "email":"[email protected]",
    "phone":"(47) 99999-9999"
  },
  "ownerTeam":"Team (of) responsible",
  "createdBy":{ 
    "id":"CodRefDoGeradorDoTicket",
    "personType":1,
    "profileType":2,
    "businessName":"Ticket generator name",
    "email":"[email protected]",
    "phone":"(47) 99999-9999"
  },
  "serviceFull":[ 
    "Level 1 service",
    "Level 2 service",
    "Level 3 service"
  ],
  "serviceFirstLevelId":1,
  "serviceFirstLevel":"Level 1 service",
  "serviceSecondLevel":"Level 2 service",
  "serviceThirdLevel":"Level 3 service",
  "contact form":"Contact form",
  "tags":[ 
    tag1,
    "Tag 2",
    "Tag3"
  ],
  "cc":"[email protected],[email protected]",
  "resolvedIn":"2016-11-19T14:25:07.1920886",
  "reopenedIn":"2016-11-20T14:25:07.1920886",
  "closedIn":"2016-11-21T14:25:07.1920886",
  "lastActionDate":"2016-11-21T14:25:07.1920886",
  "actionCount":1,
  "lastUpdate":"2016-11-21T14:25:07.1920886",
  "lifeTimeWorkingTime":9999,
  "stoppedTime":9,
  "stoppedTimeWorkingTime":9,
  "resolvedInFirstCall":false,
  "chatWidget":"Chat - Example",
  "chatGroup":"Chat Group",
  "chatTalkTime":999,
  "chatWaitingTime":9,
  "sequence":2,
  "slaAgreement":"SLA Used",
  "slaAgreementRule":"SLA Rule Used",
  "slaSolutionTime":999,
  "slaResponseTime":99,
  "slaSolutionChangedByUser":false,
  "slaSolutionChangedBy":{ 
    "id":"CodRef",
    "personType":1,
    "profileType":3,
    "businessName":"Name of the person who made the change",
    "email":"[email protected]",
    "phone":"(47) 99999-9999"
  },
  "slaSolutionDate":"2016-11-21T14:25:07.1920886",
  "slaSolutionDateIsPaused":false,
  "slaResponseDate":"2016-11-21T14:25:07.1920886",
  "slaRealResponseDate":"2016-11-21T14:25:07.1920886",
  "clients":[ 
    { 
      "id":"CodRefDoCliente",
      "personType":2,
      "profileType":2,
      "businessName":"Customer name",
      "email":"[email protected]",
      "phone":"(47) 99999-9999",
      "isDeleted":false,
      "organization":{ 
        "id":"OrganizationRefCode",
        "personType":1,
        "profileType":2,
        "businessName":"Organization name",
        "email":"[email protected]",
        "phone":"(47) 99999-9999"
      }
    }
  ],
  "actions":[ 
    { 
      "id":1,
      "type":2,
      "origin":9,
      "description":"Action description",
      "status":"Status",
      "justification":"Justification",
      "createdDate":"2016-11-21T14:25:07.1920886",
      "createdBy":{ 
        "id":"ActionGeneratorRefCode",
        "personType":1,
        "profileType":1,
        "businessName":"Action generator name",
        "email":"[email protected]",
        "phone":"(47) 99999-9999"
      },
      "isDeleted":false,
      "timeAppointments":[ 
        { 
          "id":1,
          "activity":"Note activity",
          "date":"2016-11-21T00:00:00",
          "periodStart":"21:32:13.7345254",
          "periodEnd":"21:39:08.3443985",
          "workTime":"00:06:54.6098731",
          "accountedTime":7.7666666666666666,
          "workTypeName":"Overtime",
          "createdBy":{ 
            "id":"CodRefDoGeradorDoApontamento",
            "personType":1,
            "profileType":1,
            "businessName":"Note generator name",
            "email":"[email protected]",
            "phone":"(47) 99999-9999"
          },
          "createdByTeam":{ 
            "id":101,
            "name":"Quality"
          }
        }
      ],
      "expenses":[ 
        { 
          "id":12,
          "type":"Transport",
          "serviceReport":"0",
          "createdBy":{ 
            "id":"9B7387E9-4C46-4BD0",
            "personType":1,
            "profileType":3,
            "businessName":"Administrator",
            "email":null,
            "phone":null,
            "address":null,
            "complement":null,
            "pocket":null,
            "city":null,
            "neighborhood":null,
            "number":null,
            "reference":null
          },
          "createdByTeam":null,
          "date":"2018-11-05T18:22:00",
          "quantity":null,
          "value":145.11
        },
        { 
          "id":13,
          "type":"Food",
          "serviceReport":"0",
          "createdBy":{ 
            "id":"9B7387E9-4C46-4BD0",
            "personType":1,
            "profileType":3,
            "businessName":"Administrator",
            "email":null,
            "phone":null,
            "address":null,
            "complement":null,
            "pocket":null,
            "city":null,
            "neighborhood":null,
            "number":null,
            "reference":null
          },
          "createdByTeam":null,
          "date":"2018-11-05T18:22:00",
          "quantity":null,
          "value":25.33
        }
      ],
      "attachments":[ 
        { 
          "fileName":"minhaImagem.png",
          "path":"7BDEA1B62A8641FF86982D0CF9F3DEC0",
          "createdBy":{ 
            "id":"CodRefDeQuemEnviouOArquivo",
            "personType":1,
            "profileType":1,
            "businessName":"Name of who sent the file",
            "email":"[email protected]",
            "phone":"(47) 99999-9999"
          },
          "createdDate":"2017-05-29T14:19:50.0129141"
        }
      ],
      "parentTickets":[ 
        { 
          "id":2,
          "subject":"Parent ticket subject",
          "isDeleted":false
        }
      ],
      "childrenTickets":[ 
        { 
          "id":3,
          "subject":"Child ticket subject",
          "isDeleted":false
        }
      ],
      "satisfactionSurveyResponses":[ 
        { 
          "id":1,
          "responsedBy":{ 
            "id":"CodRefOfWhoRespondedToResearch",
            "personType":1,
            "profileType":2,
            "businessName":"Name of person who responded to the survey",
            "email":"[email protected]",
            "phone":"(47) 99999-9999"
          },
          "responseDate":"2016-11-22T14:25:07.1920886",
          "satisfactionSurveyModel":2,
          "satisfactionSurveyNetPromoterScoreResponse":null,
          "satisfactionSurveyPositiveNegativeResponse":null,
          "satisfactionSurveySmileyFacesResponse":5,
          "comments":"Comment on survey response"
        }
      ],
      "customFieldValues":[ 
        { 
          "customFieldId":3,
          "customFieldRuleId":2,
          "line":1,
          "value":null,
          "items":[ 
            { 
              "personId":null,
              "clientId":null,
              "team":null,
              "customFieldItem":"one"
            }
          ]
        },
        { 
          "customFieldId":1,
          "customFieldRuleId":1,
          "line":1,
          "value":"text via api",
          "items":[ 


          ]
        }
      ]
    }
  ]
}

Getting data

Method GET

Getting a single ticket

⚠️Attention: List or Array: List or “array” type variables will only be presented in the “individual ticket” type query, as per the example below, and will not be displayed in the “ticket list” type query return.

GET: /tickets
Parameters: id/protocol, token

Example:

Getting the ticket with id 1

GET: https://api.movidesk.com/public/servir/v1/tickets?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1

Return:

 {
   "id": 1,
   "protocol":"MOVI202109000001",
   "type": 2,
   "origin": 0,
   "status": "Novo",
   "justification": null,
   ... Other columns in the layout format above
  }


Obtaining the ticket with the MOVI202109000001 protocol

GET: https://api.movidesk.com/public/v1/tickets?token=52ee6ca5-8639-422b-bafe-470013c11176&protocol=MOVI202109000001

Return:

{
   "id": 1,
   "protocol":"MOVI202109000001",
   "type": 2,
   "origin": 0,
   "status": "Novo",
   "justification": null,
   ... Other columns in the layout format above
 }

⚠️ Attention: Additional fields: Only additional fields that have their display rules being met at the time of the query will be presented in the customFieldValues property query.



Getting a list of tickets

⚠️ Attention: List or Array: List or “array” type variables will only be presented in the “individual ticket” type query, as per the example below, and will not be displayed in the “ticket list” type query return.

GET: /tickets
Parameters: token, (LastUpdate and/or CreatedDate and/or Status)

Example:

Obtaining a list of tickets (it is mandatory to use a filter)

GET: https://api.movidesk.com/public/servir/v1/tickets?token=52ee6ca5-8639-422b-bafe-470013c11176&status=New

Return:

 [
   {
     "id": 1,
     "type": 2,
     "origin": 0,
     "status": "Novo"
   },
   {
     "id": 2,
     "type": 2,
     "origin": 0,
     "status": "Novo"
   }
   ... Other items on the list
 ]


Ticket list pagination

GET: /tickets
Parameters: token, (Page and/or Size)

⚠️ Attention: The list will be paged with a quantity maximum 100 records per page, and pagination can be used with the following resources:

Page: ID of the page searched (The first page will be number 0 by default and should be the default page to be shown if the search does not have pagination filters).

Size: Number of items that will be returned (Maximum 100 items and if a higher value is added, it will be disregarded and only 100 items will be displayed).

GET: https://api.movidesk.com/public/servir/v1/tickets?token=52ee6ca5-8639-422b-bafe-470013c11176&status=Novo&page=0&size=100

Return:

[
   {
     "id": 1,
     "type": 2,
     "origin": 0,
     "status": "Novo"
   },
   {
     "id": 2,
     "type": 2,
     "origin": 0,
     "status": "Novo"
   }
   ... Other items on the list
  ]


Entering data

Method POST


GET: /tickets
Parameters: token
Headers: Content-Type: application/json
Post body: {JSON object}
Example:
POST: https://api.movidesk.com/public/v1/tickets?token=52ee6ca5-8639-422b-bafe-470013c11176&returnAllProperties=false
Headers: Content-Type: application/json

RequestBody:

{ 
"type": 2,
"subject": "Subject",
"category": "Categoria",
"urgency": "Urgency",
"status": "Status",
"justification": "Justification",
"createdDate": "2016-11-18T14:25:07.1920886",
 ... Other columns in the layout format above
}

Return: Status 200 and in the body the ID (number) of the ticket entered.



Updating data

Method PATCH

Unlike data insertion (POST), the update is carried out partially. Therefore, it is necessary to send only the data that you want to change to the server.

⚠️ Attention: Changing lists (child objects) always replaces all items in the list.

In the lists of actions and notes, the Id must be entered in the body to indicate changes, because when the Id is not informed (is equal to zero) the actions and notes will be inserted and not changed. Customers and notes that are not included in the body will be excluded from the lists of clients and notes.

PATCH: /tickets
Parameters: token, id
Headers: Content-Type: application/json
Post body: {JSON object}
Examples:

Changing the ticket subject with id (ticket number) 1

PATCH: https://api.movidesk.com/public/v1/tickets?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1
Headers: Content-Type: application/json
RequestBody:
{
 "subject": "Movidesk"
}

Return: Status 200

In the example above, only the subject field is changed, the other fields remain unchanged

Removing ticket tags with id (ticket number) 1

PATCH: https://api.movidesk.com/public/v1/tickets?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1
Headers: Content-Type: application/json
RequestBody:
{
 "tags": []
}

Return: Status 200

Since the tags are in a list, in the example above, all tags will be removed. Because the values entered in the list always overwrite the previously recorded values.

Attachments

URL:    /ticketFileUpload
Method: POST

Layout

Parameter

Type

Size

Mandatory

Description

id

int

10

Id (number) of the existing ticket. 

actionId

int

10

Id (number) of the existing action.


POST: /ticketFileUpload
Parameters: token, id and action Id
Headers: Content-Type: multipart/form-data
Post body: attachments
Example:
POST: https://api.movidesk.com/public/v1/ticketFileUpload?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1452&actionId=1
Headers: Content-Type: multipart/form-data
RequestBody: anexos

Return: Status 200 and in the body the details of the inserted attachments (file names, hashes and possible errors).