Contact
Create Contact

Create contact

Creates a new Contact object.
POST/enterprise/create

Parameters

name - string required unique
The contact’s name.


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


email - string required
The contact’s email.


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


users - [string] optional
The contact’s responsibles (An array of existing Salesly user emails). We recomend to put responsibles for each enterprise. If not the responsibles will be required to be added later.


is_person - boolean
Indicate if this contact is Enterprise or Person. If is person, then will can be linked to enterprises. And if is enterprise, then will can be linked to persons.


identifier - string optional
The contact’s id, name, email or cif for attach person or enterprise.


More parameters

  • comments - string
  • phone - string
  • iban - string
  • web - string
  • extra_fields - array
  • location - Array of ( Location )

We are still working on all definitons of each parameter.

Example (required parameters selected)
{
  "name": "Contact Test",
  "email": "contact@gmail.com",
  "is_person": false,
  "comments": "Example comment",
  "cif": "",
  "phone": "938206362",
  "type": "client",
  "users": ["support@salesly.app"],
  "location": {
    "primary": 1,
    "direction": "Carrer Gavarresa",
    "city": "Cabrianes",
    "postal": "08620",
    "country": "Spain",
    "latitude": "41.7984089",
    "longitude": "1.9100628999999572"
  },
  "extra_fields": {
    "newsletter": ["No"]
  }
}

Response

status 200

The created enterprise object.

Response
{
    "id": 23431,
    "name": "Contact Test",
    "email": "contact@gmail.com",
    "comments": "Example comment",
    "cif": null,
    "phone": "938206362",
    "iban": null,
    "web": null,
    "type": 1,
    "created_at": "2025-03-11 12:52:56",
    "updated_at": "2025-03-11 12:52:56",
    "deleted_at": null,
    "extra_fields": "{\"newsletter\":[\"&_No_&\"]}",
    "fiscal_equal_commercial": true,
    "fiscal_name": null,
    "fiscal_address": null,
    "is_person": false,
    "location": {
        "id": 17679,
        "enterprise_id": 23431,
        "primary": 1,
        "direction": "Carrer Gavarresa",
        "city": "Cabrianes",
        "postal": "08620",
        "country": "Spain",
        "latitude": "41.7984089",
        "longitude": "1.9100628999999572",
        "created_at": "2025-03-11 12:52:56",
        "updated_at": "2025-03-11 12:52:56",
        "deleted_at": null,
        "extra_info": null
    },
    "users_basic": [
        {
            "id": 30,
            "name": "IT",
            "surname": "SLY",
            "role_id": 1,
            "role_name": "Administrador",
            "complete_name": "IT SLY",
            "pivot": {
                "enterprise_id": 23431,
                "user_id": 30,
                "created_at": "2025-03-11 12:52:56",
                "updated_at": "2025-03-11 12:52:56",
                "deleted_at": null
            }
        }
    ]
}