Rust API client for openapi
freee人事労務のAPI仕様です。
認証について
OAuth2.0を利用します。詳細はドキュメントの認証パートを参照してください。
エンドポイント
後方互換性ありの変更
freeeでは、APIを改善していくために以下のような変更は後方互換性ありとして通知なく変更を入れることがあります。アプリケーション実装者は以下を踏まえて開発を行ってください。
- 新しいAPIリソース・エンドポイントの追加
- 既存のAPIに対して必須ではない新しいリクエストパラメータの追加
- 既存のAPIレスポンスに対する新しいプロパティの追加
- 既存のAPIレスポンスに対するプロパティの順番の入れ変え
- keyとなっているidやcodeの長さの変更(長くする)
エラーレスポンス
APIリクエストでエラーが発生した場合は、エラー原因に応じたステータスコードおよびメッセージを返します。
| ステータスコード | 原因 |
|---|---|
| 400 | リクエストパラメータが不正 |
| 401 | アクセストークンが無効 |
| 403 | アクセス権限がない |
| 404 | リソースが存在しない |
| 429 | リクエスト回数制限を越えた |
| 503 | システム内で予期しないエラーが発生 |
メッセージボディ内の messages にはエラー内容を説明する文字列が入ります。
{
\"status_code\": 400,
\"errors\": [
{
\"type\": \"bad_request\",
\"messages\": [
\"リクエストの形式が不正です。\"
]
}
]
}
API使用制限
APIリクエストは1時間で5000回を上限としています。API使用ステータスはレスポンスヘッダに付与されます。
X-Ratelimit-Limit:5000
X-Ratelimit-Remaining:4998
X-Ratelimit-Reset:2018-01-01T12:00:00.000000Z
各ヘッダの意味は次のとおりです。
| ヘッダ名 | 説明 |
|---|---|
| X-Ratelimit-Limit | 使用回数の上限 |
| X-Ratelimit-Remaining | 残り使用回数 |
| X-Ratelimit-Reset | 使用回数がリセットされる時刻 |
上記に加え、freeeは一定期間に過度のアクセスを検知した場合、APIアクセスをコントロールする場合があります。 その際のhttp status codeは403となります。制限がかかってから10分程度が過ぎると再度使用することができるようになります。
For more information, please visit https://support.freee.co.jp/hc/ja/requests/new
Overview
This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.
- API version: v2022-02-01
- Package version: v2022-02-01
- Build package:
org.openapitools.codegen.languages.RustClientCodegen
Installation
Put the package under your project folder in a directory named openapi and add the following to Cargo.toml under [dependencies]:
openapi = { path = "./openapi" }
Documentation for API Endpoints
All URIs are relative to https://api.freee.co.jp/hr
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DefaultApi | action_approval_requests_monthly_attendance | POST /api/v1/approval_requests/monthly_attendances/{id}/actions | 月次勤怠締め申請の承認操作 |
| DefaultApi | action_approval_requests_overtime_work | POST /api/v1/approval_requests/overtime_works/{id}/actions | 残業申請の承認操作 |
| DefaultApi | action_approval_requests_paid_holiday | POST /api/v1/approval_requests/paid_holidays/{id}/actions | 有給申請の承認操作 |
| DefaultApi | bulk_update_employee_dependent_rules | PUT /api/v1/employees/{employee_id}/dependent_rules/bulk_update | 更新 |
| DefaultApi | create_approval_requests_monthly_attendance | POST /api/v1/approval_requests/monthly_attendances | 月次勤怠締め申請の作成 |
| DefaultApi | create_approval_requests_overtime_work | POST /api/v1/approval_requests/overtime_works | 残業申請の作成 |
| DefaultApi | create_approval_requests_paid_holiday | POST /api/v1/approval_requests/paid_holidays | 有給申請の作成 |
| DefaultApi | create_employee | POST /api/v1/employees | 作成 |
| DefaultApi | create_employee_time_clock | POST /api/v1/employees/{employee_id}/time_clocks | 打刻情報の登録 |
| DefaultApi | create_group | POST /api/v1/groups | 部門情報の作成 |
| DefaultApi | create_position | POST /api/v1/positions | 役職情報の作成 |
| DefaultApi | destroy_approval_requests_monthly_attendance | DELETE /api/v1/approval_requests/monthly_attendances/{id} | 月次勤怠締め申請の削除 |
| DefaultApi | destroy_approval_requests_overtime_work | DELETE /api/v1/approval_requests/overtime_works/{id} | 残業申請の削除 |
| DefaultApi | destroy_approval_requests_paid_holiday | DELETE /api/v1/approval_requests/paid_holidays/{id} | 有給申請の削除 |
| DefaultApi | destroy_employee | DELETE /api/v1/employees/{id} | 削除 |
| DefaultApi | destroy_employee_work_record | DELETE /api/v1/employees/{employee_id}/work_records/{date} | 削除 |
| DefaultApi | destroy_group | DELETE /api/v1/groups/{id} | 部門情報の削除 |
| DefaultApi | destroy_position | DELETE /api/v1/positions/{id} | 役職情報の削除 |
| DefaultApi | get_approval_flow_route | GET /api/v1/approval_flow_routes/{id} | 申請経路の取得 |
| DefaultApi | get_approval_flow_routes | GET /api/v1/approval_flow_routes | 申請経路一覧の取得 |
| DefaultApi | get_approval_requests_monthly_attendance | GET /api/v1/approval_requests/monthly_attendances/{id} | 月次勤怠締め申請の詳細取得 |
| DefaultApi | get_approval_requests_monthly_attendances | GET /api/v1/approval_requests/monthly_attendances | 月次勤怠締め申請の一覧取得 |
| DefaultApi | get_approval_requests_overtime_work | GET /api/v1/approval_requests/overtime_works/{id} | 残業申請の詳細取得 |
| DefaultApi | get_approval_requests_overtime_works | GET /api/v1/approval_requests/overtime_works | 残業申請の一覧取得 |
| DefaultApi | get_approval_requests_paid_holiday | GET /api/v1/approval_requests/paid_holidays/{id} | 有給申請の詳細取得 |
| DefaultApi | get_approval_requests_paid_holidays | GET /api/v1/approval_requests/paid_holidays | 有給申請の一覧取得 |
| DefaultApi | get_bonuses_employee_payroll_statement | GET /api/v1/bonuses/employee_payroll_statements/{employee_id} | 取得 |
| DefaultApi | get_bonuses_employee_payroll_statements | GET /api/v1/bonuses/employee_payroll_statements | 一覧の取得 |
| DefaultApi | get_company_employees | GET /api/v1/companies/{company_id}/employees | 一覧の取得 |
| DefaultApi | get_employee | GET /api/v1/employees/{id} | 取得 |
| DefaultApi | get_employee_bank_account_rule | GET /api/v1/employees/{employee_id}/bank_account_rule | 取得 |
| DefaultApi | get_employee_basic_pay_rule | GET /api/v1/employees/{employee_id}/basic_pay_rule | 取得 |
| DefaultApi | get_employee_dependent_rules | GET /api/v1/employees/{employee_id}/dependent_rules | 取得 |
| DefaultApi | get_employee_group_memberships | GET /api/v1/employee_group_memberships | 一覧の取得 |
| DefaultApi | get_employee_health_insurance_rule | GET /api/v1/employees/{employee_id}/health_insurance_rule | 取得 |
| DefaultApi | get_employee_profile_rule | GET /api/v1/employees/{employee_id}/profile_rule | 取得 |
| DefaultApi | get_employee_time_clock | GET /api/v1/employees/{employee_id}/time_clocks/{id} | 打刻情報の詳細取得 |
| DefaultApi | get_employee_time_clocks | GET /api/v1/employees/{employee_id}/time_clocks | 打刻情報の一覧取得 |
| DefaultApi | get_employee_time_clocks_available_types | GET /api/v1/employees/{employee_id}/time_clocks/available_types | 打刻可能種別の取得 |
| DefaultApi | get_employee_welfare_pension_insurance_rule | GET /api/v1/employees/{employee_id}/welfare_pension_insurance_rule | 取得 |
| DefaultApi | get_employee_work_record | GET /api/v1/employees/{employee_id}/work_records/{date} | 取得 |
| DefaultApi | get_employee_work_record_summary | GET /api/v1/employees/{employee_id}/work_record_summaries/{year}/{month} | 勤怠情報月次サマリの取得 |
| DefaultApi | get_employees | GET /api/v1/employees | 一覧の取得 |
| DefaultApi | get_groups | GET /api/v1/groups | 部門情報の一覧取得 |
| DefaultApi | get_positions | GET /api/v1/positions | 役職情報の一覧取得 |
| DefaultApi | get_salaries_employee_payroll_statement | GET /api/v1/salaries/employee_payroll_statements/{employee_id} | 取得 |
| DefaultApi | get_salaries_employee_payroll_statements | GET /api/v1/salaries/employee_payroll_statements | 一覧の取得 |
| DefaultApi | get_users_me | GET /api/v1/users/me | 取得 |
| DefaultApi | update_approval_requests_monthly_attendance | PUT /api/v1/approval_requests/monthly_attendances/{id} | 月次勤怠締め申請の更新 |
| DefaultApi | update_approval_requests_overtime_work | PUT /api/v1/approval_requests/overtime_works/{id} | 残業申請の更新 |
| DefaultApi | update_approval_requests_paid_holiday | PUT /api/v1/approval_requests/paid_holidays/{id} | 有給申請の更新 |
| DefaultApi | update_employee | PUT /api/v1/employees/{id} | 更新 |
| DefaultApi | update_employee_bank_account_rule | PUT /api/v1/employees/{employee_id}/bank_account_rule | 更新 |
| DefaultApi | update_employee_basic_pay_rule | PUT /api/v1/employees/{employee_id}/basic_pay_rule | 更新 |
| DefaultApi | update_employee_health_insurance_rule | PUT /api/v1/employees/{employee_id}/health_insurance_rule | 更新 |
| DefaultApi | update_employee_profile_rule | PUT /api/v1/employees/{employee_id}/profile_rule | 更新 |
| DefaultApi | update_employee_welfare_pension_insurance_rule | PUT /api/v1/employees/{employee_id}/welfare_pension_insurance_rule | 更新 |
| DefaultApi | update_employee_work_record | PUT /api/v1/employees/{employee_id}/work_records/{date} | 更新 |
| DefaultApi | update_employee_work_record_summary | PUT /api/v1/employees/{employee_id}/work_record_summaries/{year}/{month} | 勤怠情報月次サマリの更新 |
| DefaultApi | update_group | PUT /api/v1/groups/{id} | 部門情報の更新 |
| DefaultApi | update_position | PUT /api/v1/positions/{id} | 役職情報の更新 |
Documentation For Models
- AccessDeniedError
- ApiV1ApprovalActionRequest
- ApiV1ApprovalFlowLogsParams
- ApiV1ApprovalFlowRouteIndexResponseParams
- ApiV1ApprovalFlowRouteResponse
- ApiV1ApprovalFlowRouteResponseParams
- ApiV1ApprovalFlowRoutesIndexResponse
- ApiV1BonusesEmployeePayrollStatementSerializer
- ApiV1BonusesEmployeePayrollStatementsControllerPeriodShowResponse
- ApiV1BonusesEmployeePayrollStatementsIndexSerializer
- ApiV1CompaniesEmployeeSerializer
- ApiV1EmployeeCreateRequestSerializer
- ApiV1EmployeeGroupMembershipSerializer
- ApiV1EmployeeGroupMembershipsIndexSerializer
- ApiV1EmployeePayrollStatementsEmployeeAttendanceItemSerializer
- ApiV1EmployeePayrollStatementsEmployeeOvertimePayItemSerializer
- ApiV1EmployeePayrollStatementsEmployeePayrollStatementItemSerializer
- ApiV1EmployeeSerializer
- ApiV1EmployeeUpdateRequestSerializer
- ApiV1EmployeesBankAccountRuleSerializer
- ApiV1EmployeesBankAccountRuleUpdateRequestSerializer
- ApiV1EmployeesBankAccountRulesControllerPeriodShowResponse
- ApiV1EmployeesBankAccountRulesControllerPeriodUpdateBody
- ApiV1EmployeesBankAccountRulesControllerPeriodUpdateResponse
- ApiV1EmployeesBasicPayRuleSerializer
- ApiV1EmployeesBasicPayRuleUpdateRequestSerializer
- ApiV1EmployeesBasicPayRulesControllerPeriodShowResponse
- ApiV1EmployeesBasicPayRulesControllerPeriodUpdateBody
- ApiV1EmployeesBasicPayRulesControllerPeriodUpdateResponse
- ApiV1EmployeesControllerPeriodCreateBody
- ApiV1EmployeesControllerPeriodCreateResponse
- ApiV1EmployeesControllerPeriodShowResponse
- ApiV1EmployeesControllerPeriodUpdateBody
- ApiV1EmployeesControllerPeriodUpdateResponse
- ApiV1EmployeesDependentRuleSerializer
- ApiV1EmployeesDependentRuleUpdateRequestSerializer
- ApiV1EmployeesDependentRulesControllerPeriodBulkUpdateBody
- ApiV1EmployeesDependentRulesControllerPeriodBulkUpdateResponse
- ApiV1EmployeesDependentRulesControllerPeriodIndexResponse
- ApiV1EmployeesEmployeeMultiHourlyWageWorkRecordSummarySerializer
- ApiV1EmployeesHealthInsuranceRuleSerializer
- ApiV1EmployeesHealthInsuranceRuleUpdateRequestSerializer
- ApiV1EmployeesHealthInsuranceRulesControllerPeriodShowResponse
- ApiV1EmployeesHealthInsuranceRulesControllerPeriodUpdateBody
- ApiV1EmployeesHealthInsuranceRulesControllerPeriodUpdateResponse
- ApiV1EmployeesIndexSerializer
- ApiV1EmployeesProfileRuleSerializer
- ApiV1EmployeesProfileRuleUpdateRequestSerializer
- ApiV1EmployeesProfileRulesControllerPeriodShowResponse
- ApiV1EmployeesProfileRulesControllerPeriodUpdateBody
- ApiV1EmployeesProfileRulesControllerPeriodUpdateResponse
- ApiV1EmployeesTimeClockSerializer
- ApiV1EmployeesTimeClocksControllerPeriodAvailableTypesResponse
- ApiV1EmployeesTimeClocksControllerPeriodCreateBody
- ApiV1EmployeesTimeClocksControllerPeriodCreateResponse
- ApiV1EmployeesTimeClocksControllerPeriodShowResponse
- ApiV1EmployeesWelfarePensionInsuranceRuleSerializer
- ApiV1EmployeesWelfarePensionInsuranceRuleUpdateRequestSerializer
- ApiV1EmployeesWelfarePensionInsuranceRulesControllerPeriodShowResponse
- ApiV1EmployeesWelfarePensionInsuranceRulesControllerPeriodUpdateBody
- ApiV1EmployeesWelfarePensionInsuranceRulesControllerPeriodUpdateResponse
- ApiV1EmployeesWorkRecordSerializer
- ApiV1EmployeesWorkRecordSummaryControllerPeriodUpdateBody
- ApiV1EmployeesWorkRecordSummarySerializer
- ApiV1EmployeesWorkRecordTimeRangeResponseSerializer
- ApiV1EmployeesWorkRecordTimeRangeSerializer
- ApiV1EmployeesWorkRecordsControllerPeriodUpdateBody
- ApiV1FlowRouteStepSrializerInner
- ApiV1GroupCreateRequest
- ApiV1GroupCreateRequestParams
- ApiV1GroupMembershipSerializer
- ApiV1GroupResponse
- ApiV1GroupResponseParams
- ApiV1GroupUpdateRequest
- ApiV1GroupUpdateRequestParams
- ApiV1GroupsIndexResponse
- ApiV1HolidaysAndHoursSerializer
- ApiV1MonthlyAttendanceCreateRequest
- ApiV1MonthlyAttendanceIndexResponse
- ApiV1MonthlyAttendanceIndexResponseParams
- ApiV1MonthlyAttendanceResponse
- ApiV1MonthlyAttendanceResponseParams
- ApiV1MonthlyAttendanceUpdateRequest
- ApiV1OvertimeWorkIndexResponse
- ApiV1OvertimeWorkIndexResponseParams
- ApiV1OvertimeWorkRequest
- ApiV1OvertimeWorkResponse
- ApiV1OvertimeWorkResponseParams
- ApiV1PaidHolidayIndexResponse
- ApiV1PaidHolidayIndexResponseParams
- ApiV1PaidHolidayRequest
- ApiV1PaidHolidayResponse
- ApiV1PaidHolidayResponseParams
- ApiV1PositionIndexResponse
- ApiV1PositionRequest
- ApiV1PositionRequestParams
- ApiV1PositionResponse
- ApiV1PositionResponseParams
- ApiV1SalariesEmployeePayrollStatementSerializer
- ApiV1SalariesEmployeePayrollStatementsControllerPeriodIndexResponse
- ApiV1SalariesEmployeePayrollStatementsControllerPeriodShowResponse
- ApiV1UsersCompanySerializer
- ApiV1UsersMeSerializer
- Error
- ErrorErrorsInner
- ForbiddenError
- ForbiddenErrorErrorsInner
- InternalServerError
- InternalServerErrorErrorsInner
- NotfoundError
- NotfoundErrorErrorsInner
- UnauthorizedError
To get access to the crate's generated documentation, use:
cargo doc --open