Skip to content

API.post add ticket

Rogerio Albandes edited this page Aug 2, 2020 · 4 revisions

Create a new ticket

/api/user/saveticket

Create a new ticket.

  • URL

    http://helpdezk_url/api/user/saveticket

  • Method:

    POST

  • URL Params

    Required:

    Param Description Type
    token Authentication token string
    area Area ID int
    type Type ID int
    item Item ID int
    service Service ID int
    reason Reason ID int
    way Way ID int
    source Source ID int
    subject Ticket subject string
    description Ticket description string

    Optional:

    Param Description Type
    attachment[] Array with attachs array
    base64 Base64 attachs object
    • base64 Object Example:
    {
      "attach": [
        {
          "base64": "data:application/pdf;base64,JVBER ... FT0YK",
          "filename": "comprovante.pdf"
        },
        {
          "base64": "data:image/png;base64,iVBORw ... 0KJggg==",
          "filename": "foto_1.png"
        }
      ]
    }
  • Success Response:

    • Code: 200
      Content:

      Example:

      {
          "result": {
              "success": {
                  "coderequest": "202007000022",
                  "expire": "08/04/2020 07:52 AM",
                  "incharge": "N1 - Helpdesk Interno"
              }
          }
      }
  • Error Response:

    • Code: 200
      Content:

      {
          "result": {
              "error": {
                  "code": "9999",
                  "message": "Error message"
              }    
          }
      } 

      Example:

      {
          "result": {
              "error": {
                  "code": "0101",
                  "message": "Error processing save request."
              }
          }
      }