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

From docs
Jump to: navigation, search
(Created page with "== API » Get Contact Event Forms == '''URL:''' <nowiki>https://app.callproof.com/api/contact/event_form/get/</nowiki> '''Method:''' GET '''Required Fields:''' * '...")
 
 
Line 1: Line 1:
 
== [[API]] &#187; Get Contact Event Forms ==
 
== [[API]] &#187; Get Contact Event Forms ==
  
'''URL:''' <nowiki>https://app.callproof.com/api/contact/event_form/get/</nowiki>
+
=== Base URL ===
 +
https://app.callproof.com
  
'''Method:''' GET
+
=== Endpoint ===
 +
/api/contact/event_form/get/
  
'''Required Fields:'''
+
=== Purpose ===
 +
Retrieves submitted event form responses for a specific contact in your CallProof company, filtered by creation date. Supports pagination so large volumes of form submissions can be synced in batches.
  
* '''''key''''' - API Key
+
=== HTTP Method ===
* '''''secret''''' - API Key Secret
+
GET
* '''''contact_id''''' - Contact ID
 
* '''''after''''' - Date/Time Event Forms submitted to contact after (e.g. '2014-08-10 12:34:56')
 
  
'''Optional Fields:'''
+
=== Headers ===
* '''''before''''' - Date/Time Event Forms submitted to contact created before (e.g. '2014-08-10 12:34:56')
+
No required headers.
* '''''offset''''' - Only 100 Event Forms are returned per request, this field must be used to pull additional results when more are available
 
  
 +
{| class="wikitable"
 +
! Header !! Required !! Description
 +
|-
 +
| — || — || No headers are required for this endpoint. Authentication is provided via query parameters.
 +
|}
  
'''Data Returned:'''
+
=== Security ===
 +
* '''Yes''' – Requires a valid API key and secret with permission to read event forms.
  
* '''''results''''' - Event Forms
+
=== Parameters ===
* '''''errors''''' - Array of errors produced by the request
+
 
* '''''code''''' - HTTP request status
+
==== 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 whose event form submissions should be retrieved. Must belong to your company.
 +
|-
 +
| after || datetime string || Yes || Return only event form submissions created on or after this date/time. Invalid or missing values cause a validation error.
 +
|-
 +
| before || datetime string || No || Return only event form submissions created on or before this date/time. If omitted, no upper date limit is applied.
 +
|-
 +
| offset || integer || No || Starting position for paginated results. Defaults to <code>0</code> if omitted or invalid.
 +
|}
 +
 
 +
==== Path Parameters ====
 +
None.
 +
 
 +
==== Request Body ====
 +
None.
 +
 
 +
=== cURL Example ===
 +
<pre>
 +
curl -X GET "https://app.callproof.com/api/contact/event_form/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&contact_id=789&after=2024-01-01"
 +
</pre>
 +
 
 +
=== Successful Response (200) ===
 +
Returns a paginated list of event form submissions for the specified contact within the requested creation date range. Up to 100 submissions are returned per request. If more matching submissions exist, <code>more</code> is set to <code>1</code> so the caller can request the next page using <code>offset</code>.
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| results || array || List of submitted event form records (maximum 100 per response).
 +
|-
 +
| results[].contact_event_form_id || integer || Unique identifier for the submitted event form record.
 +
|-
 +
| results[].rep || object || Sales representative who submitted the event form.
 +
|-
 +
| results[].rep.id || integer || Rep profile identifier.
 +
|-
 +
| results[].rep.email || string || Rep email address.
 +
|-
 +
| results[].rep.user_id || integer || Associated user account identifier.
 +
|-
 +
| results[].rep.name || string || Rep display name.
 +
|-
 +
| results[].rep.title || string || Rep job title.
 +
|-
 +
| results[].rep.updated || string || Date and time the rep profile was last updated.
 +
|-
 +
| results[].contact_id || integer || Associated contact identifier.
 +
|-
 +
| results[].contact_name || string || Contact display name.
 +
|-
 +
| results[].contact_full_addres || string || Full address of the contact.
 +
|-
 +
| results[].contact_company_name || string || Company name associated with the contact.
 +
|-
 +
| results[].event_form_id || integer || Identifier of the event form definition used.
 +
|-
 +
| results[].event_form_name || string || Name of the event form definition used.
 +
|-
 +
| results[].completed || string || <code>1</code> if the submission is completed; otherwise <code>0</code>.
 +
|-
 +
| results[].created || string || Date and time the submission was created (<code>YYYY-MM-DD HH:MM:SS</code>).
 +
|-
 +
| more || integer || <code>1</code> if additional matching submissions remain; <code>0</code> if this is the last page.
 +
|-
 +
| offset || integer || Offset value used for this request.
 +
|-
 +
| errors || array || Empty list when the request succeeds.
 +
|-
 +
| code || integer || HTTP-style status value; <code>200</code> on success.
 +
|}
 +
 
 +
Example response:
 +
<pre>
 +
{
 +
  "results": [
 +
    {
 +
      "contact_event_form_id": 8801,
 +
      "rep": {
 +
        "id": 123,
 +
        "email": "rep@example.com",
 +
        "user_id": 456,
 +
        "name": "Jane Smith",
 +
        "title": "Account Executive",
 +
        "updated": "2024-06-01 10:00:00"
 +
      },
 +
      "contact_id": 789,
 +
      "contact_name": "John Doe",
 +
      "contact_full_addres": "123 Main St, Austin, TX 78701",
 +
      "contact_company_name": "Acme Corp",
 +
      "event_form_id": 15,
 +
      "event_form_name": "Site Visit Form",
 +
      "completed": "1",
 +
      "created": "2024-06-15 14:30:00"
 +
    }
 +
  ],
 +
  "more": 0,
 +
  "offset": 0,
 +
  "errors": [],
 +
  "code": 200
 +
}
 +
</pre>
 +
 
 +
=== Notes ===
 +
* <code>contact_id</code> and <code>after</code> are required.
 +
* Results are filtered by the submission’s creation date, not by last-updated time.
 +
* This endpoint returns submitted event form records, not the event form definitions themselves.
 +
* Custom field answer values are not included in this response. Use <code>/api/contact/event_form/details/get/</code> to retrieve field values for a specific submission.
 +
* Results are ordered by submission ID ascending.
 +
* Up to 100 records are returned per page. Use <code>offset</code> with <code>more</code> to page through larger result sets.
 +
* To retrieve event form definitions and their fields, use <code>/api/event_form/get/</code>.
 +
 
 +
=== Error Responses ===
 +
{| class="wikitable"
 +
! Status Code !! Meaning
 +
|-
 +
| 400 || Bad Request – The required <code>after</code> parameter is missing/invalid, or the contact ID is missing/invalid.
 +
|-
 +
| 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 'after' field"],
 +
  "code": 400
 +
}
 +
</pre>
 +
 
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid 'contact 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:52, 17 July 2026

API » Get Contact Event Forms

Base URL

https://app.callproof.com

Endpoint

/api/contact/event_form/get/

Purpose

Retrieves submitted event form responses for a specific contact in your CallProof company, filtered by creation date. Supports pagination so large volumes of form submissions can be synced in batches.

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 whose event form submissions should be retrieved. Must belong to your company.
after datetime string Yes Return only event form submissions created on or after this date/time. Invalid or missing values cause a validation error.
before datetime string No Return only event form submissions created on or before this date/time. If omitted, no upper date limit is applied.
offset integer No Starting position for paginated results. Defaults to 0 if omitted or invalid.

Path Parameters

None.

Request Body

None.

cURL Example

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

Successful Response (200)

Returns a paginated list of event form submissions for the specified contact within the requested creation date range. Up to 100 submissions are returned per request. If more matching submissions exist, more is set to 1 so the caller can request the next page using offset.

Field Type Description
results array List of submitted event form records (maximum 100 per response).
results[].contact_event_form_id integer Unique identifier for the submitted event form record.
results[].rep object Sales representative who submitted the event form.
results[].rep.id integer Rep profile identifier.
results[].rep.email string Rep email address.
results[].rep.user_id integer Associated user account identifier.
results[].rep.name string Rep display name.
results[].rep.title string Rep job title.
results[].rep.updated string Date and time the rep profile was last updated.
results[].contact_id integer Associated contact identifier.
results[].contact_name string Contact display name.
results[].contact_full_addres string Full address of the contact.
results[].contact_company_name string Company name associated with the contact.
results[].event_form_id integer Identifier of the event form definition used.
results[].event_form_name string Name of the event form definition used.
results[].completed string 1 if the submission is completed; otherwise 0.
results[].created string Date and time the submission was created (YYYY-MM-DD HH:MM:SS).
more integer 1 if additional matching submissions remain; 0 if this is the last page.
offset integer Offset value used for this request.
errors array Empty list when the request succeeds.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "results": [
    {
      "contact_event_form_id": 8801,
      "rep": {
        "id": 123,
        "email": "rep@example.com",
        "user_id": 456,
        "name": "Jane Smith",
        "title": "Account Executive",
        "updated": "2024-06-01 10:00:00"
      },
      "contact_id": 789,
      "contact_name": "John Doe",
      "contact_full_addres": "123 Main St, Austin, TX 78701",
      "contact_company_name": "Acme Corp",
      "event_form_id": 15,
      "event_form_name": "Site Visit Form",
      "completed": "1",
      "created": "2024-06-15 14:30:00"
    }
  ],
  "more": 0,
  "offset": 0,
  "errors": [],
  "code": 200
}

Notes

  • contact_id and after are required.
  • Results are filtered by the submission’s creation date, not by last-updated time.
  • This endpoint returns submitted event form records, not the event form definitions themselves.
  • Custom field answer values are not included in this response. Use /api/contact/event_form/details/get/ to retrieve field values for a specific submission.
  • Results are ordered by submission ID ascending.
  • Up to 100 records are returned per page. Use offset with more to page through larger result sets.
  • To retrieve event form definitions and their fields, use /api/event_form/get/.

Error Responses

Status Code Meaning
400 Bad Request – The required after parameter is missing/invalid, or the contact ID is missing/invalid.
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 'after' field"],
  "code": 400
}
{
  "results": [],
  "errors": ["Invalid 'contact 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
}