Difference between revisions of "API:Companies:Notes:Created"
Greg Donald (talk | contribs) (Created page with " == API » Created Companies Notes == '''URL:''' <nowiki>https://app.callproof.com/api/companies/notes/created/</nowiki> '''Method:''' GET '''Required Fields:''' *...") |
Ashley DeBon (talk | contribs) |
||
| Line 1: | Line 1: | ||
| + | == [[API]] » Get Company Notes Created == | ||
| − | == | + | == Get Company Notes Created == |
| − | + | === Base URL === | |
| + | https://app.callproof.com | ||
| − | + | === Endpoint === | |
| + | /api/companies/notes/created/ | ||
| − | + | === Purpose === | |
| + | Retrieves notes created for contacts within your CallProof company during a specified date range. This endpoint supports pagination, making it suitable for synchronizing newly created notes with external applications or reporting systems. | ||
| − | + | === HTTP Method === | |
| − | + | GET | |
| − | |||
| − | + | === Headers === | |
| − | + | No required headers. | |
| − | |||
| − | + | {| class="wikitable" | |
| + | ! Header !! Required !! Description | ||
| + | |- | ||
| + | | — || — || No headers are required for this endpoint. Authentication is provided through query parameters. | ||
| + | |} | ||
| − | * '''''results | + | === Security === |
| − | + | ||
| − | + | * '''Yes''' – Requires a valid API key and secret with permission to access company notes. | |
| − | + | ||
| − | * | + | === 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 associated with the API key. | ||
| + | |- | ||
| + | | after || datetime string || Yes || Returns notes created on or after this date and time. | ||
| + | |- | ||
| + | | before || datetime string || No || Returns notes created on or before this date and time. If omitted, no upper date limit is applied. | ||
| + | |- | ||
| + | | offset || integer || No || Starting position for paginated results. Defaults to <code>0</code>. | ||
| + | |} | ||
| + | |||
| + | ==== Path Parameters ==== | ||
| + | |||
| + | None. | ||
| + | |||
| + | ==== Request Body ==== | ||
| + | |||
| + | None. | ||
| + | |||
| + | === cURL Example === | ||
| + | |||
| + | <pre> | ||
| + | curl -X GET "https://app.callproof.com/api/companies/notes/created/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01" | ||
| + | </pre> | ||
| + | |||
| + | === Successful Response (200) === | ||
| + | |||
| + | Returns a paginated list of company notes created within the requested date range. A maximum of 100 records are returned per request. If additional records exist, the response includes <code>more = 1</code> so the next page can be retrieved using the <code>offset</code> parameter. | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Field !! Type !! Description | ||
| + | |- | ||
| + | | results || array || Collection of company note records. | ||
| + | |- | ||
| + | | results[].id || integer || Unique identifier of the note. | ||
| + | |- | ||
| + | | results[].created || string || Date and time the note was created (<code>YYYY-MM-DD HH:MM:SS</code>). | ||
| + | |- | ||
| + | | results[].created_by_id || integer || User ID of the person who created the note. | ||
| + | |- | ||
| + | | results[].created_by_email || string || Email address of the note creator. | ||
| + | |- | ||
| + | | results[].created_by || string || Display name of the note creator. | ||
| + | |- | ||
| + | | results[].contact_id || integer || Identifier of the associated contact. | ||
| + | |- | ||
| + | | results[].contact || string || Name of the associated contact. | ||
| + | |- | ||
| + | | results[].company_id || integer || Identifier of the associated company. | ||
| + | |- | ||
| + | | results[].company || string || Name of the associated company. | ||
| + | |- | ||
| + | | results[].note || string || Text content of the note. | ||
| + | |- | ||
| + | | more || integer || Indicates whether additional records are available (<code>1</code> = Yes, <code>0</code> = No). | ||
| + | |- | ||
| + | | offset || integer || Offset value used for the current response. | ||
| + | |- | ||
| + | | errors || array || Empty when the request succeeds. | ||
| + | |- | ||
| + | | code || integer || HTTP-style status code (<code>200</code>). | ||
| + | |} | ||
| + | |||
| + | Example response: | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [ | ||
| + | { | ||
| + | "id": 1001, | ||
| + | "created": "2024-06-15 14:30:00", | ||
| + | "created_by_id": 456, | ||
| + | "created_by_email": "rep@example.com", | ||
| + | "created_by": "Jane Smith", | ||
| + | "contact_id": 789, | ||
| + | "contact": "John Doe", | ||
| + | "company_id": 321, | ||
| + | "company": "Acme Corp", | ||
| + | "note": "Followed up on proposal." | ||
| + | } | ||
| + | ], | ||
| + | "more": 0, | ||
| + | "offset": 0, | ||
| + | "errors": [], | ||
| + | "code": 200 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | === Error Responses === | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Status Code !! Meaning | ||
| + | |- | ||
| + | | 400 || Bad Request – The required <code>after</code> parameter is missing or is not a valid date/time. | ||
| + | |- | ||
| + | | 401 || Unauthorized – The API key or secret is missing, invalid, inactive, associated with a disabled account, or does not have permission to access company notes. | ||
| + | |- | ||
| + | | 405 || Method Not Allowed – A method other than GET was used. | ||
| + | |- | ||
| + | | 500 || Internal Server Error – An unexpected server error occurred. | ||
| + | |} | ||
| + | |||
| + | '''400 response example:''' | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Invalid 'after' field" | ||
| + | ], | ||
| + | "code": 400 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | '''401 response example:''' | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Invalid API Key" | ||
| + | ], | ||
| + | "code": 401 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | '''405 response example:''' | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Method not allowed" | ||
| + | ], | ||
| + | "code": 405 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | === Notes === | ||
| + | |||
| + | * This endpoint returns only notes created within the specified date range. | ||
| + | * Results are returned in pages of up to <code>100</code> records. | ||
| + | * Use the <code>offset</code> parameter together with the <code>more</code> field to retrieve additional pages. | ||
| + | * The <code>after</code> query parameter is required and must contain a valid date or date-time value. | ||
| + | * Authentication is supplied through the <code>key</code> and <code>secret</code> query parameters. | ||
| + | * This endpoint accepts only <code>GET</code> requests. | ||
Revision as of 08:07, 17 July 2026
Contents
API » Get Company Notes Created
Get Company Notes Created
Base URL
Endpoint
/api/companies/notes/created/
Purpose
Retrieves notes created for contacts within your CallProof company during a specified date range. This endpoint supports pagination, making it suitable for synchronizing newly created notes with external applications or reporting systems.
HTTP Method
GET
Headers
No required headers.
| Header | Required | Description |
|---|---|---|
| — | — | No headers are required for this endpoint. Authentication is provided through query parameters. |
Security
- Yes – Requires a valid API key and secret with permission to access company notes.
Parameters
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Public API key assigned to your CallProof account. |
| secret | string | Yes | Private API secret associated with the API key. |
| after | datetime string | Yes | Returns notes created on or after this date and time. |
| before | datetime string | No | Returns notes created on or before this date and time. If omitted, no upper date limit is applied. |
| offset | integer | No | Starting position for paginated results. Defaults to 0.
|
Path Parameters
None.
Request Body
None.
cURL Example
curl -X GET "https://app.callproof.com/api/companies/notes/created/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01"
Successful Response (200)
Returns a paginated list of company notes created within the requested date range. A maximum of 100 records are returned per request. If additional records exist, the response includes more = 1 so the next page can be retrieved using the offset parameter.
| Field | Type | Description |
|---|---|---|
| results | array | Collection of company note records. |
| results[].id | integer | Unique identifier of the note. |
| results[].created | string | Date and time the note was created (YYYY-MM-DD HH:MM:SS).
|
| results[].created_by_id | integer | User ID of the person who created the note. |
| results[].created_by_email | string | Email address of the note creator. |
| results[].created_by | string | Display name of the note creator. |
| results[].contact_id | integer | Identifier of the associated contact. |
| results[].contact | string | Name of the associated contact. |
| results[].company_id | integer | Identifier of the associated company. |
| results[].company | string | Name of the associated company. |
| results[].note | string | Text content of the note. |
| more | integer | Indicates whether additional records are available (1 = Yes, 0 = No).
|
| offset | integer | Offset value used for the current response. |
| errors | array | Empty when the request succeeds. |
| code | integer | HTTP-style status code (200).
|
Example response:
{
"results": [
{
"id": 1001,
"created": "2024-06-15 14:30:00",
"created_by_id": 456,
"created_by_email": "rep@example.com",
"created_by": "Jane Smith",
"contact_id": 789,
"contact": "John Doe",
"company_id": 321,
"company": "Acme Corp",
"note": "Followed up on proposal."
}
],
"more": 0,
"offset": 0,
"errors": [],
"code": 200
}
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – The required after parameter is missing or is not a valid date/time.
|
| 401 | Unauthorized – The API key or secret is missing, invalid, inactive, associated with a disabled account, or does not have permission to access company notes. |
| 405 | Method Not Allowed – A method other than GET was used. |
| 500 | Internal Server Error – An unexpected server error occurred. |
400 response example:
{
"results": [],
"errors": [
"Invalid 'after' field"
],
"code": 400
}
401 response example:
{
"results": [],
"errors": [
"Invalid API Key"
],
"code": 401
}
405 response example:
{
"results": [],
"errors": [
"Method not allowed"
],
"code": 405
}
Notes
- This endpoint returns only notes created within the specified date range.
- Results are returned in pages of up to
100records. - Use the
offsetparameter together with themorefield to retrieve additional pages. - The
afterquery parameter is required and must contain a valid date or date-time value. - Authentication is supplied through the
keyandsecretquery parameters. - This endpoint accepts only
GETrequests.