Create Employee In Workday

For this API, we can pass the following parameters:

  • employment
    • positionId (String)
    • designation (String)
  • workAddress
    • state (String, ISO 3166-2 code e.g., "US-NY")
    • country (String, ISO 3166-1 alpha-3 code e.g., "USA")
    • zipCode (String, ZIP Code format e.g., "10005")
    • addressLine1 (String)
    • city (String)
  • presentAddress
    • state (String, ISO 3166-2 code e.g., "US-NY")
    • country (String, ISO 3166-1 alpha-3 code e.g., "USA")
    • zipCode (String, ZIP Code format e.g., "10005")
    • addressLine1 (String)
    • city (String)
  • startDate (String, Date format: YYYY-MM-DD e.g., "2025-02-28")
  • birthDate (String, Date format: YYYY-MM-DD e.g., "1990-02-28")
  • maritalStatus (String, e.g., "Single_USA")
  • employmentType (String, e.g., "FULL_TIME")
  • gender (String, e.g., "MALE")
  • phones
    • type (String, e.g., "WORK", "PERSONAL")
    • phoneNumber (String, E.164 format e.g., "8005550100")
  • firstName (String)
  • lastName (String)
  • workEmail (String, Email format e.g., "[email protected]")
  • personalEmails (Array of Strings, Email format e.g., ["[email protected]"])

A cURL request to create an employee could look like this:

curl --location 'https://api.getknit.dev/v1.0/hr.employee.create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'X-Knit-Integration-Id: <INTEGRATION_ID>' \
--data-raw '{
    "employment": {
        "positionId": "P-03894",
        "designation": "Product Manager"
    },
    "workAddress": {
        "state": "US-NY",
        "country": "USA",
        "zipCode": "10005",
        "addressLine1": "Waystar Royco Building",
        "city": "New York"
    },
    "presentAddress": {
        "state": "US-NY",
        "country": "USA",
        "zipCode": "10005",
        "addressLine1": "Roy Home Building",
        "city": "New York"
    },
    "startDate": "2025-02-28",
    "birthDate": "1990-02-28",
    "maritalStatus": "Single_USA",
    "employmentType": "FULL_TIME",
    "gender": "MALE",
    "phones": [
        {
            "type": "WORK",
            "phoneNumber": "8005550100"
        },
        {
            "type": "PERSONAL",
            "phoneNumber": "8005550100"
        }
    ],
    "firstName": "Akshat",
    "lastName": "Roy",
    "workEmail": "[email protected]",
    "personalEmails": [
        "[email protected]"
    ]
}'

Get List of Marital Statuses from Workday

To get the list of Marital Statuses from Workday, we can use the List of values API.

A cURL request could look like this:

curl --request GET \
     --url 'https://api.getknit.dev/v1.0/hr.employees.field.values?fieldType=Marital_Status_ID' \
     --header 'Authorization: Bearer <API_KEY>' \
     --header 'X-Knit-Integration-Id: <INTEGRATION_ID>' \
     --header 'accept: application/json'