Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
POST

Create an employee

Scope: team:employees.write https://api.alladdin.com/api/v2/employees

Creates a new employee.
The response returns the new employee id.

Request body

object name string required

First name

last_name string required

Last name

email string<email> required

Primary email

workplace_id string | null optional

Workplace ID

phone string | null optional

Phone number

mobile string | null optional

Mobile number

date_of_birth string | null optional

Date of birth

gender string | null optional

Gender

main_language string | null optional

Main language code

nationality string | null optional

Nationality code

code string | null optional

Employee code

social_security_number string | null optional

Social security number

iban string | null optional

IBAN

reporting_to string | null optional

Reporting-to employee ID

team_ids[] string[] | null optional

Team IDs

Request

python
import requests

url = "https://api.alladdin.com/api/v2/employees"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "name": "string",
    "last_name": "string",
    "email": "[email protected]",
    "workplace_id": "string",
    "phone": "string",
    "mobile": "string",
    "date_of_birth": "string",
    "gender": "string",
    "main_language": "string",
    "nationality": "string",
    "code": "string",
    "social_security_number": "string",
    "iban": "string",
    "reporting_to": "string",
    "team_ids": [
        "string"
    ]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011"
}

Success responses

201 Employee created application/json object id string

Error responses

400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 409 An employee with this email already exists application/json object type string title string status integer detail string 422 Validation error application/json 429 Rate limit exceeded application/json

Next →Update an employee →