Form

All the endpoints that can be called on the Form controller.

Endpoints that require the FORM_READ permission:

  • GET index

  • GET item

  • GET getFormForTicket

Endpoints that require the FORM_CUD permission:

  • POST index

  • PUT item

  • DELETE item

Additionally, PUT saveFormFields requires the FORM_SAVE permission.

index

get

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

index

post

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

item

get

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

item

put

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

item

delete

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

getFormForTicket

get

Returns the form(s) for this ticket.

Authorizations
Query parameters
ticketIDnumberRequired
Responses
200Success
get
GET /api/v2/form/getFormForTicket?ticketID=1 HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
200Success

No content

saveFormFields

put

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