### Listar Programações de Férias - GET Source: https://docs.api.flashapp.services/api/ferias Recupera uma lista de programações de férias com base em parâmetros de consulta como ano, mês, ID da empresa e IDs de funcionários. Requer uma chave de API para autenticação. ```shell GET https://api.flashapp.services/time-and-attendance/v1/vacations/schedules?year=2024&month=8&companyId=string&employeeIds=string&externalIds=string ``` -------------------------------- ### GET /time-and-attendance/v1/timetables/allocations Source: https://docs.api.flashapp.services/api/controle-de-jornada Lists timetable allocations. Requires startDate, endDate, and companyId. EmployeeId and externalId are optional. ```APIDOC ## List Timetable Allocations ### Description Lists timetable allocations for a specified period. ### Method GET ### Endpoint `https://api.flashapp.services/time-and-attendance/v1/timetables/allocations` ### Parameters #### Query Parameters - **startDate** (string) - date-time - required - The start date of the period. - **endDate** (string) - date-time - required - The end date of the period. - **companyId** (string) - required - The ID of the company. - **employeeId** (string) - optional - The ID of the employee. - **externalId** (string) - optional - The external ID of the employee. #### Headers - **x-flash-auth** (string) - required - API Key ### Response #### Success Response (200) - **records** (object[]) - required - An array of timetable allocation records. #### Response Example ```json { "records": [ { "allocationId": "alloc1", "employeeId": "employee123", "timetableId": "time1", "startDate": "2023-10-27T08:00:00Z", "endDate": "2023-10-27T16:00:00Z" } ] } ``` ``` -------------------------------- ### GET /time-and-attendance/v1/budgets Source: https://docs.api.flashapp.services/api/controle-de-jornada Lists budgets for a given year and month. Requires year, month, and companyId. EmployeeIds, externalIds, and budgetConfigId are optional. ```APIDOC ## List Budgets ### Description Lists budgets for a given year and month. ### Method GET ### Endpoint `https://api.flashapp.services/time-and-attendance/v1/budgets` ### Parameters #### Query Parameters - **year** (number) - required - The year for which to list budgets. - **month** (number) - required - The month for which to list budgets. - **companyId** (string) - required - The ID of the company. - **employeeIds** (string) - optional - Comma-separated employee IDs. - **externalIds** (string) - optional - Comma-separated external IDs. - **budgetConfigId** (string) - optional - The ID of the budget configuration. #### Headers - **x-flash-auth** (string) - required - API Key ### Response #### Success Response (200) - **records** (object[]) - required - An array of budget records. #### Response Example ```json { "records": [ { "id": "budget1", "description": "Monthly Budget", "amount": 1000 } ] } ``` ``` -------------------------------- ### GET /expenses/v1/categories/{categoryId} - Get Expense Category by ID Source: https://docs.api.flashapp.services/api/despesas-categorias Busca uma categoria de despesa pelo seu identificador único. ```APIDOC ## GET /expenses/v1/categories/{categoryId} ### Description Busca uma categoria de despesa pelo seu identificador único. ### Method GET ### Endpoint https://api.flashapp.services/expenses/v1/categories/{categoryId} ### Parameters #### Path Parameters - **categoryId** (string) - Required - Identificador da categoria #### Headers - **x-flash-auth** (string) - Required - Chave de API ### Response #### Success Response (200) - **id** (string) - required - ID único da categoria - **name** (string) - required - Nome da categoria - **companyId** (string) - ID da empresa - **status** (string) - Status da categoria - ACTIVE (ativo), INACTIVE (inativo) - **externalId** (string) - ID externo da categoria, usado para integração com sistemas externos - **isDefault** (boolean) - Se a categoria é padrão #### Response Example ```json { "id": "string", "name": "string", "companyId": "string", "status": "string", "externalId": "string", "isDefault": true } ``` ``` -------------------------------- ### GET /time-and-attendance/v1/events Source: https://docs.api.flashapp.services/api/controle-de-jornada Lists events for a given year and month. Requires year, month, and companyId. EmployeeIds and externalIds are optional. ```APIDOC ## List Events ### Description Lists events for a given year and month. ### Method GET ### Endpoint `https://api.flashapp.services/time-and-attendance/v1/events` ### Parameters #### Query Parameters - **year** (number) - required - The year for which to list events. - **month** (number) - required - The month for which to list events. - **companyId** (string) - required - The ID of the company. - **employeeIds** (string) - optional - Comma-separated employee IDs. - **externalIds** (string) - optional - Comma-separated external IDs. #### Headers - **x-flash-auth** (string) - required - API Key ### Response #### Success Response (200) - **records** (object[]) - required - An array of event records. #### Response Example ```json { "records": [ { "id": "event1", "description": "Holiday", "date": "2023-10-27" } ] } ``` ``` -------------------------------- ### GET /benefits/v1/orders/{orderId} Source: https://docs.api.flashapp.services/api/beneficios Retrieves the details of a specific benefits order using its identifier. Requires API key authentication. ```APIDOC ## GET /benefits/v1/orders/{orderId} ### Description Retrieves the details of a specific benefits order using its identifier. ### Method GET ### Endpoint https://api.flashapp.services/benefits/v1/orders/{orderId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The identifier of the order. #### Query Parameters None #### Request Body None ### Headers - **x-flash-auth** (string) - Required - API Key ### Response #### Success Response (200) - **id** (string) - Required - The ID of the order. Example: yvfSepYdwUI4SlUFkCAzQ - **companyId** (string) - Required - The ID of the company. Example: BRzfhIEKnyOE4jopUAaXw - **status** (string) - Required - The status of the order. Enum values: requested, billed, canceled, paid, available. - **createdAt** (string) - Required - The creation timestamp of the order. - **creditType** (string) - Required - The type of credit. Enum values: accumulative. - **description** (string) - Optional - Description for the order. Example: Descrição para o pedido - **billId** (string) - Optional - The ID of the bill associated with the order. Example: UbZ8lwwN9i2OPcCbVGGuS - **paymentMethod** (string) - Optional - The payment method. Enum values: BILLET. - **creditDate** (string) - Optional - The credit date. - **totalFee** (integer) - Optional - Total fee in cents. Example: 100 - **totalAmount** (integer) - Optional - Total amount in cents. Example: 10000 #### Response Example ```json { "id": "yvfSepYdwUI4SlUFkCAzQ", "companyId": "BRzfhIEKnyOE4jopUAaXw", "status": "requested", "createdAt": "2024-07-21T10:30:00.000Z", "creditType": "accumulative", "description": "Descrição para o pedido", "billId": "UbZ8lwwN9i2OPcCbVGGuS", "paymentMethod": "BILLET", "creditDate": null, "totalFee": 100, "totalAmount": 10000 } ``` ``` -------------------------------- ### GET /core/v1/departments - List Departments Source: https://docs.api.flashapp.services/api/departamentos Retrieves a list of all departments for a given company. ```APIDOC ## GET /core/v1/departments ### Description Lists all departments of a company. ### Method GET ### Endpoint https://api.flashapp.services/core/v1/departments ### Parameters #### Query Parameters - **companyId** (string) - required - ID da empresa para filtrar os departamentos #### Headers - **x-flash-auth** (string) - required - Chave de API ### Responses #### Success Response (200) - **records** (object[]) - required - Show properties #### Error Response (403) No schema specified ``` -------------------------------- ### GET /time-and-attendance/v1/attendance/day Source: https://docs.api.flashapp.services/api/controle-de-jornada Lists attendance records for a given day. Requires date and companyId. EmployeeId and externalId are optional. ```APIDOC ## List Attendance Records ### Description Lists attendance records for a given day. ### Method GET ### Endpoint `https://api.flashapp.services/time-and-attendance/v1/attendance/day` ### Parameters #### Query Parameters - **date** (string) - required - The date for which to list attendance records. - **companyId** (string) - required - The ID of the company. - **employeeId** (string) - optional - The ID of the employee. - **externalId** (string) - optional - The external ID of the employee. #### Headers - **x-flash-auth** (string) - required - API Key ### Response #### Success Response (200) - **records** (object[]) - required - An array of attendance records. #### Response Example ```json { "records": [ { "employeeId": "employee123", "timestamp": "2023-10-27T09:00:00Z", "type": "IN" }, { "employeeId": "employee123", "timestamp": "2023-10-27T17:00:00Z", "type": "OUT" } ] } ``` ``` -------------------------------- ### GET /hiring/v1/candidates Source: https://docs.api.flashapp.services/api/candidatos Retrieves a list of candidates with options for filtering by ID, name, CNPJ, nationality, document number, manager, email, phone, company, and pagination. ```APIDOC ## List Candidates ### Description Retrieves a list of candidates with various filtering and pagination options. ### Method GET ### Endpoint `https://api.flashapp.services/hiring/v1/candidates` ### Parameters #### Query Parameters - **candidateIds** (string) - Optional - IDs of candidates separated by comma. - **name** (string) - Optional - Name of the candidate. - **cnpj** (string) - Optional - Exact CNPJ of the candidate, numbers only. - **nationality** (string) - Optional - Nationality of the candidate. Enum values: `brazilian`, `foreigner`. - **documentNumber** (string) - Optional - Exact CPF of the candidate, numbers only. - **managerId** (string) - Optional - Employee ID of the candidate's manager. - **email** (string) - Optional - Exact email of the candidate. - **phone** (string) - Optional - Exact mobile number of the candidate. - **companyId** (string) - Optional - Company ID. - **page** (integer) - Optional - Page number for pagination. - **pageSize** (integer) - Optional - Maximum number of candidates per page. #### Headers - **x-flash-auth** (string) - Required - API Key. ### Response #### Success Response (200) - **metadata** (object) - Required - Metadata about the response. - **candidates** (object[]) - Required - List of candidate objects. #### Response Example ```json { "metadata": {}, "candidates": [ { "id": "string", "name": "string", "companyId": "string", "email": "string", "cnpj": "string", "nationality": "brazilian", "phone": "string" } ] } ``` ``` -------------------------------- ### GET /expenses/v1/categories - List Expense Categories Source: https://docs.api.flashapp.services/api/despesas-categorias Lista todas as categorias de despesa disponíveis para colaboradores, com opções de filtragem por ID da empresa e paginação. ```APIDOC ## GET /expenses/v1/categories ### Description Lista todas as categorias de despesa disponíveis para colaboradores. ### Method GET ### Endpoint https://api.flashapp.services/expenses/v1/categories ### Parameters #### Query Parameters - **companyId** (string) - Required - ID da empresa para filtrar os categorias - **pageNumber** (integer) - Optional - Número da página - **pageSize** (integer) - Optional - Tamanho máximo da página #### Headers - **x-flash-auth** (string) - Required - Chave de API ### Response #### Success Response (200) - **id** (string) - required - ID único da categoria - **name** (string) - required - Nome da categoria - **companyId** (string) - ID da empresa - **status** (string) - Status da categoria - ACTIVE (ativo), INACTIVE (inativo) - **externalId** (string) - ID externo da categoria, usado para integração com sistemas externos - **isDefault** (boolean) - Se a categoria é padrão #### Response Example ```json { "id": "string", "name": "string", "companyId": "string", "status": "string", "externalId": "string", "isDefault": true } ``` ``` -------------------------------- ### GET /expenses/v1/expenses - List Expenses Source: https://docs.api.flashapp.services/api/despesas Recupera uma lista de despesas com base em diversos filtros, como ID da empresa, IDs de colaboradores, status, datas e paginação. ```APIDOC ## GET /expenses/v1/expenses ### Description Recupera uma lista de despesas com base em diversos filtros, como ID da empresa, IDs de colaboradores, status, datas e paginação. ### Method GET ### Endpoint `https://api.flashapp.services/expenses/v1/expenses` ### Parameters #### Query Parameters - **companyId** (string) - Optional - ID da empresa para filtrar as despesas - **employeeIds** (string) - Optional - Lista de IDs de colaboradores separados por vírgula para filtrar as despesas - **status** (string) - Optional - Lista de status de despesa separados por vírgula para filtrar as despesas. Enum: DRAFT, PENDING_APPROVAL, PENDING_ACCOUNTING, FINISHED, REQUIRE_CHANGES, REJECTED - **integrationStatus** (string) - Optional - Lista de status da integração de despesa separados por vírgula para filtrar as despesas. Enum: PENDING, COMPLETED, ERROR - **type** (string) - Optional - Tipo de despesa. Enum: REIMBURSEMENT, CORPORATE_CARD - **initialDate** (string) - Optional - Data inicial para filtrar as despesas (formato: yyyy-MM-dd) - **endDate** (string) - Optional - Data final para filtrar as despesas (formato: yyyy-MM-dd) - **pageNumber** (integer) - Optional - Número da página - **pageSize** (integer) - Optional - Tamanho máximo da página #### Headers - **x-flash-auth** (string) - Required - Chave de API ### Response #### Success Response (200) - **totalCount** (integer) - required - Total de despesas - **totalPages** (integer) - required - Total de páginas - **expenses** (object[]) - required - Lista de despesas #### Response Example ```json { "totalCount": 100, "totalPages": 10, "expenses": [ { "id": "exp_123", "employeeId": "emp_456", "companyId": "comp_789", "amount": 50.00, "date": "2023-10-27", "status": "FINISHED" } ] } ``` ``` -------------------------------- ### Create Scale Allocations API Request Body (JSON) Source: https://docs.api.flashapp.services/api/controle-de-jornada This is the JSON structure for the request body when creating scale allocations. It requires parameters such as timetable ID, start and end dates, and employee identifiers. ```json { "timetableId": 0, "timetableApiId": "timetableApiId", "startDate": "2024-08-25T15:00:00Z", "endDate": "2024-08-25T15:00:00Z", "employeeIds": [ "string" ], "externalIds": [ "string" ], "companyId": "companyId" } ``` -------------------------------- ### List Departments API Request Source: https://docs.api.flashapp.services/api/departamentos Este snippet demonstra como listar todos os departamentos de uma empresa usando um método GET. Requer o ID da empresa como parâmetro de consulta e uma chave de API para autenticação. -------------------------------- ### Update Expense Category - cURL Example Source: https://docs.api.flashapp.services/api/despesas-categorias This snippet demonstrates how to update an expense category using a cURL command. It includes the endpoint, HTTP method, headers, and request body. Ensure you replace placeholders like ':categoryId' and authentication tokens. ```curl curl --request PATCH \ --url https://api.flashapp.services/expenses/v1/categories/:categoryId \ --header 'Content-Type: application/json' \ --header 'x-flash-auth: string' \ --data \ '{ "status": "status", "name": "name", "externalId": "externalId" }' ``` -------------------------------- ### POST /benefits/v1/orders Source: https://docs.api.flashapp.services/api/beneficios Creates a new benefits order to add employees with their respective benefits. Requires API key authentication. ```APIDOC ## POST /benefits/v1/orders ### Description Creates a new benefits order to add employees with their respective benefits. ### Method POST ### Endpoint https://api.flashapp.services/benefits/v1/orders ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **companyId** (string) - Required - The ID of the company. Example: jVZ0hM9pAXh5SPoqIzLxo ### Headers - **x-flash-auth** (string) - Required - API Key ### Request Example ```json { "companyId": "jVZ0hM9pAXh5SPoqIzLxo" } ``` ### Response #### Success Response (201) - **id** (string) - Required - The ID of the created order. Example: yvfSepYdwUI4SlUFkCAzQ - **companyId** (string) - Required - The ID of the company. Example: BRzfhIEKnyOE4jopUAaXw - **status** (string) - Required - The status of the order. Enum values: requested, billed, canceled, paid, available. - **createdAt** (string) - Required - The creation timestamp of the order. - **creditType** (string) - Required - The type of credit. Enum values: accumulative. - **description** (string) - Optional - Description for the order. Example: Descrição para o pedido - **billId** (string) - Optional - The ID of the bill associated with the order. Example: UbZ8lwwN9i2OPcCbVGGuS - **paymentMethod** (string) - Optional - The payment method. Enum values: BILLET. - **creditDate** (string) - Optional - The credit date. - **totalFee** (integer) - Optional - Total fee in cents. Example: 100 - **totalAmount** (integer) - Optional - Total amount in cents. Example: 10000 #### Response Example ```json { "id": "yvfSepYdwUI4SlUFkCAzQ", "companyId": "BRzfhIEKnyOE4jopUAaXw", "status": "requested", "createdAt": "2024-07-21T10:30:00.000Z", "creditType": "accumulative", "description": "Descrição para o pedido", "billId": "UbZ8lwwN9i2OPcCbVGGuS", "paymentMethod": "BILLET", "creditDate": null, "totalFee": 100, "totalAmount": 10000 } ``` ``` -------------------------------- ### GET /core/v1/departments/{departmentId} - Get Department by ID Source: https://docs.api.flashapp.services/api/departamentos Retrieves a specific department by its unique identifier. ```APIDOC ## GET /core/v1/departments/{departmentId} ### Description Fetches a department by its unique identifier. ### Method GET ### Endpoint https://api.flashapp.services/core/v1/departments/{departmentId} ### Parameters #### Path Parameters - **departmentId** (string) - required - Identificador do departamento #### Headers - **x-flash-auth** (string) - required - Chave de API ### Responses #### Success Response (200) - **id** (string) - required - ID único do departamento - **name** (string) - required - Nome do departamento - **description** (string) - optional - Descrição do departamento - **externalId** (string) - optional - ID externo do departamento, usado para integração com sistemas externos - **isActive** (boolean) - Indica se o departamento está ativo ou inativo #### Error Responses (403, 404) No schema specified ``` -------------------------------- ### Create Candidate API Request Source: https://docs.api.flashapp.services/api/candidatos Shows how to create a new candidate using the API Flash service. This POST request requires authentication via the 'x-flash-auth' header and accepts a JSON payload with candidate details such as name, email, hiring category, company ID, and optional information like legal name, CNPJ, nationality, document number, manager ID, follower employee IDs, and phone number. Returns the created candidate's ID, name, company ID, email, and other details upon successful creation. ```curl curl --request POST \ --url https://api.flashapp.services/hiring/v1/candidates \ --header 'Content-Type: application/json' \ --header 'x-flash-auth: string' \ --data '{ "name": "name", "legalName": "legalName", "cnpj": "cnpj", "nationality": "brazilian", "documentNumber": "documentNumber", "managerId": "managerId", "followerEmployeeIds": [ "string" ], "email": "email", "phone": "phone", "hiringDate": "2024-08-25T15:00:00Z", "probationFirstDate": "2024-08-25T15:00:00Z", "probationSecondDate": "2024-08-25T15:00:00Z", "hiringCategory": "clt", "companyId": "companyId" }' ``` -------------------------------- ### Update Expense Category - Success Response Example Source: https://docs.api.flashapp.services/api/despesas-categorias This is an example of a successful response when updating an expense category. It returns the updated details of the category, including its unique ID, company ID, external ID, default status, name, and current status. ```json { "id": "yginY8DiaT4fnmajswjM0", "companyId": "tD1yqodKf8M8ZE", "externalId": "10cya4", "isDefault": false, "name": "Nome da categoria", "status": "ACTIVE" } ``` -------------------------------- ### POST /hiring/v1/candidates Source: https://docs.api.flashapp.services/api/candidatos Creates a new candidate with their details, including personal information, company association, and hiring category. ```APIDOC ## Create Candidate ### Description Creates a new candidate with their details, including personal information, company association, and hiring category. ### Method POST ### Endpoint `https://api.flashapp.services/hiring/v1/candidates` ### Parameters #### Request Body - **name** (string) - Required - Name of the candidate. - **email** (string) - Required - Email of the candidate. - **hiringCategory** (string) - Required - Enum values: `clt`, `internship`, `pj`. - **companyId** (string) - Required - Company ID. - **legalName** (string) - Optional - Company name of the candidate (if hiring is PJ). - **cnpj** (string) - Optional - CNPJ of the candidate, numbers only. Example: `67578133000110`. - **nationality** (string) - Optional - Nationality of the candidate. Enum values: `brazilian`, `foreigner`. - **documentNumber** (string) - Optional - CPF of the candidate, numbers only. Example: `38193415019`. - **managerId** (string) - Optional - Employee ID of the candidate's manager. - **followerEmployeeIds** (string[]) - Optional - Employee IDs of followers who will monitor the candidate's admission process. - **phone** (string) - Optional - Mobile number of the candidate, numbers only. Example: `409928377364`. - **hiringDate** (string) - Optional - Date of hiring. Format: `date-time`. - **probationFirstDate** (string) - Optional - End date of the first probation period. Format: `date-time`. - **probationSecondDate** (string) - Optional - End date of the second probation period. Format: `date-time`. #### Headers - **x-flash-auth** (string) - Required - API Key. ### Request Example ```json { "name": "John Doe", "email": "john.doe@example.com", "hiringCategory": "clt", "companyId": "comp_123", "legalName": "Doe Corp", "cnpj": "67578133000110", "nationality": "brazilian", "documentNumber": "38193415019", "managerId": "mgr_456", "followerEmployeeIds": ["emp_789"], "phone": "409928377364", "hiringDate": "2024-08-25T15:00:00Z", "probationFirstDate": "2024-09-25T15:00:00Z", "probationSecondDate": "2024-10-25T15:00:00Z" } ``` ### Response #### Success Response (200) - **id** (string) - Required - The unique identifier for the created candidate. - **name** (string) - Required - The name of the candidate. - **companyId** (string) - Required - The ID of the company associated with the candidate. - **email** (string) - Required - The email address of the candidate. - **cnpj** (string) - The CNPJ of the candidate. - **nationality** (string) - The nationality of the candidate. Enum values: `brazilian`, `foreigner`. - **phone** (string) - The phone number of the candidate. #### Response Example ```json { "id": "cand_abc", "name": "John Doe", "companyId": "comp_123", "email": "john.doe@example.com", "cnpj": "67578133000110", "nationality": "brazilian", "phone": "409928377364" } ``` ``` -------------------------------- ### Create Scale Allocations API Request (cURL) Source: https://docs.api.flashapp.services/api/controle-de-jornada This snippet demonstrates how to create scale allocations using a cURL command. It includes the necessary endpoint, headers for content type and authentication, and a JSON payload specifying allocation details. ```shell curl --request POST \ --url https://api.flashapp.services/time-and-attendance/v1/timetables/allocations \ --header 'Content-Type: application/json' \ --header 'x-flash-auth: string' \ --data ' { "timetableId": 0, "timetableApiId": "timetableApiId", "startDate": "2024-08-25T15:00:00Z", "endDate": "2024-08-25T15:00:00Z", "employeeIds": [ "string" ], "externalIds": [ "string" ], "companyId": "companyId" } ' ``` -------------------------------- ### Listar Empresas por CNPJ (cURL) Source: https://docs.api.flashapp.services/api/empresas Este snippet demonstra como listar empresas pertencentes a um grupo econômico filtrando pelo CNPJ. Requer a chave de API no header 'x-flash-auth'. ```curl curl --request GET \ --url "https://api.flashapp.services/core/v1/companies?registrationNumber=string" \ --header 'x-flash-auth: string' ``` -------------------------------- ### Get Role by ID Source: https://docs.api.flashapp.services/api/cargos Retrieves a specific role by its unique identifier. ```APIDOC ## GET /core/v1/roles/{roleId} ### Description Retrieves a role by its unique identifier. ### Method GET ### Endpoint https://api.flashapp.services/core/v1/roles/{roleId} ### Path Parameters - **roleId** (string) - Required - The identifier of the role. ### Headers - **x-flash-auth** (string) - Required - API Key ### Responses #### Success Response (200) - **id** (string) - Required - Unique ID of the role. - **name** (string) - Required - Name of the role. - **description** (string) - Description of the role. - **externalId** (string) - External ID of the role. #### Example Response (200) ```json { "id": "role_abc", "name": "Software Engineer", "description": "Develops and maintains software applications.", "externalId": "SE001" } ``` ``` -------------------------------- ### List Candidates API Request Source: https://docs.api.flashapp.services/api/candidatos Demonstrates how to list candidates using the API Flash service. It supports filtering by IDs, name, CNPJ, nationality, document number, manager ID, email, phone, and company ID, along with pagination parameters. Requires an 'x-flash-auth' header for authentication. Returns candidate metadata and a list of candidates. ```curl curl --request GET \ --url https://api.flashapp.services/hiring/v1/candidates \ --header 'x-flash-auth: string' ``` -------------------------------- ### Buscar Empresa por ID (cURL) Source: https://docs.api.flashapp.services/api/empresas Este snippet mostra como buscar uma empresa específica pelo seu ID. É necessário incluir a chave de API no header 'x-flash-auth' e o ID da empresa no path da URL. ```curl curl --request GET \ --url "https://api.flashapp.services/core/v1/companies/{companyId}" \ --header 'Content-Type: application/json' \ --header 'x-flash-auth: string' ``` -------------------------------- ### POST /time-and-attendance/v1/timetables/allocations Source: https://docs.api.flashapp.services/api/controle-de-jornada Creates timetable allocations. Requires startDate, endDate, and companyId. TimetableId, timetableApiId, employeeIds, and externalIds are optional. ```APIDOC ## Create Timetable Allocations ### Description Creates timetable allocations for employees. ### Method POST ### Endpoint `https://api.flashapp.services/time-and-attendance/v1/timetables/allocations` ### Parameters #### Request Body - **startDate** (string) - date-time - required - The start date of the allocation. - **endDate** (string) - date-time - required - The end date of the allocation. - **companyId** (string) - required - The ID of the company. - **timetableId** (number) - optional - The ID of the timetable. - **timetableApiId** (string) - optional - The API ID of the timetable. - **employeeIds** (string[]) - optional - An array of employee IDs to allocate. - **externalIds** (string[]) - optional - An array of external IDs of employees to allocate. #### Headers - **x-flash-auth** (string) - required - API Key ### Request Example ```json { "startDate": "2023-10-27T08:00:00Z", "endDate": "2023-10-27T16:00:00Z", "companyId": "company456", "employeeIds": ["employee123", "employee456"], "timetableId": 1 } ``` ### Response #### Success Response (200) - **message** (string) - A success message indicating the allocations were created. #### Response Example ```json { "message": "Timetable allocations created successfully." } ``` ``` -------------------------------- ### Exemplo de Resposta JSON para Efetivação de Férias Source: https://docs.api.flashapp.services/api/ferias Estrutura JSON de exemplo para uma resposta bem-sucedida (código 200) ao atualizar a efetivação de férias, mostrando os registros processados e seus detalhes. ```json { "records": [ { "id": 0, "companyId": "companyId", "active": true, "registeredBy": "registeredBy", "registrationDate": "2024-08-25T15:00:00Z", "updatedBy": "updatedBy", "updatedAt": "2024-08-25T15:00:00Z", "employeeId": "employeeId", "acquisitionPeriodId": 0, "startDate": "2024-08-25T15:00:00Z", "endDate": "2024-08-25T15:00:00Z", "days": 0, "advance13Salary": true, "sellOneThird": true, "installmentDiscount": true, "confirmation": true, "managerMessage": "managerMessage", "status": "status" } ] } ``` -------------------------------- ### Ativar Centro de Custo - API Flash Source: https://docs.api.flashapp.services/api/centros-de-custo Ativa um centro de custo existente. Requer o ID do centro de custo a ser ativado e a chave de API para autenticação. A ativação é confirmada por uma resposta de sucesso. ```curl curl --request POST \ --url https://api.flashapp.services/core/v1/cost-centers/:costCenterId/activate \ --header 'Content-Type: application/json' \ --header 'x-flash-auth: string' ``` -------------------------------- ### Get Company by ID Source: https://docs.api.flashapp.services/api/empresas Retrieves a specific company's details using its unique identifier. ```APIDOC ## Get Company by ID ### Description Retrieves a specific company's details using its unique identifier (`companyId`). ### Method GET ### Endpoint `https://api.flashapp.services/core/v1/companies/{companyId}` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier of the company. #### Headers - **x-flash-auth** (string) - Required - API Key ### Response #### Success Response (200) - **id** (string) - The unique identifier of the company. - **active** (boolean) - Indicates if the company is active. - **address** (object) - Contains address details. - **legalName** (string) - The legal name of the company. - **logo** (string) - URL to the company's logo. - **name** (string) - The display name of the company. - **registrationNumber** (string) - The company's registration number (CNPJ). #### Response Example (200) ```json { "id": "id", "active": true, "address": { "city": "city", "complement": {}, "district": "district", "number": "number", "state": "state", "street": "street", "zipCode": "zipCode" }, "legalName": "legalName", "logo": "logo", "name": "name", "registrationNumber": "registrationNumber" } ``` ``` -------------------------------- ### Criar ou Atualizar Programação de Férias - POST Source: https://docs.api.flashapp.services/api/ferias Cria uma nova programação de férias ou atualiza uma existente. Requer um corpo de requisição JSON contendo detalhes como ID externo, datas de início e fim, e informações da empresa. Necessita de uma chave de API para autenticação. ```shell POST https://api.flashapp.services/time-and-attendance/v1/vacations/schedules ``` -------------------------------- ### Listar Centros de Custo - API Flash Source: https://docs.api.flashapp.services/api/centros-de-custo Recupera uma lista de centros de custo com base em filtros como IDs de empresa, IDs de centro de custo, IDs de funcionários responsáveis, termo de busca, status de atividade, e parâmetros de paginação. Requer uma chave de API para autenticação. ```curl curl --request GET \ --url https://api.flashapp.services/core/v1/cost-centers \ --header 'x-flash-auth: string' ``` -------------------------------- ### Acknowledge ERP Integration Status - cURL Source: https://docs.api.flashapp.services/api/despesas This cURL command demonstrates how to send a POST request to acknowledge the ERP integration status of an expense. It includes the endpoint, headers, and a sample JSON request body. The response indicates success. ```shell curl --request POST \ --url https://api.flashapp.services/expenses/v1/expenses/{expenseId}/accounting/acknowledge \ --header 'Content-Type: application/json' \ --header 'x-flash-auth: string' \ --data \ '{ "status": "status", "details": "details", "reference": "reference" }' ``` -------------------------------- ### POST /expenses/v1/categories - Create Expense Category Source: https://docs.api.flashapp.services/api/despesas-categorias Cria uma nova categoria de despesa para uma empresa. ```APIDOC ## POST /expenses/v1/categories ### Description Cria uma nova categoria de despesa para uma empresa. ### Method POST ### Endpoint https://api.flashapp.services/expenses/v1/categories ### Parameters #### Request Body - **companyId** (string) - Required - ID da empresa - **name** (string) - Required - Nome da categoria - **externalId** (string) - Optional - ID externo da categoria, usado para integração com sistemas externos #### Headers - **x-flash-auth** (string) - Required - Chave de API ### Request Example ```json { "companyId": "string", "name": "string", "externalId": "string" } ``` ### Response #### Success Response (200) - **id** (string) - required - ID único da categoria - **name** (string) - required - Nome da categoria - **companyId** (string) - ID da empresa - **status** (string) - Status da categoria - ACTIVE (ativo), INACTIVE (inativo) - **externalId** (string) - ID externo da categoria, usado para integração com sistemas externos - **isDefault** (boolean) - Se a categoria é padrão #### Response Example ```json { "id": "string", "name": "string", "companyId": "string", "status": "string", "externalId": "string", "isDefault": true } ``` ``` -------------------------------- ### POST /expenses/v1/expenses/accounting/reject - Reject Expenses Source: https://docs.api.flashapp.services/api/despesas Atualiza o status das despesas para 'reprovado'. Requer um comentário, o ID do colaborador e uma lista de IDs de despesas. ```APIDOC ## POST /expenses/v1/expenses/accounting/reject ### Description Atualiza o status das despesas para 'reprovado'. Requer um comentário, o ID do colaborador e uma lista de IDs de despesas. ### Method POST ### Endpoint `https://api.flashapp.services/expenses/v1/expenses/accounting/reject` ### Parameters #### Request Body - **accountingComments** (string) - Required - Comentário do motivo da reprovação - **employeeId** (string) - Required - ID do colaborador que vai reprovar as despesas - **expenseIds** (string[]) - Required - IDs das despesas #### Headers - **x-flash-auth** (string) - Required - Chave de API ### Request Example ```json { "accountingComments": "Receipt missing.", "employeeId": "emp_456", "expenseIds": ["exp_123"] } ``` ### Response #### Success Response (200) No schema specified #### Response Example ```json { "message": "Expenses rejected successfully." } ``` ``` -------------------------------- ### Create Role Source: https://docs.api.flashapp.services/api/cargos Creates a new role for a company. Requires role name and company ID, with optional fields for description, external ID, and CBO. ```APIDOC ## POST /core/v1/roles ### Description Creates a new role for a company. ### Method POST ### Endpoint https://api.flashapp.services/core/v1/roles ### Headers - **x-flash-auth** (string) - Required - API Key ### Request Body - **name** (string) - Required - Name of the role. - **companyId** (string) - Required - ID of the company to which the role belongs. - **description** (string) - Optional - Description of the role. - **externalId** (string) - Optional - External ID of the role, used for integration with external systems. - **cbo** (string) - Optional - Brazilian Classification of Occupations (CBO) code associated with the role. ### Request Example ```json { "name": "Software Engineer", "companyId": "cmp_123", "description": "Develops and maintains software applications.", "externalId": "SE001", "cbo": "2124-20" } ``` ### Responses #### Success Response (201) - **id** (string) - Required - Unique ID of the role. - **name** (string) - Required - Name of the role. - **description** (string) - Description of the role. - **externalId** (string) - External ID of the role. #### Example Response (201) ```json { "id": "role_abc", "name": "Software Engineer", "description": "Develops and maintains software applications.", "externalId": "SE001" } ``` ``` -------------------------------- ### Update Expense Category - Request Body Example Source: https://docs.api.flashapp.services/api/despesas-categorias This JSON object represents the structure of the request body for updating an expense category. It allows modification of the category's status, name, and external ID. The `externalId` is useful for external system integrations. ```json { "status": "status", "name": "name", "externalId": "externalId" } ``` -------------------------------- ### POST /expenses/v1/expenses/{expenseId}/accounting/acknowledge - Update ERP Integration Status Source: https://docs.api.flashapp.services/api/despesas Atualiza o campo `integration` de uma despesa, definindo o status ('ERROR' ou 'COMPLETED') e opcionalmente adicionando detalhes ou uma referência externa. ```APIDOC ## POST /expenses/v1/expenses/{expenseId}/accounting/acknowledge ### Description Atualiza o campo `integration` de uma despesa, definindo o status ('ERROR' ou 'COMPLETED') e opcionalmente adicionando detalhes ou uma referência externa. ### Method POST ### Endpoint `https://api.flashapp.services/expenses/v1/expenses/{expenseId}/accounting/acknowledge` ### Parameters #### Path Parameters - **expenseId** (string) - Required - Identificador da despesa #### Request Body - **status** (string) - Required - Novo status da integração, 'ERROR' ou 'COMPLETED' - **details** (string) - Optional - Detalhes da mensagem opcional, caso o status seja 'ERROR' - **reference** (string) - Optional - Referência externa do processamento ERP #### Headers - **x-flash-auth** (string) - Required - Chave de API ### Request Example ```json { "status": "COMPLETED", "reference": "ERP_REF_12345" } ``` ### Response #### Success Response (200) No schema specified #### Response Example ```json { "message": "ERP integration status updated successfully." } ``` ```