### Rate Limit Headers Example Source: https://developer.freee.co.jp/reference/accounting/reference Example of rate limit headers returned when an API usage limit is exceeded. ```http x-ratelimit-limit:10 x-ratelimit-remaining:1 x-ratelimit-reset:2023-01-13T10:22:29+09:00 ``` -------------------------------- ### Webhook Notification Example Source: https://developer.freee.co.jp/reference/accounting/webhook Example of a Webhook notification for expense application creation. ```json { "headers": { "x-freee-token": "検証用トークン", }, "body": "{ \"id\":\"通知固有ID", \"application_id\":アプリのID, \"resource\":\"accounting:expense_application\", \"action\":\"created\", \"created_at\":\"2022-09-11T21:42:56+09:00\", \"expense_application\":{ \"id\":経費申請のid, \"company_id\":経費申請のcompany_id, \"status\":\"in_progress\", \"applicant_id\":経費申請の申請者のユーザーID } }" } ``` -------------------------------- ### データフォーマット Source: https://developer.freee.co.jp/reference Example of setting the Content-Type header for JSON requests. ```http Content-Type: application/json ``` -------------------------------- ### Error Response Example Source: https://developer.freee.co.jp/reference/iv/reference Example of an error response body from the API. ```json { "status_code" : 400, "errors" : [ { "type" : "bad_request", "messages" : [ "リクエストの形式が不正です。" ] } ] } ``` -------------------------------- ### API Usage Limit Headers Source: https://developer.freee.co.jp/reference/iv/reference Example response headers indicating API usage limits. ```text X-RateLimit-Limit:1500 X-RateLimit-Remaining:1498 X-RateLimit-Reset:2018-01-01T12:00:00.000000Z X-Ratelimit-Limit-Minute:30 X-Ratelimit-Remaining-Minute:29 X-Ratelimit-Reset-Minute:2018-01-01T12:00:00.000000Z X-RateLimit-Limit-Day:3000 X-RateLimit-Remaining-Day:2991 X-RateLimit-Reset-Day:2018-01-02T00:00:00.000000Z ``` -------------------------------- ### Access Token Response Source: https://developer.freee.co.jp/reference/%E8%AA%8D%E5%8F%AF%E3%82%B3%E3%83%BC%E3%83%89 Example JSON response when successfully obtaining an access token. ```json { "access_token": "xxx", "token_type": "bearer", "expires_in": 21600, "refresh_token": "yyy", "scope": "read write", "company_id": "123", "external_cid": "xyz" } ``` -------------------------------- ### Common Error Response Example Source: https://developer.freee.co.jp/reference/accounting/reference An example of a common error response structure, including status code, type, and messages. ```json { "status_code" : 400, "errors" : [ { "type" : "status", "messages" : ["不正なリクエストです。"] }, { "type" : "validation", "messages" : ["Date は不正な日付フォーマットです。入力例:2019-12-17"] } ] } ``` -------------------------------- ### チームの一覧を取得する Source: https://developer.freee.co.jp/reference/pm 指定した事業所のチーム一覧を取得することができます。チームの基本情報に加えて、チームメンバーの一覧、チームリーダーなどの情報を取得できます。 ```HTTP GET /teams ``` -------------------------------- ### プロジェクトの収支情報を取得する Source: https://developer.freee.co.jp/reference/pm 指定したプロジェクトの収支情報を取得することができます。収支管理シートと同じ内容を取得できるため、その値を使って独自のレポートを作成することが可能です。 ```HTTP GET /projects/{id} ``` -------------------------------- ### プロジェクトの一覧を取得する Source: https://developer.freee.co.jp/reference/pm 指定した事業所のチーム一覧を取得することができます。運用ステータス、マネージャー、発注先などで絞り込みできます。 ```HTTP GET /projects ``` -------------------------------- ### プロジェクトを登録する Source: https://developer.freee.co.jp/reference/pm プロジェクトを新規登録することができます。コードや名称と言った基本的な情報のほか、登録と同時にメンバーのアサインを行うこともできます。 ```HTTP POST /projects ``` -------------------------------- ### Authorization URL Source: https://developer.freee.co.jp/reference/%E8%AA%8D%E5%8F%AF%E3%82%B3%E3%83%BC%E3%83%89 The URL format for initiating the authorization flow. ```text https://accounts.secure.freee.co.jp/public_api/authorize? ``` -------------------------------- ### Request Access Token Source: https://developer.freee.co.jp/reference/%E8%AA%8D%E5%8F%AF%E3%82%B3%E3%83%BC%E3%83%89 POST request to obtain an access token using an authorization code. ```http POST https://accounts.secure.freee.co.jp/public_api/token Content-Type: application/x-www-form-urlencoded grant_type=authorization_code &client_id={client_id} &client_secret={client_secret} &code={認可コード} &redirect_uri={コールバックURL} ``` -------------------------------- ### 工数を登録する Source: https://developer.freee.co.jp/reference/pm 指定した日付に対する工数を登録することができます。従業員の場合は自分自身、管理者の場合は従業員を指定した登録が可能です。 ```HTTP POST /workloads ```