# OnboardingApi

Functionality for Onboarding: The process where the user becomes a user of Salaxy service and an account is created for him / her / the company.

Salaxy API v03, **Finland only**. 8 operations. Interactive version: [REST API reference](https://code.salaxy.com/reference/rest-api.md). Machine-readable: [OpenAPI document](https://code.salaxy.com/openapi/salaxy-03.json).

**The reference wins:**
These pages are generated from the OpenAPI document. If a guide and this reference disagree about a field, follow the reference. Error responses are not in the document — see [Errors](https://code.salaxy.com/reference/errors.md).

## `GET /v03/api/onboarding/{id}`

**Gets a single Onboarding object based on identier**

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | Unique identifier for the object |

Response: `Onboarding`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/GET/v03/api/onboarding/{id})

## `DELETE /v03/api/onboarding/{id}`

**Deletes an Onboarding object from the storage. The for onboarding of any type.**

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | Unique identifier for the object |

Response: `string`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/DELETE/v03/api/onboarding/{id})

## `GET /v03/api/onboarding/account/{accountId}`

**Gets an existing onboarding object for given authorizing account.**

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Account id of the authorizing account. |

Response: `Onboarding`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/GET/v03/api/onboarding/account/{accountId})

## `GET /v03/api/onboarding/new`

**Factory method that creates a new Onboarding object**

Response: `Onboarding`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/GET/v03/api/onboarding/new)

## `POST /v03/api/onboarding`

**Creates or updates an Onboarding object.**

Request body: `Onboarding` (required)

Response: `Onboarding`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/POST/v03/api/onboarding)

## `POST /v03/api/onboarding/commit`

**Commits the onboarding object and creates/changes the account.**

Request body: `Onboarding` (required)

Response: `Onboarding`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/POST/v03/api/onboarding/commit)

## `POST /v03/api/onboarding/contract`

**Accept the contact between SPL and the customer.**

Request body: `AuthorizationContract` (required)

Response: `AuthorizationContract`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/POST/v03/api/onboarding/contract)

## `GET /v03/api/onboarding/contract`

**Returns the contract that the current account accepts on the signing page
(workerContract for a worker; partnerContract or employerAuthorization for a company), whether it already has a valid contract,
and whether the parent account's missing or expired IR certificate stops the acceptance.**

Response: `ContractToAccept`

Try it: [interactive reference](https://code.salaxy.com/reference/rest-api.md#tag/onboardingapi/GET/v03/api/onboarding/contract)
