Deals (Transactions)

Deals can represent a business opportunity or a transaction. Each deal is linked to one Contact (contactId) and one specific Partner (partnerId).

post
Create Deal

https://api.kiflo.com/v2/deals
Create a new deal.
Request
Response
Request
Headers
Authorization
required
string
API Access Token using Bearer scheme
Body Parameters
contactEmail
required
string
The email of the contact linked to the deal.
stage
optional
string
The stage of the deal in your deal pipeline (ex: "Closed Won", "New")
name
required
string
The name of the deal
amount
required
number
The amount of the deal
externalContactId
optional
string
Your unique identifier used to identify the contact
Response
200: OK
Returns the created deal.
{
id: 42,
contactId: 10,
partnerId: 20,
stage: "Closed Won",
creationDate: "2019-01-10T09:45:30.000Z",
name: "New Deal",
amount: 1500.99,
custom_property1: "lorem ipsum",
custom_property2: 123.45,
...
}

You can append your own custom properties to the body, they will be saved in the deal.

If you define those properties in your Kiflo account (https://app.kiflo.com/account/properties) they will be available for viewing and editing.

get
Get Deal

https://api.kiflo.com/v2/deals/:id
Get a deal from its ID.
Request
Response
Request
Path Parameters
id
required
integer
The deal ID.
Headers
Authorization
required
string
The API Access Token using Bearer scheme.
Response
200: OK
{
id: 42,
contactId: 10,
partnerId: 20,
stage: "Closed Won",
creationDate: "2019-01-10T09:45:30.000Z",
name: "New Deal",
amount: 1500.99,
custom_property1: "lorem ipsum",
custom_property2: 123.45,
...
}

get
List Deals

https://api.kiflo.com/v2/deals
List existing deals. It returns a list of deals that include all the custom deal properties defined.
Request
Response
Request
Headers
Authorization
required
string
The API Access Token using Bearer scheme.
Query Parameters
offset
optional
integer
The offset from which results must be returned. Default is 0.
limit
optional
integer
The maximum number of results to return. Default is 20.
sort_by
optional
string
The name of the property used to sort the results. Default is CreationDate.
order_by
optional
string
The sorting direction, can be Asc or Desc. Default is Desc.
Response
200: OK
{
items: [{
id: 42,
contactId: 10,
partnerId: 20,
stage: "Closed Won",
creationDate: "2019-01-10T09:45:30.000Z",
name: "New Deal",
amount: 1500.99,
custom_property1: "lorem ipsum",
custom_property2: 123.45,
...
}]
}

You can also pass a list of custom query parameters to filter deals on some properties. Let's say you have a "ownerName" property on each deal and wants to retrieve only deals for this owner, you can use (in addition with other query parameters):

https://api.kiflo.com/v2/deals/?ownerName=JohnDoe

patch
Update Deal

https://api.kiflo.com/v2/deals/:id
Update an existing deal.
Request
Response
Request
Path Parameters
id
required
integer
The ID of the deal to update
Headers
Authorization
required
string
The API Access Token using Bearer scheme
Body Parameters
amount
optional
number
The new deal amount
name
optional
string
The new name of the deal
stage
optional
string
The new stage of the deal in the deal pipeline (ex: "Closed Won", "Closed Lost", "New", etc)
Response
200: OK
{
id: 42,
contactId: 10,
partnerId: 20,
stage: "Closed Won",
creationDate: "2019-01-10T09:45:30.000Z",
name: "New Deal",
amount: 1500.99,
custom_property1: "lorem ipsum",
custom_property2: 123.45,
...
}

You can append your own custom properties to the body, they will be saved in the deal.

get
Get Deal Properties

https://api.kiflo.com/v2/deals/properties
Retrieve the list of custom deal properties as defined in your account settings.
Request
Response
Request
Headers
Authorization
required
string
The API Access Token using Bearer scheme.
Response
200: OK
Returns the list of property definitions.
[
{
id: 42,
name: "owner_name",
label: "Owner Name",
description: "The owner of the deal",
propertyType: "SingleLineText",
isRequired: false,
isVisible: true,
isCustom: true,
displayOrder: 1,
isDealAmountPart: false
},
{
id: 42,
name: "service_amount",
label: "Service Amount",
description: "The amount of custom service sold",
propertyType: "Currency",
isRequired: false,
isVisible: true,
isCustom: true,
displayOrder: 2,
isDealAmountPart: true
},
...
]