6 releases (breaking)
0.7.0 | Mar 1, 2023 |
---|---|
0.6.0 | Jan 5, 2023 |
0.5.0 | Nov 2, 2022 |
0.4.1 | Aug 18, 2022 |
0.3.1 | Jul 14, 2022 |
#36 in #rest-client
1.5MB
10K
SLoC
Rust API client for openapi
freee人事労務のAPI仕様です。
スタートガイド
freee API開発がはじめての方はfreee API スタートガイドを参照してください。
仕様
APIエンドポイント
https://api.freee.co.jp/hr
認証について
OAuth2.0を利用します。詳細はリファレンスの認証に関する記載を参照してください。
データフォーマット
リクエスト、レスポンスともにJSON形式をサポートしていますが、詳細は、API毎の説明欄(application/jsonなど)を確認してください。
後方互換性ありの変更
freeeでは、APIを改善していくために以下のような変更は後方互換性ありとして通知なく変更を入れることがあります。アプリケーション実装者は以下を踏まえて開発を行ってください。
- 新しいAPIリソース・エンドポイントの追加
- 既存のAPIに対して必須ではない新しいリクエストパラメータの追加
- 既存のAPIレスポンスに対する新しいプロパティの追加
- 既存のAPIレスポンスに対するプロパティの順番の入れ変え
- keyとなっているidやcodeの長さの変更(長くする)
共通レスポンスヘッダー
すべてのAPIのレスポンスには以下のHTTPヘッダーが含まれます。
-
X-Request-Id
- 各リクエスト毎に発行されるID
共通エラーレスポンス
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://accounts.secure.freee.co.jp/contacts?from=payroll
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: 2022-02-01
- Package version: 2022-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
- ApiV1EmployeeIndexSerializer
- ApiV1EmployeePayrollStatementsEmployeeAttendanceItemSerializer
- ApiV1EmployeePayrollStatementsEmployeeOvertimePayItemSerializer
- ApiV1EmployeePayrollStatementsEmployeePayrollStatementItemSerializer
- ApiV1EmployeeProfileCustomFieldSerializer
- ApiV1EmployeeSerializer
- ApiV1EmployeeUpdateRequestSerializer
- ApiV1EmployeesBankAccountRuleSerializer
- ApiV1EmployeesBankAccountRuleUpdateRequestSerializer
- ApiV1EmployeesBankAccountRulesControllerPeriodShowResponse
- ApiV1EmployeesBankAccountRulesControllerPeriodUpdateBody
- ApiV1EmployeesBankAccountRulesControllerPeriodUpdateResponse
- ApiV1EmployeesBasicPayRuleSerializer
- ApiV1EmployeesBasicPayRuleUpdateRequestSerializer
- ApiV1EmployeesBasicPayRulesControllerPeriodShowResponse
- ApiV1EmployeesBasicPayRulesControllerPeriodUpdateBody
- ApiV1EmployeesBasicPayRulesControllerPeriodUpdateResponse
- ApiV1EmployeesControllerPeriodCreateBody
- ApiV1EmployeesControllerPeriodCreateResponse
- ApiV1EmployeesControllerPeriodIndexResponse
- ApiV1EmployeesControllerPeriodShowResponse
- ApiV1EmployeesControllerPeriodUpdateBody
- ApiV1EmployeesControllerPeriodUpdateResponse
- ApiV1EmployeesDependentRuleSerializer
- ApiV1EmployeesDependentRuleUpdateRequestSerializer
- ApiV1EmployeesDependentRulesControllerPeriodBulkUpdateBody
- ApiV1EmployeesDependentRulesControllerPeriodBulkUpdateResponse
- ApiV1EmployeesDependentRulesControllerPeriodIndexResponse
- ApiV1EmployeesEmployeeMultiHourlyWageWorkRecordSummarySerializer
- ApiV1EmployeesHealthInsuranceRuleSerializer
- ApiV1EmployeesHealthInsuranceRuleUpdateRequestSerializer
- ApiV1EmployeesHealthInsuranceRulesControllerPeriodShowResponse
- ApiV1EmployeesHealthInsuranceRulesControllerPeriodUpdateBody
- ApiV1EmployeesHealthInsuranceRulesControllerPeriodUpdateResponse
- 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
- ApiV1ProfileCustomFieldGroupSerializer
- 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
Author
Dependencies
~5–17MB
~233K SLoC