For the complete documentation index, see llms.txt. This page is also available as Markdown.

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
HTTPRequired
Responses
200

Successful response

application/json
get/api/v2/form
GET /api/v2/form HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

index

post

Creates a new form for this brand.

Authorizations
HTTPRequired
Body
brand_idstringOptional

type: number

titlestringOptional

type: ^[a-zA-Z0-9 ]+$

Responses
200

Successful response

application/json
post/api/v2/form
POST /api/v2/form HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 34

{
  "brand_id": "text",
  "title": "text"
}
200

Successful response

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
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
get/api/v2/form/{id}
GET /api/v2/form/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

item

put

Updates this form by its ID.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Body
brand_idstringOptional

type: number

titlestringOptional

type: ^[a-zA-Z0-9 ]+$

Responses
200

Successful response

application/json
put/api/v2/form/{id}
PUT /api/v2/form/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 34

"brand_id='text'&title='text'"
200

Successful response

item

delete

Permanently deletes this form by its ID.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
delete/api/v2/form/{id}
DELETE /api/v2/form/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

getFormForTicket

get

Returns the form(s) for this ticket.

Authorizations
HTTPRequired
Responses
200

Successful response

application/json
get/api/v2/form/getFormForTicket
GET /api/v2/form/getFormForTicket HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

saveFormFields

put

Saves the values of the form fields of this ticket.

Authorizations
HTTPRequired
Body
ticketIDstringOptional

type: number

fields[0][formFieldID]stringOptional

type: number

fields[0][formFieldValue]stringOptional

type: string = ' '

Can be a text value, or the ID of a form field option to be selected.

Responses
200

Successful response

application/json
put/api/v2/form/saveFormFields
PUT /api/v2/form/saveFormFields HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 86

"ticketID='text'&fields[0][formFieldID]='text'&fields[0][formFieldValue]='text'"
200

Successful response

Last updated