API:EventForms:Get

From docs
Jump to: navigation, search

API » Get Event Forms

Base URL

https://app.callproof.com

Endpoint

/api/event_form/get/

Purpose

Retrieves the event form definitions configured for your CallProof company, including each form’s custom fields. Use this to obtain available event forms and the field structure used when submitting event form responses for contacts.

HTTP Method

GET

Headers

No required headers.

Header Required Description
No headers are required for this endpoint. Authentication is provided via query parameters.

Security

  • Yes – Requires a valid API key and secret with permission to read event forms.

Parameters

Path Parameters

None.

Query Parameters

Parameter Type Required Description
key string Yes Public API key assigned to your CallProof account.
secret string Yes Private API secret paired with the API key.

Request Body

None.

cURL Example

curl -X GET "https://app.callproof.com/api/event_form/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET"

Successful Response (200)

Returns the event forms available for your company, ordered by their configured position. Each form includes its visible custom fields.

Field Type Description
results array List of event form definitions.
results[].id integer Unique identifier for the event form.
results[].name string Display name of the event form.
results[].custom_fields array Custom fields included on the event form.
results[].custom_fields[].id integer Unique identifier for the custom field.
results[].custom_fields[].name string Custom field display name.
results[].custom_fields[].cfield_table string Business area associated with the custom field.
results[].custom_fields[].cfield_type string Type of custom field.
results[].custom_fields[].cfield_option_default string Default option name, or empty if none.
results[].custom_fields[].rfield string Related regular field name, when applicable.
results[].custom_fields[].cfield string Linked/parent custom field name, when applicable.
results[].custom_fields[].position integer Display order position.
results[].custom_fields[].points integer Points value assigned to the field.
results[].custom_fields[].hide_on_checkout string 1 if hidden during checkout; otherwise 0.
results[].custom_fields[].options array Selectable options configured for the custom field.
results[].custom_fields[].options[].id integer Unique identifier for the option.
results[].custom_fields[].options[].name string Option display name.
results[].custom_fields[].options[].cfield_id integer Identifier of the custom field that owns the option.
results[].custom_fields[].options[].cfield string Name of the custom field that owns the option.
results[].custom_fields[].options[].is_default string 1 if this option is a default option; otherwise 0.
results[].custom_fields[].options[].position integer Option display order position.
results[].custom_fields[].options[].points integer Points value assigned to the option.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "results": [
    {
      "id": 15,
      "name": "Site Visit Form",
      "custom_fields": [
        {
          "id": 12,
          "name": "Visit Outcome",
          "cfield_table": "event_form",
          "cfield_type": "select",
          "cfield_option_default": "Successful",
          "rfield": "",
          "cfield": "",
          "position": 1,
          "points": 0,
          "hide_on_checkout": "0",
          "options": [
            {
              "id": 201,
              "name": "Successful",
              "cfield_id": 12,
              "cfield": "Visit Outcome",
              "is_default": "1",
              "position": 1,
              "points": 0
            }
          ]
        }
      ]
    }
  ],
  "code": 200
}

Notes

  • Returns only event forms belonging to your company.
  • Forms are ordered by their configured position.
  • Hidden fields and image fields are excluded from the returned custom field lists.
  • If no event forms are configured, the response returns an empty results list with status 200.
  • This endpoint returns form definitions, not submitted event form responses for a contact.
  • To retrieve submitted event form responses for a contact, use /api/contact/event_form/get/.
  • This response does not include an errors field on success.

Error Responses

Status Code Meaning
401 Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to read event forms.
405 Method Not Allowed – A method other than GET was used.
500 Internal Server Error – An unexpected server problem occurred. Not specified in Swagger.

401 response body example:

{
  "results": [],
  "errors": ["Invalid API Key"],
  "code": 401
}

405 response body example:

{
  "results": [],
  "errors": ["Method not allowed"],
  "code": 405
}