> ## Documentation Index
> Fetch the complete documentation index at: https://developer.tryfinch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enqueue a new sandbox job

Analogous to [`POST /jobs/automated`](/api-reference/management/enqueue-a-new-automated-job), but for automated and assisted Finch Sandbox connections. Use this endpoint after updating a Finch Sandbox connection's data to "sync" the data with Finch and see it reflected in `/employer` data API calls.

<Note>
  Assisted connections will return `null` for `job_id` and `job_url`, since no job is actually being created. Simply call this endpoint, and then call the `/employer` API to see the updated data.
</Note>


## OpenAPI

````yaml post /sandbox/jobs
openapi: 3.1.0
info:
  title: API Reference
  version: '2020-09-17'
  contact: {}
  description: >-
    The Finch HRIS API provides a unified way to connect to a multitide of HRIS
    systems. The API requires an access token issued by Finch.


    By default, Organization and Payroll requests use Finch's [Data
    Syncs](/developer-resources/Data-Syncs). If a request is made before the
    initial sync has completed, Finch will request data live from the provider.
    The latency on live requests may range from seconds to minutes depending on
    the provider and batch size.

    For automated integrations, Deductions requests (both read and write) are
    always made live to the provider. Latencies may range from seconds to
    minutes depending on the provider and batch size.



    Employer products are specified by the product parameter, a space-separated
    list of products that your application requests from an employer
    authenticating through Finch Connect. Valid product names are—

    - `company`: Read basic company data


    - `directory`: Read company directory and organization structure


    - `individual`: Read individual data, excluding income and employment data


    - `employment`: Read individual employment and income data


    - `payment`: Read payroll and contractor related payments by the company


    - `pay_statement`: Read detailed pay statements for each individual


    - `benefits`: Create and manage deductions and contributions and enrollment
    for an employer


    [![Open in
    Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4?action=collection%2Ffork&collection-url=entityId%3D21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4%26entityType%3Dcollection%26workspaceId%3D1edf19bc-e0a8-41e9-ac55-481a4b50790b)
servers:
  - url: https://api.tryfinch.com
    description: ''
security: []
tags:
  - name: Organization
  - name: Payroll
  - name: Deductions
  - name: Management
  - name: Sandbox
paths:
  /sandbox/jobs:
    post:
      tags:
        - Sandbox
      summary: Enqueue a new sandbox job
      operationId: post-sandbox-job
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: >-
                    The type of job to start. Currently the only supported type
                    is `data_sync_all`
                  enum:
                    - data_sync_all
              required:
                - type
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_id:
                    type: string
                    description: The id of the job that has been created.
                    format: uuid
                  job_url:
                    type: string
                    description: The url that can be used to retrieve the job status
                  allowed_refreshes:
                    type: integer
                    description: >-
                      The number of allowed refreshes per hour (per hour, fixed
                      window)
                  remaining_refreshes:
                    type: integer
                    description: >-
                      The number of remaining refreshes available (per hour,
                      fixed window)
              examples:
                Example 1:
                  value:
                    job_id: 453bd7d7-5355-4d6d-a38e-d9e7eb218c3f
                    job_url: >-
                      https://api.tryfinch.com/jobs/automated/453bd7d7-5355-4d6d-a38e-d9e7eb218c3f
                    allowed_refreshes: 2
                    remaining_refreshes: 1
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Finch from '@tryfinch/finch-api';


            const client = new Finch({
              accessToken: 'My Access Token',
            });


            const job = await client.sandbox.jobs.create({ type: 'data_sync_all'
            });


            console.log(job.job_id);
        - lang: Python
          source: |-
            from finch import Finch

            client = Finch(
                access_token="My Access Token",
            )
            job = client.sandbox.jobs.create(
                type="data_sync_all",
            )
            print(job.job_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/Finch-API/finch-api-go\"\n\t\"github.com/Finch-API/finch-api-go/option\"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken(\"My Access Token\"),\n\t)\n\tjob, err := client.Sandbox.Jobs.New(context.TODO(), finchgo.SandboxJobNewParams{\n\t\tType: finchgo.F(finchgo.SandboxJobNewParamsTypeDataSyncAll),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", job.JobID)\n}\n"
        - lang: Java
          source: |-
            package com.tryfinch.api.example;

            import com.tryfinch.api.client.FinchClient;
            import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
            import com.tryfinch.api.models.JobCreateResponse;
            import com.tryfinch.api.models.SandboxJobCreateParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    FinchClient client = FinchOkHttpClient.builder()
                        .fromEnv()
                        .accessToken("My Access Token")
                        .build();

                    SandboxJobCreateParams params = SandboxJobCreateParams.builder()
                        .type(SandboxJobCreateParams.Type.DATA_SYNC_ALL)
                        .build();
                    JobCreateResponse job = client.sandbox().jobs().create(params);
                }
            }
        - lang: Kotlin
          source: |-
            package com.tryfinch.api.example

            import com.tryfinch.api.client.FinchClient
            import com.tryfinch.api.client.okhttp.FinchOkHttpClient
            import com.tryfinch.api.models.JobCreateResponse
            import com.tryfinch.api.models.SandboxJobCreateParams

            fun main() {
                val client: FinchClient = FinchOkHttpClient.builder()
                    .fromEnv()
                    .accessToken("My Access Token")
                    .build()

                val params: SandboxJobCreateParams = SandboxJobCreateParams.builder()
                    .type(SandboxJobCreateParams.Type.DATA_SYNC_ALL)
                    .build()
                val job: JobCreateResponse = client.sandbox().jobs().create(params)
            }
        - lang: Ruby
          source: |-
            require "finch_api"

            finch = FinchAPI::Client.new(access_token: "My Access Token")

            job = finch.sandbox.jobs.create(type: :data_sync_all)

            puts(job)
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Please use your Access Token

````