NAV Navbar
Logo
cURL

Introduction

Welcome to the Sellf API! You can use our API to access Sellf API endpoints, which can get information on contacts and deals in our database.

# To have a response in JSON
Accept: application/json
# To send a JSON request
Content-Type: application/json

We have language bindings in Shell (cURL). You can view code examples in the dark area to the right.

The API is organized around REST. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON. Please specify the Accept and Content-Type header as application/json.

The API dates are represented in UTC following the ISO 8601 industry-adopted standard. The dates must be serialized in UTC time zone, other time zones will be skipped.

Each entity has a unique integer ID.

Please report any issues to support@sellfapp.com or leave any feedback here.

Authentication

Sellf uses API keys to allow access to the API. Each Sellf team has its own API key that gives full access to the data of the team.

An API key can be obtained by (registering or) signing in to sellf.io, and then going to Settings > API. If no API key exists, you can generate one clickin on the GENERATE button.

Sellf expects for the API key to be included in all API requests to the server in a header that looks like the example in the right bar.

curl https://api.sellf.io/v2/deals -H "Api-Key: {YOUR_API_KEY}"

Make sure to replace {YOUR_API_KEY} with your API key.

Requests

As stated before, the Sellf API is accessed from the secure domain https://api.sellf.io. All data is sent and received in the JSON format.

Pagination

curl https://api.sellf.io/v2/deals?page=3 \
    -H "Api-Key: {YOUR_API_KEY}"

Most of the list operations are paginated. You can control it with the page parameter. Pages start at 1 and the first page will be returned if no page is specified. Data is limited to 20 entities per page.

The depicted example shows how to get the third page of all the team deals.

Sorting

# To get a list of deals sorted by estimated value in descending order
curl https://api.sellf.io/v2/deals?sort_by=-estimated_value \
    -H "Api-Key: {YOUR_API_KEY}"

You can control in what order, according to a criteria, how to sort listed entities using the query parameter sort_by.

The default sort order is ascending. If you want to sort the entities in descending order, append a minus sign to the field.

Ownership

In general, the identifier of a user needs to be specified when you want to add a new entity (e.g. a deal or a contact), via the user_id field. If you want to list a set of entities (e.g. all the deals owned by a specific user) you can do that via the user_id query parameter; be aware that if you do not specify any user_id, the APIs will return all the entities in your team.

Permission

Each entity in Sellf has some attributes that are read-only and attributes that can be both retrieved and overwritten, via REST calls. In each section you’ll find a table in which for each entity field is specified if it is possibile not only to read it but also sent it to Sellf through POST or PUT methods.

Required fields

One or more attributes are usually required when creating or updating an entity. These required fields are highlighted with a bold font within each attributes table that you can find at the beginning of each entity section.

Custom fields

People, Companies and Deals can be enriched with custom attributes. In the Settings > Custom Fields section of Sellf web app you can add whatever custom field is needed by your team. Once you have added your custom fields, they can be set or update via the APIs using the following notation:

custom_fields: { <key>:<value>, ... }

where <key> (without <> signs) is the key listed in the row of each custom field added to an entity in the Settings > Custom Fields section of Sellf web app (e.g. custom_fields.loyal supposing to have created a boolean custom field for the people entities with key loyal). The key are auto-generated by the system to avoid conflicts.

Custom fields can also be queried. Please refer to the following paragraph to see how the Sellf query language works.

Query language

Each entity in Sellf has some attributes that can be queried to apply filters on retrieval requests. The allowed operators related to the Sellf query language are listed below:

Operator Description Term
eq query for value equal to single
neq query for value differs from single
lt query for value less than single
gt query for value greater than single
lte query for value less than or equal to single
gte query for value greater than or equal to single
in query for value is contained into multiple
contains query for value contains all single or multiple

The rule to apply the above mentioned operators is the following:

<attribute>:<operator>=<term>

where <term> can be a single value or a list of values (e.g. user_id:neq=12 or user_id:in=12,13).

It is trivial to say that some operators applies only to specific attributes’ types (e.g. you cannot use numeric operators like comparators on string types).

Custom fields works in the same way, the only difference is that the <attribute> is replace by the key notation: custom_fields.<key> (e.g. custom_fields.loyal:eq=true).

Rate limits

To prevent API abuse or overload, Sellf APIs are rate limited. The rate limit is considered per API token. The Sellf API has different rates depending on your Sellf plan, as stated in the table below.

Plan Rate
Free n/a
Pro n/a
Starter n/a
Performance 20/sec (600/min)
Enterprise Dedicated

If your limit reaches zero, subsequent requests will receive the 429 Too Many Requests response code until the request reset time has been reached.

Errors

Each API call returns an HTTP status code that reflects the nature of the response. We follow the HTTP status code conventions.

Codes in the 2xx range indicate success, instead any request that did not succeed will return a 4xx or 5xx error. The 4xx range means there was a problem with the request. The 5xx range means that something went wrong on our end.

Specificall, the Sellf API uses the following error codes:

Error Code Meaning
400 Bad Request – Invalid request parameters
401 Unauthorized – API key is missing or wrong (it can be invalid)
402 Payment Required – Subscription payment is required
403 Forbidden – The entity requested is not accessibile due to hierarchy policies or Sellf permissions
404 Not Found – The specified entity could not be found
409 Conflict – The request could not be completed due to a conflict with the current state of the resource
422 Unprocessable Entity – The request is well-formed but cannot be processed due to validation issues with the payload
429 Too Many Requests – You’re requesting too many entities!
500 Internal Server Error – We had a problem with our server. Try again later and if the problem persists please contact us
502 Service Unavailable – We’re temporarially offline for maintanance. Please try again later

Users

The Users API gives you access to your team’s users, in read-only mode. You can retrieve a single user as well as list of all users associated with your team.

Once you sign up in Sellf, we create a team by default, and a user with team management privileges (i.e. an administrator). By logging in as the team administrator, you can invite as many additional users as you need, if you purchase at least a business plan.

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the user
email string read Email address of the user
name string read Name of the user
created_at datetime read Date of creation

Get All Users

curl https://api.sellf.io/v2/users -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "created_at": "2015-11-26T15:25:29",
      "id": 1,
      "name": "Filippo Zanella",
      "email": "filippo@sellf.be"
    },
    {
      "created_at": "2016-08-24T18:25:13",
      "id": 2,
      "name": "Giovanni Barillari",
      "email": "giovanni@sellf.be"
    }
  ]
}

This endpoint retrieves all users.

HTTP Request

GET /users

Query Parameters

Parameter Description
email A string matching the email of the user

Get a Specific User

# Retrieve a user with ID 2
curl https://api.sellf.io/v2/users/2 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "created_at": "2016-08-24T18:25:13",
  "id": 2,
  "name": "Giovanni Barillari",
  "email": "giovanni@sellf.be"
}

This endpoint retrieves a specific user according to the ID provided.

HTTP Request

GET /users/:id

URL Parameters

Parameter Description
id The unique identifier of the user to retrieve

People

The People API allows you to get, create, update and delete your people. Each person can be associated to a Company and one or more Deals.

Sellf identify people status with an integer that determines their type: lead, prospect, customer. The match between the two follows the table below:

Type Description
0 Lead
1 Prospect
2 Customer

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the person
code string write Custom identifier of the person
first_name string write First name of the person
last_name string write Last name of the person
title string write Role in the company
prospect_status integer write Status of the person
vat string write Value-added tax of the person
birthday datetime write Birthday of the person
website string write writeebsite
email string write Primary email
email_secondary string write Secondary email
phone string write Office or home number
mobile string write Mobile phone number
fax string write Fax number
skype string write Skype nickname
address string write Office or home address of the person
latitude float write Geographic coordinate of the person
longitude float write Geographic coordinate of the person
description string write A description of the person
tags array write An array of tags for a person
company_id integer write Unique identifier of the person’s company
user_id integer write Unique identifier of the user that the person is assigned to
created_at datetime read Date of creation
updated_at datetime read Date of last edit

Get All People

curl https://api.sellf.io/v2/people?sort_by=-name -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "website": null,
      "company_id": 2,
      "fax": null,
      "first_name": "Alessia",
      "user_id": 4,
      "description": "Hi! I'm Alessia, head of Customer Support at Sellf",
      "title": "Head of Customer Happiness",
      "prospect_status": 0,
      "vat": "IT1234567890",
      "birthday": "1983-02-04T14:57:54.707662",
      "mobile": null,
      "created_at": "2015-11-27T14:57:54.707662",
      "skype": "sellfapp",
      "updated_at": "2016-07-05T12:19:20",
      "longitude": 12.4274592,
      "id": 1,
      "code": null,
      "phone": null,
      "last_name": "Bellon",
      "address": "Via Sile, 41, 31056 Roncade (TV) Italia",
      "latitude": 45.5648361,
      "email_secondary": null,
      "email": "alessia@sellf.be",
      "tags": [
        "customer",
        "employee"
      ]
    }
  ]
}

This endpoint retrieves all people.

HTTP Request

GET /people

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, first_name, last_name, created_at, updated_at)
user_id Unique identifier of the user the person is owned by
company_id Unique identifier of the company with whom the person is associated
first_name A string matching the first name of the person
last_name A string matching the last name of the person
code A string matching the custom code of the person

Create a Person

# Create a new person
curl https://api.sellf.io/v2/people \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"first_name": "Filippo",
               "last_name": "Zanella",
               "title": "Founder of Sellf",
               "email": "filippo@sellfapp.com",
               "tags": ["Italy", "Treviso"],
               "user_id": 4}"

The above command returns JSON structured like this:

{
  "website": null,
  "company_id": null,
  "fax": null,
  "first_name": "Filippo",
  "user_id": 4,
  "description": null,
  "title": "Founder of Sellf",
  "prospect_status": 2,
  "vat": null,
  "birthday": null,
  "mobile": null,
  "created_at": "2016-09-08T16:36:52",
  "skype": null,
  "updated_at": "2016-09-08T16:36:52",
  "longitude": null,
  "id": 3,
  "code": null
  "phone": null,
  "last_name": "Zanella",
  "address": null,
  "latitude": null,
  "email_secondary": null,
  "email": "filippo@sellf.be",
  "tags": [
    "Italy",
    "Treviso"
  ]
}

This endpoint allows to create a person.

HTTP Request

POST /people

Get a Specific Person

# Retrieve a person with ID 3
curl https://api.sellf.io/v2/people/3 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "website": null,
  "company_id": null,
  "fax": null,
  "first_name": "Filippo",
  "user_id": 4,
  "description": null,
  "title": "Founder of Sellf",
  "prospect_status": 2,
  "vat": null,
  "birthday": null,
  "mobile": null,
  "created_at": "2016-09-08T16:36:52",
  "skype": null,
  "updated_at": "2016-09-08T16:36:52",
  "longitude": null,
  "id": 3,
  "code": null,
  "phone": null,
  "last_name": "Zanella",
  "address": null,
  "latitude": null,
  "email_secondary": null,
  "email": "filippo@sellf.be",
  "tags": [
    "Italy",
    "Treviso"
  ]
}

This endpoint retrieves a specific person.

HTTP Request

GET /people/:id

URL Parameters

Parameter Description
id The unique identifier of the person to retrieve

Update a Specific Person

# Update the person with ID 3
curl https://api.sellf.io/v2/people/3 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X PUT -d "{"title": "Ruby on Rails Developer",
              "email": "support@sellfapp.com"}"

The above command returns JSON structured like this:

{
  "website": null,
  "company_id": null,
  "fax": null,
  "first_name": "Filippo",
  "user_id": 4,
  "description": null,
  "title": "Ruby on Rails Developer",
  "prospect_status": 2,
  "vat": null,
  "birthday": null,
  "mobile": null,
  "created_at": "2016-09-08T16:36:52",
  "skype": null,
  "updated_at": "2016-09-08T16:42:30",
  "longitude": null,
  "id": 3,
  "code": null,
  "phone": null,
  "last_name": "Zanella",
  "address": null,
  "latitude": null,
  "email_secondary": null,
  "email": "support@sellfapp.com",
  "tags": [
    "Italy",
    "Treviso"
  ]
}

This endpoint allows to update a specific person.

HTTP Request

PUT /people/:id

URL Parameters

Parameter Description
id The unique identifier of the person to retrieve

Delete a Specific Person

# Delete the person with ID 3
curl https://api.sellf.io/v2/people/3 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint deletes a specific person. Deleting a person implies that even all the associated entities are deleted, except for the associated company.

HTTP Request

DELETE /people/:id

URL Parameters

Parameter Description
id The unique identifier of the person to be deleted

Companies

The Companies API allows you to get, create, update and delete your companies. Each company can be associated to a Company and one or more Deals.

Sellf identify people status with an integer that determines their type: lead, prospect, customer. The match between the two follows the table below:

Type Description
0 Lead
1 Prospect
2 Customer

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the company
code string write Custom identifier of the company
name string write Name of the company
industry string write Industry sector of the company
prospect_status integer write Status of the company
vat string write Value-added tax of the company
website string write writeebsite
email string write Primary email
email_secondary string write Secondary email
phone string write Office or home number
fax string write Fax number
address string write Office or home address of the company
latitude float write Geographic coordinate of the company
longitude float write Geographic coordinate of the company
description string write A description of the company
tags array write An array of tags for a company
user_id integer write Unique identifier of the user that the company is assigned to
created_at datetime read Date of creation
updated_at datetime read Date of last edit

Get All Companies

curl https://api.sellf.io/v2/companies?sort_by=-name -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "website": "http://www.sellfapp.com",
      "fax": null,
      "user_id": 2869,
      "description": null,
      "tags": [],
      "industry": "Mobile CRM",
      "prospect_status": 0,
      "vat": "IT1234567890",
      "created_at": "2015-11-26T15:25:30.940731",
      "updated_at": "2016-07-05T12:17:47",
      "longitude": 12.4274592,
      "id": 20991,
      "code": null,
      "phone": "+39 0422 789611",
      "address": "Via Sile, 41, 31056 Roncade TV, Italia",
      "latitude": 45.5648361,
      "email_secondary": null,
      "email": "hello@sellfapp.com",
      "name": "Sellf s.r.l."
    }
  ]
}

This endpoint retrieves all companies.

HTTP Request

GET /companies

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, created_at, updated_at)
user_id Unique identifier of the user the company is owned by
name A string matching the name of the company
code A string matching the custom code of the company

Create a Company

# Create a new company
curl https://api.sellf.io/v2/companies \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"name": "Acme Inc.",
               "industry": "Semiconductor",
               "email": "hey@acme.com",
               "address": "Via Thomas Alva Edison, Padova, PD",
               "user_id": 4}"

The above command returns JSON structured like this:

{
  "website": null,
  "fax": null,
  "user_id": 4,
  "description": null,
  "tags": [],
  "industry": "Semiconductor",
  "prospect_status": 2,
  "vat": null,
  "created_at": "2016-09-08T16:54:37",
  "updated_at": "2016-09-08T16:54:37",
  "longitude": null,
  "id": 3,
  "code": null,
  "phone": null,
  "address": "Via Thomas Alva Edison, Padova, PD",
  "latitude": null,
  "email_secondary": null,
  "email": "hey@acme.com",
  "name": "Acme Inc."
}

This endpoint allows to create a company.

HTTP Request

POST /companies

Get a Specific Company

# Retrieve a company with ID 3
curl https://api.sellf.io/v2/companies/3 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "website": null,
  "fax": null,
  "user_id": 4,
  "description": null,
  "tags": [],
  "industry": "Semiconductor",
  "prospect_status": 2,
  "vat": null,
  "created_at": "2016-09-08T16:54:37",
  "updated_at": "2016-09-08T16:54:37",
  "longitude": null,
  "id": 3,
  "code": null,
  "phone": null,
  "address": "Via Thomas Alva Edison, Padova, PD",
  "latitude": null,
  "email_secondary": null,
  "email": "hey@acme.com",
  "name": "Acme Inc."
}

This endpoint retrieves a specific company.

HTTP Request

GET /companies/:id

URL Parameters

Parameter Description
id The unique identifier of the company to retrieve

Update a Specific Company

# Update the company with ID 3
curl https://api.sellf.io/v2/companies/3 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X PUT -d "{"name": "Acme Holding",
              "industry": "Semiconductor & Devices",
              "email": "sales@acme.com"}"

The above command returns JSON structured like this:

{
  "website": null,
  "fax": null,
  "user_id": 4,
  "description": null,
  "tags": [],
  "industry": "Semiconductor & Devices",
  "prospect_status": 2,
  "vat": null,
  "created_at": "2016-09-08T16:54:37",
  "updated_at": "2016-09-08T17:02:18",
  "longitude": null,
  "id": 3,
  "code": null,
  "phone": null,
  "address": "Via Thomas Alva Edison, Padova, PD",
  "latitude": null,
  "email_secondary": null,
  "email": "sales@acme.com",
  "name": "Acme Holding"
}

This endpoint allows to update a specific company.

HTTP Request

PUT /companies/:id

URL Parameters

Parameter Description
id The unique identifier of the company to retrieve

Delete a Specific Company

# Delete the company with ID 3
curl https://api.sellf.io/v2/companies/3 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint deletes a specific company. Deleting a company implies that even all the associated entities are deleted, except for the associated company.

HTTP Request

DELETE /companies/:id

URL Parameters

Parameter Description
id The unique identifier of the company to be deleted

Deals

The Deals API allows you to get, create, update and delete your deals.

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the deal
code string write Custom identifier of the deal
name string write Brief description of the deal
value float write (Estimated) value of the deal, with decimal part if needed
is_hot boolean write To point if the deal is important or not
win_probability integer write Probability of closing the deal successfully
estimated_close_at datetime write Estimated close date of the deal
started_at datetime read Date in which the deal has been opened
stage_changed_at datetime read Last date in which the deal has been moved into a stage
tags array write An array of tags for a deal
person_id integer write Unique identifier of a primary person
company_id integer write Unique identifier of a primary company
stage_id integer write Unique identifier of the deal’s current stage in the pipeline
source_id integer write Unique identifier of the deal source
loss_reason_id integer write Unique identifier of the deal loss reason
user_id integer write Unique identifier of the user that the person is assigned to
created_at datetime read Date of creation
updated_at datetime read Date of last edit

Get All Deals

curl https://api.sellf.io/v2/deals -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": true,
    "object": "list"
  },
  "data": [
    {
      "stage_id": 5,
      "stage_changed_at": "2016-01-05T16:02:41.058040",
      "user_id": 1,
      "name": "Rent in London",
      "tags": [
        "duplex",
        "luxury"
      ],
      "created_at": "2015-11-27T14:57:55.461828",
      "updated_at": "2016-07-05T12:21:24",
      "value": 5000,
      "company_id": 4,
      "person_id": 9,
      "win_probability": 100,
      "estimated_close_at": "2015-11-30T11:59:59",
      "source_id": null,
      "loss_reason_id": null,
      "is_hot": true,
      "started_at": "2015-11-27T14:57:55",
      "id": 2,
      "code": null
    },
    {
      "stage_id": 10,
      "stage_changed_at": "2015-11-28T07:34:13",
      "user_id": 1,
      "name": "Venice villa",
      "tags": [],
      "created_at": "2015-11-28T07:34:13.330420",
      "updated_at": "2016-07-05T12:21:24",
      "value": 370000,
      "company_id": 7,
      "person_id": null,
      "win_probability": 100,
      "estimated_close_at": null,
      "source_id": null,
      "loss_reason_id": null,
      "is_hot": false,
      "started_at": "2016-03-30T13:08:49",
      "id": 3,
      "code": null
    }
  ]
}

This endpoint retrieves all deals.

HTTP Request

GET /deals

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, value, estimated_close_at, stage_changed_at, created_at, updated_at)
user_id Unique identifier of the user the deal is owned by
stage_id Unique identifier of the stage in which the deal is placed
person_id Unique identifier of the main deal with whom the deal is associated
company_id Unique identifier of the main company with whom the deal is associated
source_id Unique identifier of the deal source
loss_reason_id Unique identifier of the deal loss reason
name A string matching the description of the deal
code A string matching the custom code of the deal

Create a Deal

# Create a new deal
curl https://api.sellf.io/v2/deals \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"name": "Apartment in Berlin",
               "value": 265789,
               "is_hot": true,
               "estimated_close_at": "2016-12-05T12:00:23",
               "tags": ["Germany"],
               "stage_id": 10,
               "user_id": 1}"

The above command returns JSON structured like this:

{
  "stage_id": 10,
  "stage_changed_at": "2016-09-08T18:14:06",
  "user_id": 1,
  "name": "Apartment in Berlin",
  "tags": [
    "Germany"
  ],
  "created_at": "2016-09-08T18:14:06",
  "updated_at": "2016-09-08T18:14:06",
  "value": 265789,
  "company_id": null,
  "person_id": null,
  "win_probability": 100,
  "estimated_close_at": "2016-12-05T12:00:23",
  "source_id": null,
  "loss_reason_id": null,
  "is_hot": true,
  "started_at": "2016-09-08T18:14:06",
  "id": 12,
  "code": null
}

This endpoint allows to create a deal.

HTTP Request

POST /deals

Get a Specific Deal

# Retrieve a deal with ID 12
curl https://api.sellf.io/v2/deals/12 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "stage_id": 10,
  "stage_changed_at": "2016-09-08T18:14:06",
  "user_id": 1,
  "name": "Apartment in Berlin",
  "tags": [
    "Germany"
  ],
  "created_at": "2016-09-08T18:14:06",
  "updated_at": "2016-09-08T18:14:06",
  "value": 265789,
  "company_id": null,
  "person_id": null,
  "win_probability": 100,
  "estimated_close_at": "2016-12-05T12:00:23",
  "source_id": null,
  "loss_reason_id": null,
  "is_hot": true,
  "started_at": "2016-09-08T18:14:06",
  "id": 12,
  "code": null
}

This endpoint retrieves a specific deal.

HTTP Request

GET /deals/:id

URL Parameters

Parameter Description
id The unique identifier of the deal to retrieve

Update a Specific Deal

# Update the deal with ID 12
curl https://api.sellf.io/v2/deals/12 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X PUT -d "{"value": 470000,
              "win_probability": 95,
              "estimated_close_at": "2016-12-23T01:45:00"}"

The above command returns JSON structured like this:

{
  "stage_id": 10,
  "stage_changed_at": "2016-09-08T18:14:06",
  "user_id": 1,
  "name": "Apartment in Berlin",
  "tags": [
    "Germany"
  ],
  "created_at": "2016-09-08T18:14:06",
  "updated_at": "2016-09-08T18:14:06",
  "value": 470000,
  "company_id": null,
  "person_id": null,
  "win_probability": 95,
  "estimated_close_at": "2016-12-23T01:45:00",
  "source_id": null,
  "loss_reason_id": null,
  "is_hot": true,
  "started_at": "2016-09-08T18:14:06",
  "id": 12,
  "code": null
}

This endpoint allows to update a specific deal.

HTTP Request

PUT /deals/:id

URL Parameters

Parameter Description
id The unique identifier of the deal to retrieve

Delete a Specific Deal

# Delete the deal with ID 3
curl https://api.sellf.io/v2/deals/3 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint deletes a specific deal. Deleting a deal implies that even all the associated entities are deleted, except for people and companies.

HTTP Request

DELETE /deals/:id

URL Parameters

Parameter Description
id The unique identifier of the deal to be deleted

Pipelines

The Pipelines API gives you access to your team’s pipelines, in read-only mode. You can retrieve a single pipeline as well as list of all pipelines associated with your team.

Sales pipelines consist of a sequence of Stages in which the deals can be placed. Once you sign up in Sellf, we create a primary pipeline by default, associated with four standard stages: In progress, Won, Lost, Abandoned. You can add as many pipelines as you want. Pipelines can be characterized by monetary or quantitative values based on you needs.

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the pipeline
name string read Name of the pipeline
type string read Pipeline type
(i.e. money, quantity)

Get All Pipelines

curl https://api.sellf.io/v2/pipelines -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "type": "cash",
      "id": 1,
      "name": "Sales Pipeline"
    },
    {
      "type": "quantity",
      "id": 2,
      "name": "Sold Items"
    }
  ]
}

This endpoint retrieves all pipelines.

HTTP Request

GET /pipelines

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, created_at, updated_at)
type Type of pipeline in terms of being monetary or quantitative
(i.e. cash, quantity)

Get a Specific Pipeline

# Retrieve a pipeline with ID 2
curl https://api.sellf.io/v2/pipelines/2 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "type": "quantity",
  "id": 2,
  "name": "Sold Items"
}

This endpoint retrieves a specific pipeline according to the ID provided.

HTTP Request

GET /pipelines/:id

URL Parameters

Parameter Description
id The unique identifier of the pipeline to retrieve

Stages

The Stages API gives you access to your team’s stages, in read-only mode. You can retrieve a single stage as well as list of all stages associated with your team.

Sales stages are related to a specific pipeline and you can associate any number of Deals. Once you sign up in Sellf, we create a primary stage by default, associated with four standard stages, editable based on your needs.

Sellf identify stages with an integer that determines their type: active, won, lost, abandoned. The match between the two follows the table below:

Type Description
0 Active
1 Won
2 Lost
3 Abandoned

You can add as many active stages as you want to each pipeline. The active stages concern deals that are still on going, i.e. neither won or lost/abandoned. Stages are sequentially positioned, following the flow of your sales process. Moreover, each stage is linked to a win probability, i.e. the likelihood (from 0 to 100) that a deal in that stage will be won.

In the Settings > Deal > Pipelines section of Sellf web app you can turn on the possibility of adding more pipelines and working with the probability of closing deals successfully. In this case, the default stages are automatically modified as stated in the table below:

Name Position Win Probability
Lead 1 5
Established contact 2 10
Identified needs 3 30
Proposal 4 50
Negotiation 5 70

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the stage
name string read Name of the stage
win_probability integer read The likelihood that a deal will be won, as percentage
position integer read The position of the stage in the pipeline
pipeline_id integer read Unique identifier of the associated pipeline
type integer read Stage type (i.e. active, won, lost, abandoned)

Get All Stages

curl https://api.sellf.io/v2/stages -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": true,
    "object": "list"
  },
  "data": [
    {
      "name": "Qualified",
      "pipeline_id": 1,
      "win_probability": 20,
      "position": 1,
      "type": 0,
      "id": 3
    },
    {
      "name": "Negotiation",
      "pipeline_id": 1,
      "win_probability": 80,
      "position": 6,
      "type": 0,
      "id": 9
    }
  ]
}

This endpoint retrieves all stages of all pipelines. If you want to get the stages of a specific pipeline, you need to specify the pipeline_id as query param.

HTTP Request

GET /stages

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, position, win_probability, created_at, updated_at)
pipeline_id Unique identifier of the pipeline to which stages belongs
type Unique identifier of stage type (i.e. 0, 1, 2, 3)

Get a Specific Stage

# Retrieve a stage with ID 9
curl https://api.sellf.io/v2/stages/9 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "name": "Negotiation",
  "pipeline_id": 1,
  "win_probability": 80,
  "position": 6,
  "type": 0,
  "id": 9
}

This endpoint retrieves a specific stage according to the ID provided.

HTTP Request

GET /stages/:id

URL Parameters

Parameter Description
id The unique identifier of the stage to retrieve

Sources

The Sources API gives you access to your team’s sources, in read-only mode. You can retrieve a single source as well as list of all sources associated with your team.

Sources can be associated with any number of Deals. Once you sign up in Sellf, we suggests a bunch of common sources, it’s up to up enable this feature or not. In the Settings > Deal > Sources section of Sellf web app you can turn on the possibility of adding more sources (e.g. Newsletter, Word of mouth, Referral, Website, …). You can add as many deals’ sources as you want.

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the source
name string read Name of the source
created_at datetime read Date of creation
updated_at datetime read Date of last edit

Get All Sources

curl https://api.sellf.io/v2/sources -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "id": 1,
      "name": "Referral"
    },
    {
      "id": 2,
      "name": "Word of mouth"
    }
  ]
}

This endpoint retrieves all deals’ sources.

HTTP Request

GET /sources

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, created_at, updated_at)

Get a Specific Source

# Retrieve a deal source with ID 2
curl https://api.sellf.io/v2/sources/2 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "id": 2,
  "name": "Word of mouth"
}

This endpoint retrieves a specific source according to the ID provided.

HTTP Request

GET /sources/:id

URL Parameters

Parameter Description
id The unique identifier of the source to retrieve

Loss Reasons

The Loss Reasons API gives you access to your team’s loss reasons, in read-only mode. You can retrieve a single loss reason as well as list of all loss reasons associated with your team.

Loss Reasons can be associated with any number of Deals. Once you sign up in Sellf, we suggests a bunch of common loss reasons, it’s up to up enable this feature or not. In the Settings > Deal > Loss Reasons section of Sellf web app you can turn on the possibility of adding more loss reasons (e.g. Price, Competition, Lack of budget, Not interested, …). You can add as many deals’ loss reasons as you want.

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the loss reason
name string read Name of the loss reason

Get All Loss Reasons

curl https://api.sellf.io/v2/loss_reasons -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "id": 1,
      "name": "Competition"
    },
    {
      "id": 2,
      "name": "Price"
    }
  ]
}

This endpoint retrieves all deals’ loss reasons.

HTTP Request

GET /loss_reasons

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, created_at, updated_at)

Get a Specific Loss Reason

# Retrieve a deal loss reason with ID 2
curl https://api.sellf.io/v2/loss_reasons/2 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "id": 2,
  "name": "Price"
}

This endpoint retrieves a specific loss reason according to the ID provided.

HTTP Request

GET /loss_reasons/:id

URL Parameters

Parameter Description
id The unique identifier of the source to retrieve

Products

The Products API gives you access to your team’s products, in read-only mode. You can retrieve a single product as well as list of all products associated with your team.

Products can be associated with any number of Deals. In the Settings > Deal > Products section of Sellf web app you can turn on the possibility of using products, giving them a name and a unit price.

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the product
name string write Name of the product
unit_price float write Price of the product per unit
unit_cost float write Cost of the product per unit
max_discount integer write Max discount (percentage) that can be applied to the product
max_markup integer write Max markup (percentage) that can be applied to the product
code string write Custom identifier of the product
goal_rate integer write Incentive (percentage) for the user computed on the price of the product
rep_rate integer write Representative commission (percentage) computed on the price of the product
is_enabled boolean write Availability of the product

Get All Products

curl https://api.sellf.io/v2/products -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "code": "LI456",
      "name": "Life insurance"
      "unit_price": 10,
      "max_discount": 100,
      "max_markup": null,
      "unit_cost": 0,
      "goal_rate": 110,
      "rep_rate": 80,
      "id": 1,
    },
    {
      "code": "HI789",
      "name": "Home insurance",
      "unit_price": 12,
      "max_discount": 100,
      "max_markup": null,
      "unit_cost": 234,
      "goal_rate": null,
      "rep_rate": null,
      "id": 2
    }
  ]
}

This endpoint retrieves all products of the team.

HTTP Request

GET /products

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, created_at, updated_at)

Create a Product

# Create a new product
curl https://api.sellf.io/v2/products \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"code": "LI455",
               "name": "Life insurance"
               "unit_price": 100,
               "max_discount": 15,
               "max_markup": null,
               "unit_cost": 0,
               "goal_rate": 90,
               "rep_rate": 20,
               "is_enabled": true}"

The above command returns JSON structured like this:

{
  "code": "LI455",
  "name": "Life insurance"
  "unit_price": 100,
  "max_discount": 15,
  "max_markup": null,
  "unit_cost": 0,
  "goal_rate": 90,
  "rep_rate": 20,
  "is_enabled": true,
  "id": 7
}

This endpoint allows to create an product.

HTTP Request

POST /products

Get a Specific Product

# Retrieve a product with ID 2
curl https://api.sellf.io/v2/products/2 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "code": "HI789",
  "name": "Home insurance",
  "unit_price": 12,
  "max_discount": 100,
  "max_markup": null,
  "unit_cost": 234,
  "goal_rate": null,
  "rep_rate": null,
  "is_enabled": true,
  "id": 2
}

This endpoint retrieves a specific product according to the ID provided.

HTTP Request

GET /products/:id

URL Parameters

Parameter Description
id The unique identifier of the product to retrieve

Update a Specific Product

# Update a product with ID 7
curl https://api.sellf.io/v2/products/7 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X PUT -d "{"is_enabled": false, "code": "LI451"}"

The above command returns JSON structured like this:

{
  "code": "LI451",
  "name": "Life insurance"
  "unit_price": 100,
  "max_discount": 15,
  "max_markup": null,
  "unit_cost": 0,
  "goal_rate": 90,
  "rep_rate": 20,
  "is_enabled": false,
  "id": 7
}

This endpoint allows to update a specific product.

HTTP Request

PUT /products/:id

URL Parameters

Parameter Description
id The unique identifier of the product to retrieve

Appointments

The Appointments API allows you to get, create, update and delete your appointments. Each appointment can be associated to one or more Companies, one or more People, one or more Users and one Deal.

Sellf identify the type of the appointment with a string that determines a corresponding action: call, meeting, lunch, dinner, presentation. The match between the two follows the table below:

Action Description
call Phone call
meeting Meeting
lunch Lunch
dinner Dinner
presentation Presentation

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the appointment
name string write Name of the appointment
action string write Type of appointment
start_at datetime write Moment in which the appointment starts
end_at datetime write Moment in which the appointment ends
remind_at datetime write At what time the user needs to be notified of the upcoming appointment
is_all_day boolean write It determines whether the appointment lasts all day or less
address string write Place in which the appointment occurs
description string write Appointment’s notes
deal_id integer write Unique identifier of the deal concerning the appointment
user_id integer write Unique identifier of the user that the appointment is assigned to
created_at datetime read Date of creation
updated_at datetime read Date of last edit

Get All Appointments

curl https://api.sellf.io/v2/appointments?sort_by=-name -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "start_at": "2016-09-15T01:13:15.608045",
      "name": "Contract negotiation",
      "deal_id": null,
      "created_at": "2016-09-23T13:43:30.826603",
      "address": "via Sile 41, 31056, Roncade (TV)",
      "updated_at": "2016-09-23T13:43:30.826603",
      "end_at": "2016-09-23T14:10:45.787592",
      "remind_at": null,
      "is_all_day": true,
      "action": "meeting",
      "user_id": 4,
      "id": 3,
      "description": null
    }
  ]
}

This endpoint retrieves all appointments.

HTTP Request

GET /appointments

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, name, start_at, end_at, created_at, updated_at)
user_id Unique identifier of the user the appointment is owned by
deal_id Unique identifier of the deal with whom the appointment is associated
name A string matching the name of the appointment

Create an Appointment

# Create a new appointment
curl https://api.sellf.io/v2/appointments \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"name": "Debriefing",
              "start_at": "2016-09-08T16:25:00",
              "end_at": "2016-09-08T16:50:00",
              "deal_id": 9,
              "user_id": 4}"

The above command returns JSON structured like this:

{
  "start_at": "2016-09-08T16:25:00.000000",
  "name": "Debriefing",
  "deal_id": 9,
  "created_at": "2017-02-21T10:32:49.000000",
  "address": null,
  "updated_at": "2017-02-21T10:32:49.000000",
  "end_at": "2016-09-08T16:50:00.000000",
  "remind_at": null,
  "is_all_day": false,
  "action": null,
  "user_id": 4,
  "id": 7,
  "description": null
}

This endpoint allows to create an appointment.

HTTP Request

POST /appointments

Get a Specific Appointment

# Retrieve a appointment with ID 7
curl https://api.sellf.io/v2/appointments/7 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "start_at": "2016-09-08T16:25:00.000000",
  "name": "Debriefing",
  "deal_id": 9,
  "created_at": "2017-02-21T10:32:49.000000",
  "address": null,
  "updated_at": "2017-02-21T10:32:49.000000",
  "end_at": "2016-09-08T16:50:00.000000",
  "remind_at": null,
  "is_all_day": false,
  "action": null,
  "user_id": 4,
  "id": 7,
  "description": null
}

This endpoint retrieves a specific appointment.

HTTP Request

GET /appointments/:id

URL Parameters

Parameter Description
id The unique identifier of the appointment to retrieve

Update a Specific Appointment

# Update a appointment with ID 7
curl https://api.sellf.io/v2/appointments/7 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X PUT -d "{"name": "Debriefing with teammates",
              "start_at": "2016-10-08T16:25:00"}",
              "end_at": "2016-10-08T16:50:00"}"

The above command returns JSON structured like this:

{
  "start_at": "2016-10-08T16:25:00.000000",
  "name": "Debriefing with teammates",
  "deal_id": 9,
  "created_at": "2017-02-21T10:32:49.000000",
  "address": null,
  "updated_at": "2017-02-21T10:40:05.000000",
  "end_at": "2016-10-08T16:50:00.000000",
  "remind_at": null,
  "is_all_day": false,
  "action": null,
  "user_id": 4,
  "id": 7,
  "description": null
}

This endpoint allows to update a specific appointment.

HTTP Request

PUT /appointments/:id

URL Parameters

Parameter Description
id The unique identifier of the appointment to retrieve

Delete a Specific Appointment

# Delete the appointment with ID 7
curl https://api.sellf.io/v2/appointments/7 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint deletes a specific appointment.

HTTP Request

DELETE /appointments/:id

URL Parameters

Parameter Description
id The unique identifier of the appointment to be deleted

Appointment People

The Appointment People API allows you to get, add or remove people associated to your appointments.

Attributes

Parameter Type Permission Description
person_id integer write Unique identifier of the person related to the appointment
updated_at datetime read Date of last edit

Get All Appointment’s People

curl https://api.sellf.io/v2/appointments/4 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "person_id": 12,
      "updated_at": "2017-02-21T10:51:39.467513"
    }
  ]
}

This endpoint retrieves all appointment’s people.

HTTP Request

GET /appointments/:appointment_id/people

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment

Add a Person to an Appointment

# Add a person to an appointment
curl https://api.sellf.io/v2/appointments/4/people \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"person_id": 15}"

The above command returns JSON structured like this:

{
  "person_id": 15,
  "updated_at": "2017-02-21T10:51:39.467513"
}

This endpoint allows to associate a person to an appointment.

HTTP Request

POST /appointments/:appointment_id/people

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment

Remove a Person from an Appointment

# Remove the person with ID 15 from the appointment with ID 4
curl https://api.sellf.io/v2/appointments/4/people/15 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint removes the association of a person with an appointment.

HTTP Request

DELETE /appointments/:appointment_id/people/:person_id

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment
person_id The unique identifier of the chosen person

Appointment Companies

The Appointment Companies API allows you to get, add or remove companies associated to your appointments.

Attributes

Parameter Type Permission Description
company_id integer write Unique identifier of the company related to the appointment
updated_at datetime read Date of last edit

Get All Appointment’s Companies

curl https://api.sellf.io/v2/appointments/4 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "company_id": 12,
      "updated_at": "2017-02-21T10:51:39.467513"
    }
  ]
}

This endpoint retrieves all appointment’s companies.

HTTP Request

GET /appointments/:appointment_id/companies

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment

Add a Company to an Appointment

# Add a company to an appointment
curl https://api.sellf.io/v2/appointments/4/companies \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"company_id": 15}"

The above command returns JSON structured like this:

{
  "company_id": 15,
  "updated_at": "2017-02-21T10:51:39.467513"
}

This endpoint allows to associate a company to an appointment.

HTTP Request

POST /appointments/:appointment_id/companies

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment

Remove a Company from an Appointment

# Remove the company with ID 15 from the appointment with ID 4
curl https://api.sellf.io/v2/appointments/4/companies/15 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint removes the association of a company with an appointment.

HTTP Request

DELETE /appointments/:appointment_id/companies/:company_id

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment
company_id The unique identifier of the chosen company

Appointment Users

The Appointment Users API allows you to get, add or remove users associated to your appointments. A user is a guest, that is, the appointments in which it is invited are shown in its calendar.

Attributes

Parameter Type Permission Description
user_id integer write Unique identifier of the user related to the appointment
updated_at datetime read Date of last edit

Get All Appointment’s Users

curl https://api.sellf.io/v2/appointments/4 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "user_id": 12,
      "updated_at": "2017-02-21T10:51:39.467513"
    }
  ]
}

This endpoint retrieves all appointment’s users.

HTTP Request

GET /appointments/:appointment_id/users

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment

Add a User to an Appointment

# Add a user to an appointment
curl https://api.sellf.io/v2/appointments/4/users \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"user_id": 15}"

The above command returns JSON structured like this:

{
  "user_id": 15,
  "updated_at": "2017-02-21T10:51:39.467513"
}

This endpoint allows to associate a user to an appointment.

HTTP Request

POST /appointments/:appointment_id/users

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment

Remove a User from an Appointment

# Remove the user with ID 15 from the appointment with ID 4
curl https://api.sellf.io/v2/appointments/4/users/15 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint removes the association of a user with an appointment.

HTTP Request

DELETE /appointments/:appointment_id/users/:user_id

URL Parameters

Parameter Description
appointment_id The unique identifier of the chosen appointment
user_id The unique identifier of the chosen user

Notes

The Notes API allows you to get, create, update and delete your notes. Each note can be associated to one Company, one Person, one User and one Deal.

Attributes

Parameter Type Permission Description
id integer read Unique identifier of the note
title string write Title of the note
body string write Content of the note
person_id integer write Unique identifier of the person related to the note
company_id integer write Unique identifier of the company related to the note
deal_id integer write Unique identifier of the deal concerning the note
user_id integer write Unique identifier of the user that the note is assigned to
created_at datetime read Date of creation
updated_at datetime read Date of last edit

Get All Notes

curl https://api.sellf.io/v2/notes?sort_by=-title -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "meta": {
    "has_more": false,
    "object": "list"
  },
  "data": [
    {
      "title": "Contract negotiation",
      "body": "",
      "person_id": null,
      "company_id": 32,
      "deal_id": null,
      "created_at": "2016-09-23T13:43:30.826603",
      "updated_at": "2016-09-23T13:43:30.826603",
      "user_id": 4,
      "id": 3,
    }
  ]
}

This endpoint retrieves all notes.

HTTP Request

GET /notes

Query Parameters

Parameter Description
sort_by Column to sort by
(i.e. id, title, created_at, updated_at)
user_id Unique identifier of the user the note is owned by
person_id Unique identifier of the person with whom the note is associated
company_id Unique identifier of the company with whom the note is associated
deal_id Unique identifier of the deal with whom the note is associated
title A string containing or matching the title of the note

Create a Note

# Create a new note
curl https://api.sellf.io/v2/notes \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X POST -d "{"title": "Debriefing",
              "body": "Lorem ipsum dolor sit amet, consectetur adipisci elit...",
              "person_id": 15,
              "deal_id": 9,
              "user_id": 4}"

The above command returns JSON structured like this:

{
  "title": "Debriefing",
  "body": "Lorem ipsum dolor sit amet, consectetur adipisci elit...",
  "person_id": 15,
  "company_id": null,
  "deal_id": 9,
  "created_at": "2017-02-21T10:32:49.000000",
  "updated_at": "2017-02-21T10:32:49.000000",
  "user_id": 4,
  "id": 7
}

This endpoint allows to create an note.

HTTP Request

POST /notes

Get a Specific Note

# Retrieve a note with ID 7
curl https://api.sellf.io/v2/notes/7 -H "Api-Key: {YOUR_API_KEY}"

The above command returns JSON structured like this:

{
  "title": "Debriefing",
  "body": "Lorem ipsum dolor sit amet, consectetur adipisci elit...",
  "person_id": 15,
  "company_id": null,
  "deal_id": 9,
  "created_at": "2017-02-21T10:32:49.000000",
  "updated_at": "2017-02-21T10:32:49.000000",
  "user_id": 4,
  "id": 7
}

This endpoint retrieves a specific note.

HTTP Request

GET /notes/:id

URL Parameters

Parameter Description
id The unique identifier of the note to retrieve

Update a Specific Note

# Update a note with ID 7
curl https://api.sellf.io/v2/notes/7 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -X PUT -d "{"name": "Debriefing with teammates"}"

The above command returns JSON structured like this:

{
  "title": "Debriefing with teammates",
  "body": "Lorem ipsum dolor sit amet, consectetur adipisci elit...",
  "person_id": 15,
  "company_id": null,
  "deal_id": 9,
  "created_at": "2017-02-21T10:32:49.000000",
  "updated_at": "2017-02-21T10:32:49.000000",
  "user_id": 4,
  "id": 7
}

This endpoint allows to update a specific note.

HTTP Request

PUT /notes/:id

URL Parameters

Parameter Description
id The unique identifier of the note to retrieve

Delete a Specific Note

# Delete the note with ID 7
curl https://api.sellf.io/v2/notes/7 \
  -H "Api-Key: {YOUR_API_KEY}" \
  -X DELETE

The above command returns 200 with no content.

This endpoint deletes a specific note.

HTTP Request

DELETE /notes/:id

URL Parameters

Parameter Description
id The unique identifier of the note to be deleted