### Stock Object Example Source: https://developers.freshteam.com/api Provides a comprehensive example of the stock object structure, including all its attributes and nested objects. ```json { "id": 1, "deleted": false, "grant_date": "2019-08-20", "grant_number": 20, "expiration_date": "2019-08-23", "currency": "USD", "total_stock_units": 20, "exercise_price": 70, "exercise_price_discount": 7, "value_per_share": 27, "with_in_range": true, "vesting_type": 2, "effective_date": "2019-08-21", "vesting_period": 20, "vesting_schedule": "weeks", "vesting_rate": 20, "description": "Notes", "grant_reason": { "id": 55, "value": "Promotion" }, "grant_type": { "id": 61, "value": "RSU" }, "pay_rate": { "id": 6, "name": "Weekly" } } ``` -------------------------------- ### Business Unit Object Example Source: https://developers.freshteam.com/api An example of a business unit object. It includes an ID, timestamps, deletion status, name, and an optional description. ```json { "id":3000016570, "created_at":"2019-10-15T10:59:58.000Z", "updated_at":"2019-10-15T10:59:58.000Z", "deleted":false, "name":"DevOps", "description":null } ``` -------------------------------- ### Role Object Example Source: https://developers.freshteam.com/api This is an example of a single role object, detailing its attributes such as ID, creation and update timestamps, name, description, and default status. ```json { "id":3000060409, "created_at":"2019-09-15T09:17:43.000Z", "updated_at":"2019-11-09T06:00:07.000Z", "name":"Account Admin", "description":"Can Access \u0026 Modify the entire Freshteam account including account and billing related information.", "default":true } ``` -------------------------------- ### New Hire Request Body Example Source: https://developers.freshteam.com/api This JSON object represents a complete example of the request body for creating a new hire. It includes all possible fields and their corresponding values. ```json { "first_name": "Jack", "middle_name": "L", "last_name": "Smith", "employee_id": "E001", "status": "hired", "official_email": "jack2345@gmail.com", "personal_email": "jack@new.com", "employee_type": "full_time", "work_numbers": [ { "name": "Work", "number": "7826332634" } ], "date_of_birth": "1997-05-29", "gender": "male", "blood_group": "A-", "address": { "street": "Rockville avenue", "city": "Chennai", "state": "TamilNadu", "country_code": "IND", "zip_code": "607001" }, "communication_address": { "communication_street": "Woody street", "communication_city": "Chennai", "communication_state": "TamilNadu", "communication_country_code": "IND", "communication_zip_code": "607001", "same_as_residential": true }, "designation": "Developer", "joining_date": "2020-02-10", "branch_id": 3000011495, "team_id": null, "business_unit_id": null, "sub_department_id": null, "department_id": null, "reporting_to_id": null, "hr_incharge_id": null, "level_id": null, "shift_id": null, "custom_fields": { "hobbies_cf_str01": null, "test_field_cf_str03": null, "payroll_id_cf_str04": null, "citizenship_cf_str02": { "id": 0, "value": null } }, "hired_on": "2020-01-20" } ``` -------------------------------- ### Sub-department Object Example Source: https://developers.freshteam.com/api An example of a sub-department object. It contains an ID, creation and update timestamps, deletion status, and the sub-department's name. ```json { "id": 1, "created_at": "2019-07-05T10:04:56.000Z", "updated_at": "2019-07-05T10:04:56.000Z", "deleted": false, "name": "Freshteam" } ``` -------------------------------- ### Sample cURL request to get job postings Source: https://developers.freshteam.com/api This cURL command demonstrates how to make a GET request to the job postings endpoint, including necessary headers for authentication and content type. ```curl curl -X GET "https://.freshteam.com/api/job_postings" -H "accept: application/json" -H "Authorization: Bearer KszAL6WR2fM3yD4ZEgMXuA" ``` -------------------------------- ### Accept Header Example Source: https://developers.freshteam.com/api Demonstrates the format for the Accept header, specifying the desired response format. Use 'application/json' for JSON responses or '*/*' for any acceptable format. ```http Accept: application/json ``` -------------------------------- ### Department Object Example Source: https://developers.freshteam.com/api An example of a department object returned by the API. It includes the department's ID, creation and update timestamps, deletion status, and name. ```json { "id": 3000126932, "created_at": "2019-09-15T09:17:44.000Z", "updated_at": "2019-09-15T09:17:44.000Z", "deleted": false, "name": "Administration" } ``` -------------------------------- ### Source Object Example Source: https://developers.freshteam.com/api Represents a candidate source within the Freshteam system. Includes details like ID, timestamps, label, default status, and lead count. ```json { "id": 3000084630, "created_at": "2019-09-15T09:18:41.000Z", "updated_at": "2019-09-15T09:18:41.000Z", "deleted": false, "label": "Adzuna", "default": true, "leads_count": 9 } ``` -------------------------------- ### Timeoff Object Example Source: https://developers.freshteam.com/api An example of the timeoff object structure, detailing the attributes included for each time-off record. ```APIDOC ## The timeoff object ### Example ```json { "id":3000031566, "created_at":"2019-09-15T09:18:44.000Z", "updated_at":"2019-09-15T09:18:44.000Z", "user_id":3000053373, "start_date":"2019-01-01", "end_date":"2019-01-04", "status":"approved", "leave_units":3, "optional_leave_units":null, "leave_type_id":3000011436, "status_comments":null, "approved_by_id":null, "applied_by_id":3000053373, "cancelled_by_id":null, "rejected_by_id":null, "comments":"Hospital appointment", "rejected_at":null, "cancelled_at":null } ``` ``` -------------------------------- ### New Hire Object Example Source: https://developers.freshteam.com/api This object represents a new hire in Freshteam, containing personal details, employment information, and contact addresses. ```json { "id": 3000145443, "created_at": "2021-02-08T05:16:26.000Z", "updated_at": "2021-02-08T05:16:26.000Z", "deleted": false, "eeo_ethnicity": null, "eeo_job_category": null, "id_card_details": null, "workstation_number": null, "work_numbers": [{ "name": "Work", "number": "7826332634" }], "nick_name": null, "date_of_birth": "1997-05-29", "marital_status": null, "gender": "male", "blood_group": "A-", "emergency_contacts": null, "social_profiles": null, "address": { "street": "Rockville avenue", "city": "Chennai", "state": "TamilNadu", "country_code": "IND", "zip_code": "607001" }, "phone_numbers": null, "communication_address": { "communication_street": "Woody street", "communication_city": "Chennai", "communication_state": "TamilNadu", "communication_country_code": "IND", "communication_zip_code": "607001", "same_as_residential": true }, "designation": "Developer", "joining_date": "2020-02-10", "probation_start_date": "2020-02-10", "probation_end_date": "2020-08-10", "branch_id": 3000011495, "team_id": null, "business_unit_id": null, "sub_department_id": null, "department_id": null, "reporting_to_id": null, "hr_incharge_id": null, "level_id": null, "shift_id": null, "user_function_id": null, "cost_center_id": null, "termination_date": null, "termination_reason": null, "notice_period": null, "notice_start_date": null, "notice_end_date": null, "termination_category_id": null, "custom_fields": { "hobbies_cf_str01": null, "test_field_cf_str03": null, "payroll_id_cf_str04": null, "citizenship_cf_str02": { "id": 0, "value": null } }, "avatar_url": null, "first_name": "Jack", "middle_name": "L", "last_name": "Smith", "employee_id": "E001", "status": "hired", "official_email": "jack2345@gmail.com", "personal_email": "jack@new.com", "user_category": "onboarding", "employee_type": "full_time", "draft": false, "terminated": false, "hired_on": "2020-01-20", "no_show": false, "no_show_reason": null } ``` -------------------------------- ### User Function Object Example Source: https://developers.freshteam.com/api An example of a user function object, which represents a specific function within an organization's team in Freshteam. ```json { "id": 490196, "created_at": "2019-11-12T10:29:28.000Z", "updated_at": "2019-11-12T10:29:28.000Z", "value": "design", "position": 6 } ``` -------------------------------- ### Branch Object Example Source: https://developers.freshteam.com/api This is an example of a branch object, detailing its attributes and their data types. It represents a single office location within an organization. ```json { "id":3000011495, "created_at":"2019-09-15T09:17:43.000Z", "updated_at":"2019-09-25T06:42:39.000Z", "deleted":false, "name":"Default - Head office", "state":null, "city":"Chennai", "country_code":"IN", "zip":null, "time_zone":"Asia/Calcutta", "currency":"USD", "language":"en", "main_office":true, "date_format":"MonthFirst" } ``` -------------------------------- ### Department Object Example Source: https://developers.freshteam.com/api This is an example of a department object, showing its identifier, creation and update timestamps, deletion status, and name. It represents a functional division within an organization. ```json { "id":3000126932, "created_at":"2019-09-15T09:17:44.000Z", "updated_at":"2019-09-15T09:17:44.000Z", "Deleted":false, "name":"Administration" } ``` -------------------------------- ### Employee Object Example Source: https://developers.freshteam.com/api This is an example of the employee object returned by the Freshteam API. It includes details about the employee's personal information, employment status, and associated team and address details. Use this structure to understand the data you can retrieve for employees. ```json { "id": 3000053373, "created_at": "2019-09-15T09:17:43.000Z", "updated_at": "2019-10-17T13:56:13.000Z", "deleted": false, "work_numbers": [ { "name": "Work", "number": "9716638376" } ], "nick_name": null, "date_of_birth": null, "gender": "male", "phone_numbers": [], "designation": null, "joining_date": "2019-09-25", "termination_date": null, "first_name": "Aditya", "middle_name": null, "last_name": "Sharma", "employee_id": "E001", "employee_type": "full time", "draft": false, "terminated": false, "status": "active", "official_email": "aditya.sharma+2519@freshworks.com", "personal_email": null, "branch_id": 3, "team_id": 3000043460, "department_id": 1, "sub_department_id": 1, "business_unit_id": 4, "reporting_to_id": 3, "hr_incharge_id": 3, "shift_id": 1, "address": { "street": "1312 Pape Avenue", "state": "Ontario", "city": "Toronto", "country_code": "CA", "zip_code": "" }, "communication_address": { "communication_street": "1312 Pape Avenue", "communication_state": "Ontario", "communication_city": "Toronto", "communication_country_code": "CA", "communication_zip_code": "", "same_as_residential": false }, "custom_field_values": { "hobbies_cf_str01": null, "citizenship_cf_str02": { "id": 0, "value": null } }, "team": { "id": 3000043460, "created_at": "2019-09-15T09:17:43.000Z", "updated_at": "2019-09-15T09:17:43.000Z", "deleted": false, "name": "Business" } } ``` -------------------------------- ### Retrieve employees from multiple locations with sorting Source: https://developers.freshteam.com/api Example to retrieve all details of employees in specified locations and sort the information by first name in ascending order. ```HTTP GET /api/employees?location=3000011495,3000011496&sort=first_name&sort_type=asc ``` -------------------------------- ### Authorization Header Example Source: https://developers.freshteam.com/api Shows the format for the Authorization header, which uses a Bearer token for authentication. The access-token is obtained from the Freshteam authentication server. ```http Authorization: Bearer ``` -------------------------------- ### Content-Type Header Example Source: https://developers.freshteam.com/api Illustrates the Content-Type header format, indicating the format of the data sent in the request body. 'application/json' is used for JSON objects. ```http Content-Type: application/json ``` -------------------------------- ### Sample Curl Request to Get Employees Source: https://developers.freshteam.com/api A sample cURL command to fetch employee data from the Freshteam API, including authorization headers. ```curl curl -X GET "https://.freshteam.com/api/employees" -H "accept: application/json" -H "Authorization: Bearer D4HN6sD0qjUVI32cDCnQeQ" ``` -------------------------------- ### Source Category Object Example Source: https://developers.freshteam.com/api Represents a category for grouping candidate sources. Includes ID, timestamps, label, default status, and lead count. ```json { "id": 3000078215, "created_at": "2019-09-15T09:18:40.000Z", "updated_at": "2019-09-15T09:18:40.000Z", "deleted": false, "label": "Advertisement", "default": false, "leads_count": 8 } ``` -------------------------------- ### Create Time Off Request Source: https://developers.freshteam.com/api Example of a JSON payload to create a new time off request. It includes essential details like start and end dates, leave type, and comments. ```json { "start_date": "2019-11-15", "end_date": "2019-11-17", "optional_leave_days": [], "notify_to": [], "add_to_calendar": false, "auto_decline_events": false, "leave_type_id": 3000011437, "comments": "Personal work" } ``` -------------------------------- ### Sample Response for Create Candidate Source Source: https://developers.freshteam.com/api A successful request to create a candidate source returns a 201 Created status and the created source object, including its ID and timestamps. ```json { "id": 3000185680, "created_at": "2021-01-29T09:12:45.000Z", "updated_at": "2021-01-29T09:12:45.000Z", "deleted": false, "label": "JobAgency", "default": false, "leads_count": 0 } ``` -------------------------------- ### Create New Hire Source: https://developers.freshteam.com/api Adds a prospective employee to the New Hire Queue, initiating the onboarding process. ```APIDOC ## POST /new_hires ### Description Creates a new hire record in the Freshteam system. ### Method POST ### Endpoint /new_hires ### Request Body - **first_name** (string) - Required - The first name of the new hire. - **last_name** (string) - Required - The last name of the new hire. - **official_email** (string) - Required - The official email address for the new hire. - **joining_date** (string) - Required - The date the new hire is expected to join. - **designation** (string) - Optional - The job title of the new hire. - **work_numbers** (array) - Optional - A list of work phone numbers. - **name** (string) - Required - The type of work number (e.g., "Work"). - **number** (string) - Required - The phone number. - **address** (object) - Optional - The residential address of the new hire. - **street** (string) - Required - Street name and number. - **city** (string) - Required - City. - **state** (string) - Required - State or province. - **country_code** (string) - Required - Two-letter country code (ISO 3166-1 alpha-2). - **zip_code** (string) - Required - Postal code. ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the newly created hire. - **created_at** (string) - The timestamp when the hire record was created. - **updated_at** (string) - The timestamp when the hire record was last updated. - **status** (string) - The current status of the new hire (e.g., "hired"). #### Response Example { "id": 3000145443, "created_at": "2021-02-08T05:16:26.000Z", "updated_at": "2021-02-08T05:16:26.000Z", "status": "hired" } ``` -------------------------------- ### List All Candidate Sources Source: https://developers.freshteam.com/api Retrieves a list of all sources configured in the Freshteam system. Requires authorization. ```curl curl -X GET "https://.freshteam.com/api/candidate_sources" -H "accept: application/json" -H "Authorization: Bearer KszAL6WR2fM3yD4ZEgMXuA" ``` -------------------------------- ### Error Response Example Source: https://developers.freshteam.com/api This is an example of an error response from the Freshteam API. It details the structure of the 'errors' array, which contains objects describing the cause of the API request failure. ```json { "errors": [ { "code": "invalid_value", "message": "Value not present in system", "field": "leave_type_id" } ] } ``` -------------------------------- ### List All Branches - Sample Request (Curl) Source: https://developers.freshteam.com/api This cURL command demonstrates how to retrieve a list of all branches configured for an organization. Ensure you replace '' with your actual Freshteam account name and use a valid authorization token. ```curl curl -X GET "https://.freshteam.com/api/branches" -H "accept: application/json" -H "Authorization: Bearer D4HN6sD0qjUVI32cDCnQeQ" ``` -------------------------------- ### Sample Response for Levels Source: https://developers.freshteam.com/api A successful request for levels returns a 200 OK status with an array of level objects. Response data is subject to pagination parameters. ```json [ { "id":3000056483, "created_at":"2019-09-15T09:17:44.000Z", "updated_at":"2019-09-15T09:17:44.000Z", "deleted":false, "name":"IC1" }, { "id":3000056484, "created_at":"2019-09-15T09:17:45.000Z", "updated_at":"2019-09-15T09:17:45.000Z", "deleted":false, "name":"IC2" }, { "id":3000056485, "created_at":"2019-09-15T09:17:45.000Z", "updated_at":"2019-09-15T09:17:45.000Z", "deleted":false, "name":"IC3" } ] ``` -------------------------------- ### Sample User Functions Response Source: https://developers.freshteam.com/api A successful request to retrieve user functions returns a 200 OK status with an array of user function objects. ```json [ { "id": 490196, "created_at": "2019-11-12T10:29:28.000Z", "updated_at": "2019-11-12T10:29:28.000Z", "value": "design", "position": 6 }, { "id": 490197, "created_at": "2019-11-12T10:29:28.000Z", "updated_at": "2019-11-12T10:29:28.000Z", "value": "gtm", "position": 1 }, { "id": 490198, "created_at": "2019-11-12T10:29:28.000Z", "updated_at": "2019-11-12T10:29:28.000Z", "value": "product ", "position": 5 } ] ``` -------------------------------- ### Employee Field Object Example Source: https://developers.freshteam.com/api This snippet shows an example of a 'field_group' type employee field object, representing a section like 'General Information'. It includes details on creation, update, and configuration. ```json { "id": 860161, "created_at": "2019-09-15T09:17:45.000Z", "updated_at": "2019-09-15T09:17:45.000Z", "employee_form_id": 3000008188, "name": "basic_info", "label": "General Information", "field_type": "field_group", "position": 1, "default": true, "viewable_by": "all", "editable_by": "self", "tab": "personal", "field_scopes": [] } ``` -------------------------------- ### List Candidate Sources Source: https://developers.freshteam.com/api Retrieves a list of all sources configured in the Freshteam system. The response includes details for each source. ```json [ { "id": 3000084630, "created_at": "2019-09-15T09:18:41.000Z", "updated_at": "2019-09-15T09:18:41.000Z", "deleted": false, "label": "Adzuna", "default": true, "leads_count": 9 }, { "id": 3000084623, "created_at": "2019-09-15T09:18:41.000Z", "updated_at": "2019-09-15T09:18:41.000Z", "deleted": false, "label": "Direct", "default": true, "leads_count": 12 } ] ``` -------------------------------- ### Get job postings Source: https://developers.freshteam.com/api Retrieves information pertaining to all job openings. ```APIDOC ## GET /job_postings ### Description Retrieves information pertaining to all job openings. ### Method GET ### Endpoint /job_postings ### Parameters None ### Request Example None provided in source. ### Response None provided in source. ``` -------------------------------- ### List all candidate sources Source: https://developers.freshteam.com/api Retrieves a list of all sources configured in the Freshteam system, including both default and custom sources. ```APIDOC ## GET /candidate_sources ### Description Retrieves a list of all sources configured in the Freshteam system. ### Method GET ### Endpoint /candidate_sources ### Parameters #### Query Parameters None ### Request Example ```curl curl -X GET "https://.freshteam.com/api/candidate_sources" -H "accept: application/json" -H "Authorization: Bearer KszAL6WR2fM3yD4ZEgMXuA" ``` ### Response #### Success Response (200) - **id** (integer) - Identifier of the source object. - **created_at** (string) - Timestamp of when the source is created. - **updated_at** (string) - Timestamp of when the source is last updated. - **deleted** (boolean) - Specifies whether the source still exists. - **label** (string) - Name of the source. - **default** (boolean) - Specifies whether the source is predefined. - **leads_count** (integer) - Number of applicant profiles arriving through the source. #### Response Example { "id": 3000084630, "created_at": "2019-09-15T09:18:41.000Z", "updated_at": "2019-09-15T09:18:41.000Z", "deleted": false, "label": "Adzuna", "default": true, "leads_count": 9 } ``` -------------------------------- ### Get job posting fields Source: https://developers.freshteam.com/api Retrieves information about the fields on the job posting form. ```APIDOC ## GET /job_posting_fields ### Description Retrieves information about the fields on the job posting form. ### Method GET ### Endpoint /job_posting_fields ### Parameters None ### Request Example None provided in source. ### Response None provided in source. ``` -------------------------------- ### Get All Employee Fields Source: https://developers.freshteam.com/api Retrieves all employee fields with details. Response data is paginated. ```json [ { "id":1361440, "created_at":"2020-03-26T14:48:00.000Z", "updated_at":"2020-03-26T14:48:00.000Z", "employee_form_id":3000000001, "name":"profile_info", "label":"Profile Information", "field_type":"field_group", "position":1, "default":true, "viewable_by":"all", "editable_by":"self", "tab":"personal", "field_scopes":[] }, { "id":39, "created_at":"2018-11-24T12:06:32.000Z", "updated_at":"2018-11-24T12:06:32.000Z", "employee_form_id":3000000001, "name":"employee_id", "label":"Employee Id", "field_type":"text", "position":1, "default":true, "section_label":"Work Information", "required":false } ] ``` -------------------------------- ### Curl Request to Create Employee Source: https://developers.freshteam.com/api Example using curl to create a new employee. This includes setting basic information like name and email, and assigning role IDs. Replace '' and use a valid authorization token. ```curl curl -X POST "https://.freshteam.com/api/employees" -H "accept: application/json" -H "Authorization: Bearer D4HN6sD0qjUVI32cDCnQeQ" -H "Content-Type: application/json" -d '{ "first_name": "John", "middle_name":"L" "last_name": "Smith", "official_email": "john@freshteam.com", "role_ids": [ 3000060416 ] }' ``` -------------------------------- ### Get Employee by ID Source: https://developers.freshteam.com/api Retrieves details of a specific employee using their unique ID. ```APIDOC ## GET /employees/{id} ### Description Retrieves the details of a specific employee. ### Method GET ### Endpoint /employees/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the employee. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the employee. - **created_at** (string) - The timestamp when the employee was created. - **updated_at** (string) - The timestamp when the employee was last updated. - **deleted** (boolean) - **work_numbers** (array) - **nick_name** (string) - **date_of_birth** (string) - **gender** (string) - **phone_numbers** (array) - **designation** (string) - **joining_date** (string) - **termination_date** (string) - **first_name** (string) - **middle_name** (string) - **last_name** (string) - **employee_id** (string) - **employee_type** (string) - **draft** (boolean) - **terminated** (boolean) - **status** (string) - **official_email** (string) - **personal_email** (string) - **branch_id** (integer) - **team_id** (integer) - **department_id** (integer) - **sub_department_id** (integer) - **business_unit_id** (integer) - **reporting_to_id** (integer) - **hr_incharge_id** (integer) - **shift_id** (integer) - **address** (object) - **communication_address** (object) - **custom_field_values** (object) - **team** (object) #### Response Example { "example": "{\"id\": 3000053373, \"created_at\": \"2019-09-15T09:17:43.000Z\", \"updated_at\": \"2019-10-17T13:56:13.000Z\", \"deleted\": false, \"work_numbers\": [ { \"name\": \"Work\", \"number\": \"9716638376\" } ], \"nick_name\": null, \"date_of_birth\": null, \"gender\": \"male\", \"phone_numbers\": [], \"designation\": null, \"joining_date\": \"2019-09-25\", \"termination_date\": null, \"first_name\": \"Aditya\", \"middle_name\": null, \"last_name\": \"Sharma\", \"employee_id\": \"E001\", \"employee_type\": \"full time\", \"draft\": false, \"terminated\": false, \"status\": \"active\", \"official_email\": \"aditya.sharma+2519@freshworks.com\", \"personal_email\": null, \"branch_id\": 3, \"team_id\": 3000043460, \"department_id\": 1, \"sub_department_id\": 1, \"business_unit_id\": 4, \"reporting_to_id\": 3, \"hr_incharge_id\": 3, \"shift_id\": 1, \"address\": { \"street\": \"1312 Pape Avenue\", \"state\": \"Ontario\", \"city\": \"Toronto\", \"country_code\": \"CA\", \"zip_code\": \"\" }, \"communication_address\": { \"communication_street\": \"1312 Pape Avenue\", \"communication_state\": \"Ontario\", \"communication_city\": \"Toronto\", \"communication_country_code\": \"CA\", \"communication_zip_code\": \"\", \"same_as_residential\": false }, \"custom_field_values\":{ \"hobbies_cf_str01\":null, \"citizenship_cf_str02\":{\"id\":0,\"value\":null} }, \"team\": { \"id\": 3000043460, \"created_at\": \"2019-09-15T09:17:43.000Z\", \"updated_at\": \"2019-09-15T09:17:43.000Z\", \"deleted\": false, \"name\": \"Business\" } }" } ``` -------------------------------- ### Get Employees Source: https://developers.freshteam.com/api Retrieves a list of all employees in the Freshteam account. Supports pagination and sorting. ```APIDOC ## GET /employees ### Description Retrieves a list of employees. Supports query parameters for pagination and sorting. ### Method GET ### Endpoint /employees ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number starting from which the response data is retrieved. Default value: 1. - **sort_type** (string) - Optional - Specifies whether the list is sorted in ascending or descending order. Valid values: asc, desc. Default value: asc. - **sort** (string) - Optional - Specifies the attribute based on which the data is sorted. ### Response #### Success Response (200) - **total-objects** (integer) - Number of objects returned by the request. - **total-pages** (integer) - Number of pages the total-objects span. This value is based on the page query parameter. - **link** (string) - URL to the next page, if there is one. #### Response Example { "example": "{\"total-objects\": 50, \"total-pages\": 2, \"link\": \"/employees?page=2\"}" } ``` -------------------------------- ### List All Branches - Sample Response Source: https://developers.freshteam.com/api A successful response to the 'List All Branches' endpoint returns a 200 OK status with an array of branch objects. Each object contains detailed information about a branch. Pagination details are provided in the response header. ```json [ { "id":3000011496, "created_at":"2019-09-15T09:17:43.000Z", "updated_at":"2019-09-15T09:17:43.000Z", "Deleted":false, "name":"Branch office", "State":null, "city":"San Francisco", "country_code":"US", "zip":null, "time_zone":null, "currency":"USD", "Language":"en", "Main_office":false, "date_format":"MonthFirst" }, { "id":3000011495, "created_at":"2019-09-15T09:17:43.000Z", "updated_at":"2019-09-25T06:42:39.000Z", "Deleted":false, "name":"Default - Head office", "State":null, "city":"Chennai", "country_code":"IN", "Zip":null, "time_zone":"Asia/Calcutta", "currency":"USD", "Language":"en", "Main_office":true, "date_format":"MonthFirst" } ] ``` -------------------------------- ### Get a specific job posting Source: https://developers.freshteam.com/api Retrieves information pertaining to a specific job opening by its ID. ```APIDOC ## GET /job_postings/{id} ### Description Retrieves information pertaining to a specific job opening. ### Method GET ### Endpoint /job_postings/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the job posting to retrieve. ### Request Example None provided in source. ### Response None provided in source. ``` -------------------------------- ### Curl Request to List Employee Fields Source: https://developers.freshteam.com/api Example using curl to fetch all employee fields. Ensure you replace '' with your Freshteam account name and provide a valid authorization token. ```curl curl -X GET "https://.freshteam.com/api/employee_fields" -H "accept: application/json" -H "Authorization: Bearer D4HN6sD0qjUVI32cDCnQeQ" ``` -------------------------------- ### Get New Hire by ID Source: https://developers.freshteam.com/api Retrieves the details of a specific new hire using their unique ID. ```APIDOC ## GET /new_hires/{id} ### Description Retrieves the details of a specific new hire. ### Method GET ### Endpoint /new_hires/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the new hire to retrieve. ### Response #### Success Response (200) Returns the new hire object with all its attributes. #### Response Example { "id": 3000145443, "created_at": "2021-02-08T05:16:26.000Z", "updated_at": "2021-02-08T05:16:26.000Z", "deleted": false, "eeo_ethnicity": null, "eeo_job_category": null, "id_card_details": null, "workstation_number": null, "work_numbers": [ { "name": "Work", "number": "7826332634" } ], "nick_name": null, "date_of_birth": "1997-05-29", "marital_status": null, "gender": "male", "blood_group": "A-", "emergency_contacts": null, "social_profiles": null, "address": { "street": "Rockville avenue", "city": "Chennai", "state": "TamilNadu", "country_code": "IND", "zip_code": "607001" }, "phone_numbers": null, "communication_address": { "communication_street": "Woody street", "communication_city": "Chennai", "communication_state": "TamilNadu", "communication_country_code": "IND", "communication_zip_code": "607001", "same_as_residential": true }, "designation": "Developer", "joining_date": "2020-02-10", "probation_start_date": "2020-02-10", "probation_end_date": "2020-08-10", "branch_id": 3000011495, "team_id": null, "business_unit_id": null, "sub_department_id": null, "department_id": null, "reporting_to_id": null, "hr_incharge_id": null, "level_id": null, "shift_id": null, "user_function_id": null, "cost_center_id": null, "termination_date": null, "termination_reason": null, "notice_period": null, "notice_start_date": null, "notice_end_date": null, "termination_category_id": null, "custom_fields": { "hobbies_cf_str01": null, "test_field_cf_str03": null, "payroll_id_cf_str04": null, "citizenship_cf_str02": { "id": 0, "value": null } }, "avatar_url": null, "first_name": "Jack", "middle_name": "L", "last_name": "Smith", "employee_id": "E001", "status": "hired", "official_email": "jack2345@gmail.com", "personal_email": "jack@new.com", "user_category": "onboarding", "employee_type": "full_time", "draft": false, "terminated": false, "hired_on": "2020-01-20", "no_show": false, "no_show_reason": null } ``` -------------------------------- ### Get Employee Fields Source: https://developers.freshteam.com/api Retrieves a list of all available employee fields, including default and custom fields. ```APIDOC ## GET /employee_fields ### Description Retrieves a list of all available employee fields. ### Method GET ### Endpoint /employee_fields ### Response #### Success Response (200) - **field_name** (string) - The name of the employee field. - **data_type** (string) - The data type of the field (e.g., 'string', 'integer', 'date'). - **is_custom** (boolean) - Indicates if the field is a custom field. #### Response Example { "example": "[{\"field_name\": \"first_name\", \"data_type\": \"string\", \"is_custom\": false}, {\"field_name\": \"hobbies\", \"data_type\": \"string\", \"is_custom\": true}]" } ``` -------------------------------- ### List User Functions Source: https://developers.freshteam.com/api Retrieves a list of all user functions configured in the Freshteam system. This is a GET request to the /api/user_functions endpoint. ```curl curl -X GET "https://.freshteam.com/api/user_functions" -H "accept: application/json" -H "Authorization: Bearer KszAL6WR2fM3yD4ZEgMXuA" ```