NAV

addCompany

POST /v2/company-partner/add

If you already have partner access to SimplePin's platform, this method will allow you to create a new company entity on the fly. When you call this method, you have to pass us the information of the company and the account's owner.

Please note, that the account owner should be unique in your system. SimplePin does not allow the creation of multiple company entities with the same email address. Since we are relying on you for account creation, we suggest that you validate the email address of the account owner before creating a company entry in SimplePin.

If the call is executed correctly, the company and its user entities will be created in SimplePin, which will respond with API tokens. This could be used for all of your calls with the exception of the company partner controller.

Parameters
Name
Description
addCompanyModelV2 (required)

This model allows you to specify all parameters required for company creation. For more details, follow the body schema described in the details of this call.

Response Messages
Code
Description
200
OK
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
             {
    "address": {
        "id": 0,
        "zip": "string",
        "city": "string",
        "country": 0,
        "province": 0,
        "address": "string",
        "selected": true
    },
    "billing_descriptor": "string",
    "collect_taxes": true,
    "company_code": "string",
    "default_lang": {
        "available_langs": [
            "EN",
            "FR",
            "ES"
        ],
        "default_lang": "EN"
    },
    "email": "string",
    "logo": "string",
    "name": "string",
    "phone": "string",
    "user_model": {
        "email": "string",
        "first_name": "string",
        "last_name": "string",
        "logo": "string",
        "password": "string",
        "phone": "string",
        "role": "ACCOUNT_OWNER",
        "state": "ACTIVE",
        "user_code": "string"
    },
    "web_hooks": []
}
             
          
{ } CompanyAddV2Model
address (optional) AddressApiV2Model
billing_descriptor (optional) string
collect_taxes (optional) boolean
company_code (optional) string
default_lang (optional) CompanyLanguageV2Model
email (optional) string
logo (optional) string
name (optional) string
phone (optional) string
user_model (optional) UserAddUpdateV2Model
web_hooks (optional) array
{ } AddressApiV2Model
id (optional) integer
zip (optional) string
city (optional) string
country (optional) integer
province (optional) integer
address (optional) string
selected (optional) boolean
{ } CompanyLanguageV2Model
available_langs (optional) array
default_lang (optional) string
{ } UserAddUpdateV2Model
email (optional) string
first_name (optional) string
last_name (optional) string
logo (optional) string
password (optional) string
phone (optional) string
role (optional) string
state (optional) string
user_code (optional) string
             {
    "api_keys": [
        {
            "key": "string",
            "name": "string",
            "token": "string"
        }
    ],
    "company_code": "string",
    "id": 0,
    "name": "string"
}
             
          
{ } CompanyPreviewV2Model
api_keys (optional) array|ApiKeyV2Model
company_code (optional) string
id (optional) integer
name (optional) string
{ } ApiKeyV2Model
key (optional) string
name (optional) string
token (optional) string
             <company_add_model>
  <address/>
  <billing_descriptor>string</billing_descriptor>
  <collect_taxes>1</collect_taxes>
  <company_code>string</company_code>
  <default_lang/>
  <email>string</email>
  <logo>string</logo>
  <name>string</name>
  <phone>string</phone>
  <user_model/>
  <web_hooks/>
</company_add_model>

             
          
{ } CompanyAddV2Model
address (optional) AddressApiV2Model
billing_descriptor (optional) string
collect_taxes (optional) boolean
company_code (optional) string
default_lang (optional) CompanyLanguageV2Model
email (optional) string
logo (optional) string
name (optional) string
phone (optional) string
user_model (optional) UserAddUpdateV2Model
web_hooks (optional) array
{ } AddressApiV2Model
id (optional) integer
zip (optional) string
city (optional) string
country (optional) integer
province (optional) integer
address (optional) string
selected (optional) boolean
{ } CompanyLanguageV2Model
available_langs (optional) array
default_lang (optional) string
{ } UserAddUpdateV2Model
email (optional) string
first_name (optional) string
last_name (optional) string
logo (optional) string
password (optional) string
phone (optional) string
role (optional) string
state (optional) string
user_code (optional) string
             <company_preview_model>
  <api_keys>
    <api_key>
      <key>string</key>
      <name>string</name>
      <token>string</token>
    </api_key>
    <api_key>
      <key>string</key>
      <name>string</name>
      <token>string</token>
    </api_key>
  </api_keys>
  <company_code>string</company_code>
  <id>0</id>
  <name>string</name>
</company_preview_model>

             
          
{ } CompanyPreviewV2Model
api_keys (optional) array|ApiKeyV2Model
company_code (optional) string
id (optional) integer
name (optional) string
{ } ApiKeyV2Model
key (optional) string
name (optional) string
token (optional) string