/company, /directory, /individual, /employment, /payment, and /pay-statement. These endpoints only allow the reading of data from employment providers; they do not permit the writing of data back to the system. Writing deductions and contributions back to the provider is covered in Write Data step.
These calls must be made from your backend using the access token obtained after Finch Connect — see Backend Security for why the access token should never be exposed to your frontend.
In this step, you will learn how to make API requests, handle responses, and manage request rate limits.
- Choose the appropriate Finch API endpoints: Pick the endpoint(s) that match the data your application needs. See Verify Product Scopes for what each product/endpoint returns, or How Finch’s API is organized for the full data model.
-
Batch your requests: For endpoints that accept multiple IDs —
/individual,/employment,/pay-statement— send all the IDs you need in a single call instead of one request per ID. This reduces the number of API calls your application makes and, as a result, helps you stay within your rate limits. See Batch Requests for the request and response format. -
Set up the HTTP request: Use an HTTP library such as Fetch or Axios (or another suitable package) to create an HTTP request. Include the access token in the
Authorizationheader using the formatBearer <your_access_token>. Make sure the HTTP request uses the appropriate method (GET, POST, etc.) and includes any required parameters. -
Include
entity_idsquery parameter in requests: When using an access token associated with multiple entities, you must include theentity_idsquery parameter in all API requests. If you do not provide theentity_idsquery parameter, Finch will return the following error:
entity_ids[]=<entity_id>) — to fetch data for multiple entities, make one request per entity.
-
Handle API responses: When Finch returns a response, parse the JSON data and extract the relevant information needed for your application. All API responses include a header that includes date the data was retrieved. See our Development Guide on Headers for more details. Store or display the data as needed for your application.
TheExample response
idvalues in a response (like theindividualandmanagerIDs above) stay constant across access tokens generated via the same authentication method. If a connection has multiple access tokens from different authentication methods — for example, one from credentials and another from an API token — those IDs can differ between tokens, since Finch maps its IDs to the underlying employment system’s own identifiers, which vary by authentication method. Responses can includenullfield values or, for some requests, a202status instead of the shape above. See Handling API Responses for why these occur and how to handle each. -
Paginate
GET /directoryandPOST /pay-statementresponses:GET /directoryand each entry in aPOST /pay-statementrequest return paginated results usinglimitandoffset. Setlimitexplicitly — if you omit it, Finch returns only the default page size, not the full result set.Loop onoffset, adding the number of items received each time, until the response’spaging.countshows there are no more records to fetch:Alimitabove the max returns a422with afinch_codeofpage_size_limit_exceeded. See Mitigate Errors for the error format. -
Handle errors and edge cases: Finch returns
4XXor5XXerror types when a request fails, sometimes due to an unsupported response from the underlying employment system. See Server errors in Mitigate Errors for a retry-with-backoff implementation and when to contact support with theFinch-Request-ID. -
Handle 401 re-authentication errors: A
401response with afinch_codeofreauthenticate_usermeans Finch lost access to the employer’s provider and the employer must reauthenticate. See Reauthentication errors in Mitigate Errors for the full flow. -
Manage rate limits: Finch enforces rate limits per product on a rolling 60-second basis, for both applications and access tokens. Batching your requests (see step 2 above) is the main way to stay within these limits. If Finch returns a
429HTTP status code, back off and retry — see Rate limit errors in Mitigate Errors for the full model and a retry implementation.