Endpoints
Upload import template
Upload Excel file with collaborator data for bulk import
POST
/
v1
/
collaborators
/
import-excel
Upload import template
curl --request POST \
--url https://api.capitalcheckin.app/v1/collaborators/import-excel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.capitalcheckin.app/v1/collaborators/import-excel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.capitalcheckin.app/v1/collaborators/import-excel"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.capitalcheckin.app/v1/collaborators/import-excel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "<string>",
"total_rows": 123,
"valid_rows": 123,
"invalid_rows": 123,
"preview": [
{
"name": "<string>",
"email": "jsmith@example.com",
"position": "<string>",
"department": "<string>",
"phone": "<string>",
"hire_date": "2023-12-25",
"salary": 123,
"manager_id": "<string>",
"work_schedule": "<string>",
"location": "<string>",
"emergency_contact": {
"name": "<string>",
"phone": "<string>",
"relationship": "<string>"
}
}
]
}Authorizations
OAuth2 access token for authentication
Body
multipart/form-data
Excel file with collaborator data
⌘I
Upload import template
curl --request POST \
--url https://api.capitalcheckin.app/v1/collaborators/import-excel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.capitalcheckin.app/v1/collaborators/import-excel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.capitalcheckin.app/v1/collaborators/import-excel"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.capitalcheckin.app/v1/collaborators/import-excel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "<string>",
"total_rows": 123,
"valid_rows": 123,
"invalid_rows": 123,
"preview": [
{
"name": "<string>",
"email": "jsmith@example.com",
"position": "<string>",
"department": "<string>",
"phone": "<string>",
"hire_date": "2023-12-25",
"salary": 123,
"manager_id": "<string>",
"work_schedule": "<string>",
"location": "<string>",
"emergency_contact": {
"name": "<string>",
"phone": "<string>",
"relationship": "<string>"
}
}
]
}