# Create onboarding

API for creating new onboarding requests, this API creates [Onboarding Model](https://docs.sensepass.com/sensepay/partner-api/models/onboarding-model)

### API Interface

## Creating a new onboarding object

<mark style="color:green;">`POST`</mark> `/api/partners/onboarding/v1`

This API creates new onboarding request based on the fields below.

#### Headers

| Name                                            | Type   | Description                    |
| ----------------------------------------------- | ------ | ------------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Auth token from auth/token API |

#### Request Body

| Name                                                | Type             | Description                                                                                           |
| --------------------------------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>              | string           | The business name of the merchant that will be created                                                |
| house\_number<mark style="color:red;">\*</mark>     | number           | The house number of the merchant that will be created                                                 |
| street<mark style="color:red;">\*</mark>            | string           | The street of the merchant that will be created                                                       |
| title<mark style="color:red;">\*</mark>             | string           | The display name of the merchant that will be created                                                 |
| phone<mark style="color:red;">\*</mark>             | string           | The phonse number of the merchant that will be created                                                |
| country<mark style="color:red;">\*</mark>           | string           | The countrty of the merchant that will be created                                                     |
| city<mark style="color:red;">\*</mark>              | string           | The city of the merchant that will be created                                                         |
| logo                                                | string           | The logo of the merchant that will be created                                                         |
| website                                             | string           | The website of the merchant that will be created                                                      |
| owner.first\_name<mark style="color:red;">\*</mark> | string           | The first name of the merchant's owner                                                                |
| owner.last\_name<mark style="color:red;">\*</mark>  | string           | The last name of the merchant's owner                                                                 |
| email<mark style="color:red;">\*</mark>             | string           | The email address of the merchant that will be created                                                |
| locale                                              | string           | The locale of the merchant that will be created, can be one of the following: IL, Russia, Canada, USA |
| state                                               | string           | The state of the merchant that will be created                                                        |
| category<mark style="color:red;">\*</mark>          | string           | The business category of the merchant that will be created                                            |
| owner.phone<mark style="color:red;">\*</mark>       | string           | The phone number of the merchant's owner                                                              |
| owner.email<mark style="color:red;">\*</mark>       | string           | The email address of the merchant's owner                                                             |
| owner.locale                                        | string           | The locale of the merchant's owner, can be one of the following: IL, Russia, Canada, USA, USD - PST   |
| locations<mark style="color:red;">\*</mark>         | array of objects | <p>An array of the merchant's locations (stores)<br>example: \[{ "name": "store1" }]</p>              |
| locations.name<mark style="color:red;">\*</mark>    | String           | The name of the merchant's location (store)                                                           |
| EIN<mark style="color:red;">\*</mark>               | string           | The Employer Identification Number of the merchant that will be created                               |
| locations.number                                    | String           | The number of the merchant's location (store), the default, if no value is provided, is 1             |
| locations.logo                                      | String           | The logo of the merchant's location (store)                                                           |
| owner<mark style="color:red;">\*</mark>             | object           |                                                                                                       |

{% tabs %}
{% tab title="200: OK OK" %}
**See Onboarding entity schema:** # onboarding-entity

```javascript
{
    "uid": "52c8e55d-26dc-4935-9214-e3fccf6c8bcf",
    "url": "https://partner.sandbox.sensepass.com/partnersOnBoarding/52c8e55d-26dc-4935-9214-e3fccf6c8bcf",
    "status": "Pending"
}
```

{% endtab %}

{% tab title="400: Bad Request Invalid Input" %}

```javascript
{
    "statusCode": 400,
    "message": [
        "category should not be empty"
    ],
    "error": "Bad Request"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Error" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### Examples

Basic request example to create a new onboarding process.

```json
{
	"name": "ski and snowboard inc",
	"title": "ski&snowboard",
	"category": "ski",
	"country": "Italy",
	"city": "abrotzo",
	"street": "very goood thing",
	"house_number": "100",
	"EIN": "89485721",
	"phone": "19148759682",
	"email": "merchant2@email.com",
	"state": "my state",
	"owner": {
		"first_name": "moshe",
        	"last_name": "israel",
		"phone": "1555888999",
		"email": "contact@me.com"
	},
	"locations": [{
		"name": "my store"
	}]
}

```

### Schema

Full Onboarding Entity schema: [**#onboarding-entity**](https://docs.sensepass.com/sensepay/partner-api/models/onboarding-model)

###
