Import persons from a CSV file. Creates or updates persons based on CSV rows. Supports role, contract type, and active status updates.
POST
/import/csv/persons
curl
curl -X POST "http://api.example.com/import/csv/persons?update=false" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/import/csv/persons"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {
"update": false
}
payload = None
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
curl \
--request POST 'http://api.example.com/import/csv/persons' \
--header "Authorization: $API_KEY"
Response examples (201)
[
{
"id": "a24a6ea4-ce75-4665-a070-57453082c25",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": 1234567890,
"active": true
}
]