Difference between revisions of "API:Reps:Get"
Greg Donald (talk | contribs) (Created page with " == API » Get Reps == '''URL:''' <nowiki>https://app.callproof.com/api/reps/get/</nowiki> '''Method:''' GET '''Required Fields:''' * '''''key''''' - API Key * '''...") |
Ashley DeBon (talk | contribs) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
| + | == [[API]] » Get Sales Reps == | ||
| − | + | The '''Get Sales Reps''' endpoint retrieves sales representatives (reps) for your CallProof company whose profiles were updated within a specified date range. It supports pagination, making it suitable for synchronizing large teams with external systems. | |
| − | + | === Base URL === | |
| + | <code>https://app.callproof.com</code> | ||
| − | + | === Endpoint === | |
| + | <code>/api/reps/get/</code> | ||
| − | + | === Purpose === | |
| + | Use this endpoint to: | ||
| − | * | + | * Retrieve sales representatives updated within a specified date range. |
| − | * | + | * Synchronize rep information with external applications. |
| − | * | + | * Process large result sets using pagination. |
| − | + | === HTTP Method === | |
| + | <code>GET</code> | ||
| − | + | === Headers === | |
| − | |||
| − | + | {| class="wikitable" | |
| + | ! Header | ||
| + | ! Required | ||
| + | ! Description | ||
| + | |- | ||
| + | | None | ||
| + | | No | ||
| + | | This endpoint does not require HTTP headers. Authentication is provided using query parameters. | ||
| + | |} | ||
| − | * | + | === Security === |
| − | + | ||
| − | + | * Authentication is required. | |
| − | + | * Pass the API credentials using the <code>key</code> and <code>secret</code> query parameters. | |
| − | * | + | |
| + | === 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 | ||
| + | | Yes | ||
| + | | Returns only reps updated on or after this date and time. Invalid or missing values return a validation error. | ||
| + | |- | ||
| + | | before | ||
| + | | datetime | ||
| + | | No | ||
| + | | Returns only reps updated on or before this date and time. If omitted, no upper date limit is applied. | ||
| + | |- | ||
| + | | offset | ||
| + | | integer | ||
| + | | No | ||
| + | | Starting offset for paginated results. Defaults to <code>0</code> if omitted or invalid. | ||
| + | |} | ||
| + | |||
| + | ==== Path Parameters ==== | ||
| + | |||
| + | None. | ||
| + | |||
| + | ==== Request Body ==== | ||
| + | |||
| + | None. | ||
| + | |||
| + | === Example Request === | ||
| + | |||
| + | ==== cURL ==== | ||
| + | |||
| + | <pre> | ||
| + | curl -X GET "https://app.callproof.com/api/reps/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01" | ||
| + | </pre> | ||
| + | |||
| + | === Successful Response (200) === | ||
| + | |||
| + | Returns a paginated list of sales representatives that match the requested date range. A maximum of 100 records are returned per request. When additional records are available, the <code>more</code> field is set to <code>1</code>, allowing the next page to be retrieved using the <code>offset</code> parameter. | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Field | ||
| + | ! Type | ||
| + | ! Description | ||
| + | |- | ||
| + | | results | ||
| + | | array | ||
| + | | List of sales representative objects. | ||
| + | |- | ||
| + | | results[].id | ||
| + | | integer | ||
| + | | Unique identifier of the sales representative. | ||
| + | |- | ||
| + | | results[].user_id | ||
| + | | integer | ||
| + | | Associated CallProof user ID. | ||
| + | |- | ||
| + | | results[].email | ||
| + | | string | ||
| + | | Email address of the sales representative. | ||
| + | |- | ||
| + | | results[].name | ||
| + | | string | ||
| + | | Display name of the sales representative. | ||
| + | |- | ||
| + | | results[].title | ||
| + | | string | ||
| + | | Job title of the sales representative. Returns an empty string if no title is assigned. | ||
| + | |- | ||
| + | | results[].updated | ||
| + | | string | ||
| + | | Date and time the sales representative profile was last updated (<code>YYYY-MM-DD HH:MM:SS</code>). | ||
| + | |- | ||
| + | | more | ||
| + | | integer | ||
| + | | Indicates whether additional matching records exist. <code>1</code> = more records available, <code>0</code> = last page. | ||
| + | |- | ||
| + | | offset | ||
| + | | integer | ||
| + | | Offset value used to retrieve the current page. | ||
| + | |- | ||
| + | | errors | ||
| + | | array | ||
| + | | Empty when the request completes successfully. | ||
| + | |- | ||
| + | | code | ||
| + | | integer | ||
| + | | HTTP status code returned by the API. | ||
| + | |} | ||
| + | |||
| + | ==== Example Response ==== | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [ | ||
| + | { | ||
| + | "id": 123, | ||
| + | "user_id": 456, | ||
| + | "email": "rep@example.com", | ||
| + | "name": "Jane Smith", | ||
| + | "title": "Account Executive", | ||
| + | "updated": "2024-06-15 14:30:00" | ||
| + | } | ||
| + | ], | ||
| + | "more": 0, | ||
| + | "offset": 0, | ||
| + | "errors": [], | ||
| + | "code": 200 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | === Error Responses === | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! HTTP Status | ||
| + | ! Description | ||
| + | |- | ||
| + | | 400 | ||
| + | | Bad Request. The required <code>after</code> parameter is missing or contains an invalid date/time value. | ||
| + | |- | ||
| + | | 401 | ||
| + | | Unauthorized. The API Key or Secret is missing, invalid, inactive, belongs to a disabled account, or does not have permission to access sales representative data. | ||
| + | |- | ||
| + | | 405 | ||
| + | | Method Not Allowed. Only the <code>GET</code> method is supported. | ||
| + | |- | ||
| + | | 500 | ||
| + | | Internal Server Error. An unexpected server error occurred. | ||
| + | |} | ||
| + | |||
| + | ==== 400 Bad Request ==== | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Invalid 'after' field" | ||
| + | ], | ||
| + | "code": 400 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | ==== 401 Unauthorized ==== | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Invalid API Key" | ||
| + | ], | ||
| + | "code": 401 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | ==== 405 Method Not Allowed ==== | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Method not allowed" | ||
| + | ], | ||
| + | "code": 405 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | === Notes === | ||
| + | |||
| + | * Authentication credentials must be supplied as the <code>key</code> and <code>secret</code> query parameters. | ||
| + | * This endpoint does '''not''' support Bearer Token authentication. | ||
| + | * Results are limited to a maximum of 100 sales representatives per request. | ||
| + | * Use the <code>offset</code> parameter together with the <code>more</code> response field to retrieve additional pages of results. | ||
| + | * The <code>after</code> parameter is required and must contain a valid date or date-time value. | ||
Latest revision as of 07:44, 17 July 2026
Contents
API » Get Sales Reps
The Get Sales Reps endpoint retrieves sales representatives (reps) for your CallProof company whose profiles were updated within a specified date range. It supports pagination, making it suitable for synchronizing large teams with external systems.
Base URL
Endpoint
/api/reps/get/
Purpose
Use this endpoint to:
- Retrieve sales representatives updated within a specified date range.
- Synchronize rep information with external applications.
- Process large result sets using pagination.
HTTP Method
GET
Headers
| Header | Required | Description |
|---|---|---|
| None | No | This endpoint does not require HTTP headers. Authentication is provided using query parameters. |
Security
- Authentication is required.
- Pass the API credentials using the
keyandsecretquery parameters.
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 | Yes | Returns only reps updated on or after this date and time. Invalid or missing values return a validation error. |
| before | datetime | No | Returns only reps updated on or before this date and time. If omitted, no upper date limit is applied. |
| offset | integer | No | Starting offset for paginated results. Defaults to 0 if omitted or invalid.
|
Path Parameters
None.
Request Body
None.
Example Request
cURL
curl -X GET "https://app.callproof.com/api/reps/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01"
Successful Response (200)
Returns a paginated list of sales representatives that match the requested date range. A maximum of 100 records are returned per request. When additional records are available, the more field is set to 1, allowing the next page to be retrieved using the offset parameter.
| Field | Type | Description |
|---|---|---|
| results | array | List of sales representative objects. |
| results[].id | integer | Unique identifier of the sales representative. |
| results[].user_id | integer | Associated CallProof user ID. |
| results[].email | string | Email address of the sales representative. |
| results[].name | string | Display name of the sales representative. |
| results[].title | string | Job title of the sales representative. Returns an empty string if no title is assigned. |
| results[].updated | string | Date and time the sales representative profile was last updated (YYYY-MM-DD HH:MM:SS).
|
| more | integer | Indicates whether additional matching records exist. 1 = more records available, 0 = last page.
|
| offset | integer | Offset value used to retrieve the current page. |
| errors | array | Empty when the request completes successfully. |
| code | integer | HTTP status code returned by the API. |
Example Response
{
"results": [
{
"id": 123,
"user_id": 456,
"email": "rep@example.com",
"name": "Jane Smith",
"title": "Account Executive",
"updated": "2024-06-15 14:30:00"
}
],
"more": 0,
"offset": 0,
"errors": [],
"code": 200
}
Error Responses
| HTTP Status | Description |
|---|---|
| 400 | Bad Request. The required after parameter is missing or contains an invalid date/time value.
|
| 401 | Unauthorized. The API Key or Secret is missing, invalid, inactive, belongs to a disabled account, or does not have permission to access sales representative data. |
| 405 | Method Not Allowed. Only the GET method is supported.
|
| 500 | Internal Server Error. An unexpected server error occurred. |
400 Bad Request
{
"results": [],
"errors": [
"Invalid 'after' field"
],
"code": 400
}
401 Unauthorized
{
"results": [],
"errors": [
"Invalid API Key"
],
"code": 401
}
405 Method Not Allowed
{
"results": [],
"errors": [
"Method not allowed"
],
"code": 405
}
Notes
- Authentication credentials must be supplied as the
keyandsecretquery parameters. - This endpoint does not support Bearer Token authentication.
- Results are limited to a maximum of 100 sales representatives per request.
- Use the
offsetparameter together with themoreresponse field to retrieve additional pages of results. - The
afterparameter is required and must contain a valid date or date-time value.