Form
All the endpoints that can be called on the Form controller.
Endpoints that require the FORM_READ
permission:
GET
indexGET
itemGET
getFormForTicket
Endpoints that require the FORM_CUD
permission:
POST
indexPUT
itemDELETE
item
Additionally, PUT
saveFormFields requires the FORM_SAVE
permission.
Returns all of the existing forms.
Authorizations
Query parameters
querystring · min: 1OptionalDefault:
""
Pattern: ^[0-9a-zA-Z ]+$
itemStartnumberOptionalDefault:
0
itemLimitnumber · max: 9999OptionalDefault:
15
Responses
200Success
get
GET /api/v2/form HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
200Success
No content
Creates a new form for this brand.
Authorizations
Body
brand_idnumberRequired
titlestring · min: 2RequiredPattern:
^[a-zA-Z0-9 ]+$
Responses
200Success
post
POST /api/v2/form HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 29
{
"brand_id": 1,
"title": "text"
}
200Success
No content
Returns this form by its ID.
Optionally, you can send a ticket ID with it to get the form values for that ticket.
Authorizations
Path parameters
idnumberRequired
Query parameters
ticketIDnumberOptional
Responses
200Success
get
GET /api/v2/form/{id} HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
200Success
No content
Updates this form by its ID.
Authorizations
Path parameters
idnumberRequired
Body
brand_idnumberRequired
titlestring · min: 2RequiredPattern:
^[a-zA-Z0-9 ]+$
Responses
200Success
put
PUT /api/v2/form/{id} HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 29
"brand_id=1&title='text'"
200Success
No content
Permanently deletes this form by its ID.
Authorizations
Path parameters
idnumberRequired
Body
descriptionstringOptional
Optional parameter if you want to send a description for deletion.
Responses
200Success
delete
DELETE /api/v2/form/{id} HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 22
"description='text'"
200Success
No content
Saves the values of the form fields of this ticket.
Authorizations
Body
ticketIDnumberRequired
Responses
200Success
put
PUT /api/v2/form/saveFormFields HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 72
"ticketID=1&fields=[{'formFieldID':'text','formFieldValue':'text'}]"
200Success
No content