Discussions
Fetch form submission PDF file
Hi team 👋🏼,
Thanks for a very well-documented API.
In your help center, I found this article about downloading a form submission as a PDF.
[](<>)<https://help.connecteam.com/en/articles/8740470-can-i-download-a-pdf-or-print-out-a-form-that-my-employee-filled-out>
This is a great feature for the users/managers. I have not been able to find a similar option using the API. If we call the [https://developer.connecteam.com/reference/get_form_submission_forms_v1_forms__formid__form_submissions__formsubmissionid__get]\(Get form submission endpoint), there's no reference to a download URL, apart from a signature image download URL.
Is there another endpoint we need to call to generate these PDF download URLs?
For compliance reasons, we need to automatically fetch each submission from specific forms and store them in our HR platform.
I've also checked out the webhook (which isn't live yet I believe). Also there I couldn't find any download URLs.
[](<>)<https://developer.connecteam.com/docs/forms-webhook>
Thanks!
Posted by LH 3 days ago
Read only api keys for data analytics
Hi,
I am using power query API requests to fetch data into my excel / power BI reports and it works fine on my local environment.
My plan was to share this with other coworkers using sharepoint but I am not going to. The problem is that the API key is embedded in powerquery m code.
Right now the same API key can be use to create GET POST DELETE UPDATE requests on all endpoints.
Maybe you could consider ability to generate read only API keys that can only do GET requests or even API key per endpoint that is only capable of making requests only to specific endpoint.
My development knowledge is very basic and I know it is a bit off-topic but maybe you could recommend me other way to let my coworkers fetch the data from Connecteam API in a secure way without having to share the API key.
My main focus at this moment is to create table which fetches jobs list with job code, title, location using API. To give my coworkers the ability to trigger the request on demand. Right now there is no way to export job code from jobs list in Connecteam frontend.
Any help or tips would be appreciated.
Posted by Mateusz 10 days ago
Retrieving sub-job/sub-job code for Integrations
I am currently testing the connecteam API capabilities, and am interested in retrieving the not only the job name but the job code, sub job, and sub job code for the purpose of automatically sending information to payroll. I have stored the charge code in the sub-job code due to the way our system is set up to differentiate charge code based on both location and job name.
Could your team add API capabilities for sub-job and sub-job code retrieval? I think this would add more possibilities for unique workflows and seemless integration. If this is already possible, I would love to know where I can find such querys or bodys. Thank you.
Posted by Renee about 1 month ago
Creating Notifications when Employees aren't clocked in on time Issues
We're building an automated system to notify our managers if any employees haven't clocked in by 8:30 AM MDT. We're leveraging AWS Lambda and Connecteam's API to achieve this.
Steps Taken:
API Setup: We set up a Lambda function that queries the /time_clock/v1/time_clocks/{timeclockid}/time_activities endpoint. We've verified that the time clock IDs (8001584 and 8163931) are correct.
Environment Configuration: The API key is securely stored in AWS Lambda's environment variables.
Function Logic: The function fetches time activities for the specified time clocks, checks the clock_in_time field, and compares it to the 8:30 AM MDT deadline. If no one has clocked in by that time, a Slack notification is triggered via AWS Chatbot.
Issues Encountered:
API Response: Despite using the correct endpoint and IDs, the API consistently returns {"detail": "Not Found"}.
Time Activity Data: We’ve verified that employees did clock in before 8:30 AM MDT, but this data isn’t being reflected in the API response.
Troubleshooting: We’ve tried logging the full API response, verified the clock IDs, and ensured the API key has the appropriate permissions.
Request: We’re seeking guidance on why the API might be returning a "Not Found" error and whether there might be any additional steps or configurations needed to correctly retrieve time activities for the specified clocks.
Current Code:
```
import json
import urllib3
import os
from datetime import datetime
# Retrieve API key from environment variables
CONNECTEAM_API_KEY = os.environ['CONNECTEAM_API_KEY']
# Time Clock IDs
TIME_CLOCK_IDS = {
"In-House Clock": "8001584",
"Sub Check in": "8163931"
}
def check_clock_in():
http = urllib3.PoolManager()
headers = {
"accept": "application/json",
"Authorization": f"Bearer {CONNECTEAM_API_KEY}"
}
not_clocked_in = []
for clock_name, clock_id in TIME_CLOCK_IDS.items():
url = f"https://api.connecteam.com/time-clock/v1/time-clocks/{clock_id}/time_activities"
try:
response = http.request('GET', url, headers=headers)
# Log the raw response for debugging
print("Full Response from API:")
print(response.data.decode('utf-8')) # Log entire response for better insight
activities = json.loads(response.data.decode('utf-8'))
# Check for clock-in activities by 8:30 AM
for activity in activities:
if 'clock_in_time' in activity and activity['clock_in_time'] is not None:
clock_in_time = datetime.fromisoformat(activity['clock_in_time'])
if clock_in_time.time() <= datetime.now().replace(hour=8, minute=30).time():
break
else:
# If no one clocked in by 8:30 AM
not_clocked_in.append(f"No one clocked in for {clock_name} by 8:30 AM")
except Exception as err:
print(f"An error occurred for {clock_name}: {err}")
if not_clocked_in:
notify_managers(not_clocked_in)
def notify_managers(employee_names):
# This function will trigger the AWS Chatbot to notify Slack
print("The following issue was detected:\n" + "\n".join(employee_names))
def lambda_handler(event, context):
check_clock_in()
return {
'statusCode': 200,
'body': json.dumps('Check completed successfully')
}
```
Posted by Jonah Herman about 2 months ago
Update Shifts: Internal Server Error
I am having an issue updating a shift in the schedule. This issue can repeated using the live API. Simply enter a valid schedulerID then create and object and enter a valid shiftID along with, say, a new title. After having provided all required parameters, click "Try It!" and observe the response.
{
"details": {
"error_message": "Internal server error",
"error_code": 1000
},
"error": "Internal Server Error",
"path": "/scheduler/v1/schedulers/<valid schedular id>/shifts",
"request_id": "db105255-6581-4ea0-835d-bfad9c1b7f82"
}
Presumably, this should return a success response or a response to indicate a reason as to why the shift title (in this example) cannot be changed.
Posted by Chris 2 months ago
Extraction of user activity data
Hello everyone, I need help, I'm trying to get to the Last logged-in field in the Usage info section, how can I get that data and from where ?
I've been doing software engineering for 5+ years (Python), I'm trying to create a possibility that will check if the user has entered the application at least once in the last 7-14 days, if not I need to archive it.
Posted by Miloš 2 months ago
API URL parameters error
trying to get more than 100 responses in one API call but it keeps on failing
<br />
Here is my get request
<https://api.connecteam.com/forms/v1/forms/7526318/form-submissions?limit=100&offset=0>
Here is the error message:
<br />
statusCode 400
error Bad Request
message {"details":{"error_message":"Request query is invalid","error_code":1003},"error":{"inputValue":{"message":"value is not a valid integer","type":"type_error.integer"}},"path":"/forms/v1/forms/7526318/form-submissions","request_id":"4ce33b08-ad7e-4bed-ade3-4bdd064ef348"}
Posted by Hussein 3 months ago
API URL parameters error
trying to get more than 100 responses in one API call but it keeps on failing
<br />
Here is my get request
<https://api.connecteam.com/forms/v1/forms/7526318/form-submissions?limit=100&offset=0>
Here is the error message:
<br />
statusCode 400
error Bad Request
message {"details":{"error_message":"Request query is invalid","error_code":1003},"error":{"inputValue":{"message":"value is not a valid integer","type":"type_error.integer"}},"path":"/forms/v1/forms/7526318/form-submissions","request_id":"4ce33b08-ad7e-4bed-ade3-4bdd064ef348"}
Posted by Hussein 3 months ago
Unable to find form ID
Been testing the API for my company before I buy the full package. But I cant get the API to work with the Forms. I tried but get:
```
{
"detail": "the requested form id - {redacted} doesn't exist"
}
```
Thanks.
Posted by Brandon 3 months ago
Is there any documentation for locating specific answers to forms?
I'm looking to make a piece of software for the company I work at but I need to filter forms to different google drive folders based on answers submitted. Is there documentation missing or is the API simply just not that in-depth with features?
Posted by Bayan Raisi 3 months ago