> ## 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.

# Update a sandbox company's data



## OpenAPI

````yaml put /sandbox/company
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/company:
    put:
      tags:
        - Sandbox
      summary: Update a sandbox company's data
      operationId: put-sandbox-company
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyWithoutId'
            examples:
              Example 1:
                value:
                  legal_name: Profound Platform Inc
                  ein: '123456789'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyWithoutId'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Finch from '@tryfinch/finch-api';

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

            const company = await client.sandbox.company.update({
              accounts: [{}],
              departments: [{}],
              ein: 'ein',
              entity: {},
              legal_name: 'legal_name',
              locations: [
                {
                  city: 'city',
                  country: 'country',
                  line1: 'line1',
                  line2: 'line2',
                  postal_code: 'postal_code',
                  state: 'state',
                },
              ],
              primary_email: 'dev@stainless.com',
              primary_phone_number: 'primary_phone_number',
            });

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

            client = Finch(
                access_token="My Access Token",
            )
            company = client.sandbox.company.update(
                accounts=[{}],
                departments=[{}],
                ein="ein",
                entity={},
                legal_name="legal_name",
                locations=[{
                    "city": "city",
                    "country": "country",
                    "line1": "line1",
                    "line2": "line2",
                    "postal_code": "postal_code",
                    "state": "state",
                }],
                primary_email="dev@stainless.com",
                primary_phone_number="primary_phone_number",
            )
            print(company.accounts)
        - 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\tcompany, err := client.Sandbox.Company.Update(context.TODO(), finchgo.SandboxCompanyUpdateParams{\n\t\tAccounts:    finchgo.F([]finchgo.SandboxCompanyUpdateParamsAccount{{}}),\n\t\tDepartments: finchgo.F([]finchgo.SandboxCompanyUpdateParamsDepartment{{}}),\n\t\tEin:         finchgo.F(\"ein\"),\n\t\tEntity:      finchgo.F(finchgo.SandboxCompanyUpdateParamsEntity{}),\n\t\tLegalName:   finchgo.F(\"legal_name\"),\n\t\tLocations: finchgo.F([]finchgo.LocationParam{{\n\t\t\tCity:       finchgo.F(\"city\"),\n\t\t\tCountry:    finchgo.F(\"country\"),\n\t\t\tLine1:      finchgo.F(\"line1\"),\n\t\t\tLine2:      finchgo.F(\"line2\"),\n\t\t\tPostalCode: finchgo.F(\"postal_code\"),\n\t\t\tState:      finchgo.F(\"state\"),\n\t\t}}),\n\t\tPrimaryEmail:       finchgo.F(\"dev@stainless.com\"),\n\t\tPrimaryPhoneNumber: finchgo.F(\"primary_phone_number\"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", company.Accounts)\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.CompanyUpdateResponse;
            import com.tryfinch.api.models.Location;
            import com.tryfinch.api.models.SandboxCompanyUpdateParams;

            public final class Main {
                private Main() {}

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

                    SandboxCompanyUpdateParams params = SandboxCompanyUpdateParams.builder()
                        .addAccount(SandboxCompanyUpdateParams.Account.builder().build())
                        .addDepartment(SandboxCompanyUpdateParams.Department.builder().build())
                        .ein("ein")
                        .entity(SandboxCompanyUpdateParams.Entity.builder().build())
                        .legalName("legal_name")
                        .addLocation(Location.builder()
                            .city("city")
                            .country("country")
                            .line1("line1")
                            .line2("line2")
                            .postalCode("postal_code")
                            .state("state")
                            .build())
                        .primaryEmail("dev@stainless.com")
                        .primaryPhoneNumber("primary_phone_number")
                        .build();
                    CompanyUpdateResponse company = client.sandbox().company().update(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.CompanyUpdateResponse
            import com.tryfinch.api.models.Location
            import com.tryfinch.api.models.SandboxCompanyUpdateParams

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

                val params: SandboxCompanyUpdateParams = SandboxCompanyUpdateParams.builder()
                    .addAccount(SandboxCompanyUpdateParams.Account.builder().build())
                    .addDepartment(SandboxCompanyUpdateParams.Department.builder().build())
                    .ein("ein")
                    .entity(SandboxCompanyUpdateParams.Entity.builder().build())
                    .legalName("legal_name")
                    .addLocation(Location.builder()
                        .city("city")
                        .country("country")
                        .line1("line1")
                        .line2("line2")
                        .postalCode("postal_code")
                        .state("state")
                        .build())
                    .primaryEmail("dev@stainless.com")
                    .primaryPhoneNumber("primary_phone_number")
                    .build()
                val company: CompanyUpdateResponse = client.sandbox().company().update(params)
            }
        - lang: Ruby
          source: |-
            require "finch_api"

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

            company = finch.sandbox.company.update(
              accounts: [{}],
              departments: [{}],
              ein: "ein",
              entity: {},
              legal_name: "legal_name",
              locations: [
                {city: "city", country: "country", line1: "line1", line2: "line2", postal_code: "postal_code", state: "state"}
              ],
              primary_email: "dev@stainless.com",
              primary_phone_number: "primary_phone_number"
            )

            puts(company)
components:
  schemas:
    CompanyWithoutId:
      type: object
      properties:
        legal_name:
          type: string
          description: The legal name of the company.
          nullable: true
        entity:
          type: object
          description: The entity type object.
          nullable: true
          properties:
            type:
              type: string
              description: The tax payer type of the company.
              enum:
                - llc
                - lp
                - corporation
                - sole_proprietor
                - non_profit
                - partnership
                - cooperative
                - null
              nullable: true
            subtype:
              type: string
              description: The tax payer subtype of the company.
              enum:
                - s_corporation
                - c_corporation
                - b_corporation
                - null
              nullable: true
        primary_email:
          type: string
          description: The email of the main administrator on the account.
          nullable: true
          format: email
        primary_phone_number:
          type: string
          description: >-
            The phone number of the main administrator on the account. Format:
            E.164, with extension where applicable, e.g. `+NNNNNNNNNNN
            xExtension`
          nullable: true
        departments:
          type: array
          description: The array of company departments.
          nullable: true
          items:
            type: object
            nullable: true
            properties:
              name:
                type: string
                description: The department name.
                nullable: true
              parent:
                type: object
                description: The parent department, if present.
                nullable: true
                properties:
                  name:
                    type: string
                    description: The parent department's name.
                    nullable: true
        ein:
          type: string
          description: The employer identification number.
          nullable: true
        locations:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/Location'
        accounts:
          type: array
          description: >-
            An array of bank account objects associated with the payroll/HRIS
            system.
          nullable: true
          items:
            type: object
            properties:
              routing_number:
                type: string
                description: >-
                  A nine-digit code that's based on the U.S. Bank location where
                  your account was opened.
                nullable: true
              account_name:
                type: string
                description: The name of the bank associated in the payroll/HRIS system.
                nullable: true
              institution_name:
                type: string
                description: Name of the banking institution.
                nullable: true
              account_type:
                type: string
                description: The type of bank account.
                enum:
                  - checking
                  - savings
                  - null
                nullable: true
              account_number:
                type: string
                description: 10-12 digit number to specify the bank account
                nullable: true
    Location:
      type: object
      nullable: true
      properties:
        line1:
          type: string
          nullable: true
          description: Street address or PO box.
        line2:
          type: string
          nullable: true
          description: Apartment, suite, unit, or building.
        city:
          type: string
          nullable: true
          description: City, district, suburb, town, or village.
        state:
          type: string
          nullable: true
          description: The state code.
        postal_code:
          type: string
          nullable: true
          description: The postal code or zip code.
        country:
          type: string
          nullable: true
          description: The 2-letter ISO 3166 country code.
        name:
          type: string
          nullable: true
        source_id:
          type: string
          nullable: true
      required:
        - line1
        - line2
        - city
        - state
        - postal_code
        - country
      description: ''
      title: Location
      x-tags:
        - Models
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Please use your Access Token

````