Struct gusto_api::companies::Companies[][src]

pub struct Companies { /* fields omitted */ }

Implementations

Get a company.

This function performs a GET to the /v1/companies/{company_id_or_uuid} endpoint.

Get a company.

Create a partner managed company (Beta).

This function performs a POST to the /v1/partner_managed_companies endpoint.

This endpoint is in beta and intended for Gusto Embedded Payroll customers. Please apply for early access if you’d like to learn more and use it for production. Note, this endpoint will require you to enter a different agreement with Gusto.

Overview

The partner managed company API provides a way to create a Gusto company that you can manage. This endpoint behaves similarly to creating a company in that it does the following:

  • Creates a new company in Gusto.
  • Creates a new user in Gusto.
  • Makes the new user the primary payroll administrator of the new company.
  • Sends a welcome email to the new user.

Additionally, on successful creation of the company, this API will do the following:

  • Creates a link between the partner and the company.
  • Creates access tokens and refresh tokens that can be used immediately.

In the response, you will receive the access token, the refresh token, and the uuid of the created company.

Authentication

Due to the nature of this endpoint, Gusto will provide partners with an API token and will permit partners to use API Token Authentication instead of OAuth to provision Gusto accounts. The API token is included in the authorization HTTP header with the Token scheme, e.g.:

Content-Type: application/json
Authorization: Token bbb286ff1a4fe6b84742b0d49b8d0d65bd0208d27d3d50333591df71

Create a company.

This function performs a POST to the /v1/provision endpoint.

Overview

The company provisioning API provides a way to create a Gusto company as part of your integration. When you successfully call the API, the API does the following:

  • Creates a new company in Gusto.
  • Creates a new user in Gusto.
  • Makes the new user the primary payroll administrator of the new company.
  • Sends a welcome email to the new user.

In the response, you will receive an account claim URL. Redirect the user to this URL to complete their account setup inside of Gusto

Authentication

Due to the nature of this endpoint, Gusto will provide partners with an API token and will permit partners to use API Token Authentication instead of OAuth to provision Gusto accounts. The API token is included in the authorization HTTP header with the Token scheme, e.g.:

Content-Type: application/json
Authorization: Token bbb286ff1a4fe6b84742b0d49b8d0d65bd0208d27d3d50333591df71

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.