Enterprise
Create Enterprise

Create enterprise

Creates a new Enterprise object.
POST/enterprise/create

Parameters

name - string required unique
The enterprise’s name.


type - string required
The enterprise’s type. There are 3 types for default. no_client, client, others .


email - string required
The enterprise’s email.


cif - string optional unique
The enterprise’s cif. We highly recomend to put cif for each enterprise.


users - [string] optional
The enterprise’s responsibles (An array of existing Salesly user emails). We recomend to put responsibles for each enterprise. If not the enterprise will shown on "Configuration > Enterprise without responsibles" page.


More parameters

  • comments - string
  • phone - string
  • phone_2" - string
  • iban - string
  • web - string
  • public - boolean
  • location - Array of ( Location )
  • contacts - Array of ( Contacts )

We are still working on all definitons of each parameter.

Example (required parameters selected)
{
  "name": "Salesly.app",
  "email": "test@salesly.app",
  "cif": "G1234dd6789",
  "phone": "938206362",
  "type": "client",
  "location": {
    "primary": 1,
    "direction": "Carrer Gavarresa",
    "city": "Cabrianes",
    "postal": "08620",
    "country": "Spain",
    "latitude": "41.7984089",
    "longitude": "1.9100628999999572"
  },
  "contacts": [{
      "name" : "Test",
      "surname" : "Contact",
      "email" : "test@contact.com"
  }],
  "users": ["responsible@salesly.app"]
}

Response

status 200

The created enterprise object.

Response
{
    "id": 10,
    "name": "Salesly.app",
    "email": "test@salesly.app",
    "comments": null,
    "cif": "G1234DD6789",
    "phone": "938206362",
    "phone_2": null,
    "iban": null,
    "web": null,
    "public": 0,
    "last_event": null,
    "next_event": null,
    "last_opportunity_sale_date": null,
    "state": 0,
    "type": 1,
    "no_user": 0,
    "created_at": "2023-10-24 10:38:47",
    "updated_at": "2023-10-24 10:38:47",
    "deleted_at": null,
    "extra_field": null,
    "contacted": null,
    "mailchimp_unsubscribed": null,
    "fiscal_equal_commercial": true,
    "fiscal_name": null,
    "fiscal_address": null,
    "store_discount": null,
    "instagram": null,
    "facebook": null,
    "location": {
        "id": 9,
        "enterprise_id": 10,
        "primary": 1,
        "direction": "Carrer Gavarresa",
        "city": "Cabrianes",
        "postal": "08620",
        "country": "Spain",
        "latitude": "41.7984089",
        "longitude": "1.9100628999999572",
        "created_at": "2023-10-24 10:38:47",
        "updated_at": "2023-10-24 10:38:47",
        "deleted_at": null,
        "extra_info": null
    },
    "users": [
        {
            "id": 1,
            "name": "Joan",
            "surname": null,
            "surname_2": null,
            "phone": null,
            "email": "responsible@salesly.app",
            "birth_date": null,
            "role_id": 1,
            "active": true,
            "language": "es",
            "zoom": 5,
            "latitude": "41.9",
            "longitude": "0.34",
            "remember_token": null,
            "created_at": "2023-08-03 11:16:53",
            "updated_at": "2023-10-24 10:34:27",
            "deleted_at": null,
            "last_login_session": "6536a0f061f74",
            "superadmin": true,
            "product_edition": false,
            "weekly_reports": true,
            "opportunities_default_view": 2,
            "home_kpis_layout": "[]",
            "login_type": 1,
            "role_name": "Administrador",
            "complete_name": "Joan ",
            "pivot": {
                "enterprise_id": 10,
                "user_id": 1,
                "created_at": "2023-10-24 10:38:47",
                "updated_at": "2023-10-24 10:38:47",
                "deleted_at": null
            },
            "role": {
                "id": 1,
                "name": "Administrador",
                "slug": "admin",
                "description": "Administradores",
                "color": "#3490DC",
                "created_at": "2023-08-03 11:16:49",
                "updated_at": "2023-08-03 11:16:49",
                "deleted_at": null
            }
        }
    ],
    "contacts": [
        {
            "id": 6,
            "name": "Test",
            "surname": "Contact",
            "surname_2": null,
            "email": "test@contact.com",
            "phone": null,
            "phone_2": null,
            "position": null,
            "skype": null,
            "linkedin": null,
            "comments": null,
            "gender": null,
            "created_at": "2023-10-24 10:38:47",
            "updated_at": "2023-10-24 10:38:47",
            "deleted_at": null,
            "mailchimp_unsubscribed": null,
            "instagram": null,
            "facebook": null,
            "nif": null,
            "extra_field": null,
            "pivot": {
                "enterprise_id": 10,
                "contact_id": 6,
                "created_at": "2023-10-24 10:38:47",
                "updated_at": "2023-10-24 10:38:47",
                "deleted_at": null
            }
        }
    ]
}