Loss Reasons

The Deal Loss Reasons API provides a simple interface to manage deal loss reasons. The API allows you to create, delete and update loss reasons. You can retrieve a single reasons as well as list of all reasons.

Properties

Attribute Description
id number readonly

Unique identifier of the loss reason.

creator_id number readonly

Unique identifier of the user the loss reason was created by.

name string

Human-friendly loss reason explanation.

created_at string readonly

Date and time of creation in UTC ISO8601 format.

updated_at string readonly

Date and time of the last update in UTC ISO8601 format.


Endpoints


Retrieve all reasons

Returns all deal loss reasons available to the user according to the parameters provided.

Parameters

Attribute Description
page number optional

Page number to start from. Page numbering is 1-based and omitting page parameter will return the first page.

e.g. ?page=2
per_page number optional

Number of records to return per page. Default limit is 25 and maximum number that can be returned is 100.

e.g. ?per_page=20
sort_by string optional

A field to sort by. Default ordering is ascending. If you want to change the sort ordering to descending, append :desc to the field e.g. sort_by=name:desc.

Possible values:

  • id
  • name
  • updated_at
  • created_at
e.g. ?sort_by=created_at
ids string optional

Comma separated list of deal loss reasons unique identifiers to be returned in a request.

e.g. ?ids=1,2,3
name string optional

Name of the loss reason to search for. This parameter is used in a strict sense.

e.g. ?name=We%20were%20too%20expensive

Create a loss reason

Create a new loss reason.

Loss reason’s name must be unique.

Parameters

Attribute Description
name string required

Must be unique.

e.g. "name": "Lack of communication"

Retrieve a single reason

Returns a single loss reason available to the user by the provided id. If a loss reason with the supplied unique identifier does not exist, it returns an error.

Parameters

Attribute Description
id number required

Unique identifier of the loss reason.


Update a loss reason

Updates a loss reason information. If the specified loss reason does not exist, the request will return an error.

If you want to update loss reason you must make sure name of the reason is unique.

Parameters

Attribute Description
id number required

Unique identifier of the loss reason.

name string optional

Must be unique.

e.g. "name": "Lack of communication with contact"

Delete a reason

Delete an existing loss reason. If the reason with supplied unique identifier does not exist it returns an error. This operation cannot be undone.

Parameters

Attribute Description
id number required

Unique identifier of the loss reason.