API:Appointments:Updated

From docs
Jump to: navigation, search

API » Get Appointments Updated

Base URL

https://app.callproof.com

Endpoint

/api/appts/updated/

Purpose

Retrieves appointments for your CallProof company within a specified date range. By default, results are filtered by last-updated time. Optionally, results can be filtered by creation time instead. Supports pagination for syncing large appointment volumes.

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 appointments.

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.
after datetime string Yes Return only appointments on or after this date/time, based on the selected filter type. Invalid or missing values cause a validation error.
before datetime string No Return only appointments on or before this date/time, based on the selected filter type. If omitted, no upper date limit is applied.
filter_type string No Date filter mode. Use updated to filter by last-updated time (default), or created to filter by creation time. Any other value falls back to updated.
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/appts/updated/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01"

Example filtering by creation date:

curl -X GET "https://app.callproof.com/api/appts/updated/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01&filter_type=created"

Successful Response (200)

Returns a paginated list of appointments matching the requested date range and filter. Up to 100 appointments are returned per request. If more matching appointments exist, more is set to 1 so the caller can request the next page using offset.

Field Type Description
results array List of appointment objects (maximum 100 per response).
results[].id integer Unique identifier for the appointment.
results[].rep_id integer User ID of the sales representative assigned to the appointment.
results[].rep string Display name of the assigned sales representative.
results[].rep_email string Email address of the assigned sales representative.
results[].contact_id integer Associated contact identifier.
results[].contact string Contact display name.
results[].start string Appointment start date/time (YYYY-MM-DD HH:MM:SS).
results[].stop string Appointment end date/time (YYYY-MM-DD HH:MM:SS), or empty if not set.
results[].updated string Date and time the appointment was last updated.
results[].created string Date and time the appointment was created.
results[].latitude string Geographic latitude for the appointment location.
results[].longitude string Geographic longitude for the appointment location.
results[].distance number or string Distance in miles from the appointment location, when available.
results[].duration integer Appointment duration.
results[].notes string Appointment notes.
results[].title string Appointment title.
results[].address string Appointment address.
results[].scheduled string 1 if the appointment is scheduled; otherwise 0.
more integer 1 if additional matching appointments 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": [
    {
      "id": 3001,
      "rep_id": 456,
      "rep": "Jane Smith",
      "rep_email": "rep@example.com",
      "contact_id": 789,
      "contact": "John Doe",
      "start": "2024-06-15 14:30:00",
      "stop": "2024-06-15 15:30:00",
      "updated": "2024-06-15 12:00:00",
      "created": "2024-06-10 09:00:00",
      "latitude": "30.2672",
      "longitude": "-97.7431",
      "distance": 2.5,
      "duration": 60,
      "notes": "Discuss renewal options",
      "title": "Onsite Visit",
      "address": "123 Main St, Austin, TX",
      "scheduled": "1"
    }
  ],
  "more": 0,
  "offset": 0,
  "errors": [],
  "code": 200
}

Notes

  • Despite the route name, this endpoint reads appointments; it does not update them.
  • By default, results are filtered by the appointment’s last-updated timestamp (filter_type=updated).
  • Set filter_type=created to filter by creation date instead.
  • after is required and must be a valid date/time.
  • before is optional and can be used to limit the upper end of the date range.
  • When filtering by updated, results are ordered by ID ascending. When filtering by created, results are ordered by newest ID first.
  • Up to 100 records are returned per page. Use offset with more to page through larger result sets.
  • Only appointments belonging to your company are returned.

Error Responses

Status Code Meaning
400 Bad Request – The required after parameter is missing or cannot be interpreted as a valid date/time.
401 Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to read appointments.
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 example:

{
  "results": [],
  "errors": ["Invalid 'after' 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
}