Difference between revisions of "API:EventForms:Details:Get"

From docs
Jump to: navigation, search
(Created page with "== API » Get Contact Event Forms Details == '''URL:''' <nowiki>https://app.callproof.com/api/contact/event_form/details/get/</nowiki> '''Method:''' GET '''Required...")
 
 
Line 1: Line 1:
 
== [[API]] &#187; Get Contact Event Forms Details ==
 
== [[API]] &#187; Get Contact Event Forms Details ==
  
'''URL:''' <nowiki>https://app.callproof.com/api/contact/event_form/details/get/</nowiki>
+
=== Base URL ===
 +
https://app.callproof.com
  
'''Method:''' GET
+
=== Endpoint ===
 +
/api/contact/event_form/details/get/
  
'''Required Fields:'''
+
=== Purpose ===
 +
Retrieves the custom field definitions and answer values for a specific event form submission on a contact. Use this after listing submissions via <code>/api/contact/event_form/get/</code> when you need the full field-level data for one submission.
  
* '''''key''''' - API Key
+
=== HTTP Method ===
* '''''secret''''' - API Key Secret
+
GET
* '''''contact_id''''' - Contact ID
 
* '''''contact_event_form_id''''' - Contact Event Form ID as in response of [[API:EventForms:Contact:Get|https://app.callproof.com/api/contact/event_form/get/]]
 
  
 +
=== Headers ===
 +
No required headers.
  
'''Data Returned:'''
+
{| class="wikitable"
 +
! Header !! Required !! Description
 +
|-
 +
| — || — || No headers are required for this endpoint. Authentication is provided via query parameters.
 +
|}
  
* '''''results''''' - Event Form Details
+
=== Security ===
* '''''errors''''' - Array of errors produced by the request
+
* '''Yes''' – Requires a valid API key and secret with permission to read event forms.
* '''''code''''' - HTTP request status
+
 
 +
=== Parameters ===
 +
 
 +
==== Query Parameters ====
 +
{| class="wikitable"
 +
! 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.
 +
|-
 +
| contact_id || integer || Yes || Unique identifier of the contact associated with the event form submission. Must belong to your company.
 +
|-
 +
| contact_event_form_id || integer || Yes || Unique identifier of the submitted event form record to retrieve field details for. Must belong to your company.
 +
|}
 +
 
 +
==== Path Parameters ====
 +
None.
 +
 
 +
==== Request Body ====
 +
None.
 +
 
 +
=== cURL Example ===
 +
<pre>
 +
curl -X GET "https://app.callproof.com/api/contact/event_form/details/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&contact_id=789&contact_event_form_id=8801"
 +
</pre>
 +
 
 +
=== Successful Response (200) ===
 +
Returns one entry per custom field defined on the event form, including the field name, type, and formatted answer value. Hidden fields and image fields are not included.
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| results || array || List of custom field entries for the submitted event form.
 +
|-
 +
| results[].custom_field_id || integer || Unique identifier of the custom field.
 +
|-
 +
| results[].custom_field_name || string || Display name of the custom field.
 +
|-
 +
| results[].custom_field_type_name || string || Field type (e.g. <code>text</code>, <code>select</code>, <code>checkbox</code>, <code>multiple_select</code>, <code>date</code>, <code>integer</code>). Empty string if no type is assigned.
 +
|-
 +
| results[].value || string or null || Formatted answer value. <code>null</code> when no value is stored. Select and radio fields return the option label; checkboxes return <code>Yes</code> or <code>No</code>; multiple-select fields return selected option names joined with <code> | </code>.
 +
|-
 +
| errors || array || Empty list when the request succeeds.
 +
|-
 +
| code || integer || HTTP-style status value; <code>200</code> on success.
 +
|}
 +
 
 +
Example response:
 +
<pre>
 +
{
 +
  "results": [
 +
    {
 +
      "value": "Site visit completed",
 +
      "custom_field_id": 201,
 +
      "custom_field_name": "Visit Notes",
 +
      "custom_field_type_name": "textarea"
 +
    },
 +
    {
 +
      "value": "Yes",
 +
      "custom_field_id": 202,
 +
      "custom_field_name": "Customer Present",
 +
      "custom_field_type_name": "checkbox"
 +
    },
 +
    {
 +
      "value": "Follow Up | Demo Scheduled",
 +
      "custom_field_id": 203,
 +
      "custom_field_name": "Next Steps",
 +
      "custom_field_type_name": "multiple_select"
 +
    }
 +
  ],
 +
  "errors": [],
 +
  "code": 200
 +
}
 +
</pre>
 +
 
 +
=== Notes ===
 +
* Both <code>contact_id</code> and <code>contact_event_form_id</code> are required.
 +
* This endpoint returns field-level detail for a single submission; it does not support date filtering or pagination.
 +
* Use <code>/api/contact/event_form/get/</code> first to obtain <code>contact_event_form_id</code> values for a contact.
 +
* Hidden custom fields and image-type fields are excluded from the response.
 +
* Supported value types include text, textarea, select, radio, checkbox, date, time, datetime, integer, auto_integer, decimal, and multiple_select. Other field types may return an empty value.
 +
* For select, radio, and certain reference fields (state, country, contact type), stored IDs are resolved to human-readable labels in the <code>value</code> field.
 +
 
 +
=== Error Responses ===
 +
{| class="wikitable"
 +
! Status Code !! Meaning
 +
|-
 +
| 400 || Bad Request – The contact ID or contact event form ID is missing, invalid, or does not belong to your company.
 +
|-
 +
| 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.
 +
|}
 +
 
 +
'''400 response body examples:'''
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid 'contact id' field"],
 +
  "code": 400
 +
}
 +
</pre>
 +
 
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid 'contact_event_form_id' field"],
 +
  "code": 400
 +
}
 +
</pre>
 +
 
 +
'''401 response body example:'''
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid API Key"],
 +
  "code": 401
 +
}
 +
</pre>
 +
 
 +
'''405 response body example:'''
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Method not allowed"],
 +
  "code": 405
 +
}
 +
</pre>

Latest revision as of 14:53, 17 July 2026

API » Get Contact Event Forms Details

Base URL

https://app.callproof.com

Endpoint

/api/contact/event_form/details/get/

Purpose

Retrieves the custom field definitions and answer values for a specific event form submission on a contact. Use this after listing submissions via /api/contact/event_form/get/ when you need the full field-level data for one submission.

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

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.
contact_id integer Yes Unique identifier of the contact associated with the event form submission. Must belong to your company.
contact_event_form_id integer Yes Unique identifier of the submitted event form record to retrieve field details for. Must belong to your company.

Path Parameters

None.

Request Body

None.

cURL Example

curl -X GET "https://app.callproof.com/api/contact/event_form/details/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&contact_id=789&contact_event_form_id=8801"

Successful Response (200)

Returns one entry per custom field defined on the event form, including the field name, type, and formatted answer value. Hidden fields and image fields are not included.

Field Type Description
results array List of custom field entries for the submitted event form.
results[].custom_field_id integer Unique identifier of the custom field.
results[].custom_field_name string Display name of the custom field.
results[].custom_field_type_name string Field type (e.g. text, select, checkbox, multiple_select, date, integer). Empty string if no type is assigned.
results[].value string or null .
errors array Empty list when the request succeeds.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "results": [
    {
      "value": "Site visit completed",
      "custom_field_id": 201,
      "custom_field_name": "Visit Notes",
      "custom_field_type_name": "textarea"
    },
    {
      "value": "Yes",
      "custom_field_id": 202,
      "custom_field_name": "Customer Present",
      "custom_field_type_name": "checkbox"
    },
    {
      "value": "Follow Up | Demo Scheduled",
      "custom_field_id": 203,
      "custom_field_name": "Next Steps",
      "custom_field_type_name": "multiple_select"
    }
  ],
  "errors": [],
  "code": 200
}

Notes

  • Both contact_id and contact_event_form_id are required.
  • This endpoint returns field-level detail for a single submission; it does not support date filtering or pagination.
  • Use /api/contact/event_form/get/ first to obtain contact_event_form_id values for a contact.
  • Hidden custom fields and image-type fields are excluded from the response.
  • Supported value types include text, textarea, select, radio, checkbox, date, time, datetime, integer, auto_integer, decimal, and multiple_select. Other field types may return an empty value.
  • For select, radio, and certain reference fields (state, country, contact type), stored IDs are resolved to human-readable labels in the value field.

Error Responses

Status Code Meaning
400 Bad Request – The contact ID or contact event form ID is missing, invalid, or does not belong to your company.
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.

400 response body examples:

{
  "results": [],
  "errors": ["Invalid 'contact id' field"],
  "code": 400
}
{
  "results": [],
  "errors": ["Invalid 'contact_event_form_id' field"],
  "code": 400
}

401 response body example:

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

405 response body example:

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