Skip to content

List deals

GET
/deals
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/deals?page=1&perPage=25&outcome=OPEN' \
--header 'Authorization: Bearer <token>'

Returns a paginated list of deals in the workspace. Members without deals.view_all see only the deals they own or reach through a company they can see. referrerClientId narrows to the deals on companies that company referred, and referrerContactId to those its rep referred.

page
integer
default: 1 > 0 <= 9007199254740991
perPage
integer
default: 25 >= 1 <= 100
outcome
string
Allowed values: OPEN WON LOST
stageId
string
ownerId
string
clientId
string
leadSourceId
string
lostReasonId

Only deals lost for this reason, an id from the lost reasons list.

string
>= 1 characters

Only deals lost for this reason, an id from the lost reasons list.

referrerClientId

Only deals on companies that this company referred.

string

Only deals on companies that this company referred.

referrerContactId

Only deals on companies that this contact, a referring company’s rep, referred.

string

Only deals on companies that this contact, a referring company’s rep, referred.

expectedCloseDateFrom
string
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
expectedCloseDateTo
string
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
projectId

Narrows the list as a company’s Deals tab does. A project id keeps the deals whose kickoff project it is plus its company’s General deals (no kickoff project, which is every open deal), and never another company’s; a project out of the caller’s reach answers 404. general keeps only the General deals of the company in clientId, which is then required: without exactly one clientId, or for a project that belongs to no company, the answer is 422.

string
>= 1 characters

Narrows the list as a company’s Deals tab does. A project id keeps the deals whose kickoff project it is plus its company’s General deals (no kickoff project, which is every open deal), and never another company’s; a project out of the caller’s reach answers 404. general keeps only the General deals of the company in clientId, which is then required: without exactly one clientId, or for a project that belongs to no company, the answer is 422.

List of deals.

Media typeapplication/json
object
data
required
Array<object>
object
amount
required
number | null
clientId
required
string
createdAt
required
string
expectedCloseDate
required
string | null
fields

The deal’s field values. Present on GET /deals/{id} only; absent on lists, on write responses and on an older server.

Array<object>

One deal field with a deal’s value for it.

object
definitionId
required

The deal field this value belongs to.

string
hasValue
required

True when the deal holds a value, or at least one checklist item, for the field.

boolean
items
required

The items of a CHECKLIST field, in order; null while it has none and on every other kind.

Any of:
Array<object>
object
done
required
boolean
id
required
string
text
required
string
kind
required

What a deal field holds: a short text, a long text, a link, a day, one option of a list, a yes or no, or a checklist.

string
Allowed values: TEXT MULTILINE URL DATE DROPDOWN CHECKBOX CHECKLIST
name
required
string
options
required

The options of a DROPDOWN field; empty for every other kind.

Array<string>
value
required

The value of every kind but CHECKLIST, null while the field is empty: the text (TEXT, MULTILINE), the address (URL), the day as YYYY-MM-DD (DATE), the chosen option (DROPDOWN), or “true” or “false” (CHECKBOX). Always null on a CHECKLIST field.

string | null
finalAmount
required
number | null
id
required
string
isGeneral

True when no project was kicked off from the deal, so it sits in its company’s General section, as the company’s Deals tab marks it. Returned by the list only; absent on an older server.

boolean
kickoffProjectId
required

The kickoff project the won deal was handed to delivery in.

string | null
kickoffProjectName

The name of the kickoff project, when the caller reaches that project; null otherwise. Returned by the list only; absent on an older server.

string | null
leadSourceId
required
string | null
lostAt
required
string | null
lostReason
required

The optional note written beside the lost reason. A deal lost before reasons existed keeps its old text here.

string | null
lostReasonId

The reason the deal was lost, an id from the lost reasons list; null on an open or won deal and on a deal lost before reasons existed. Absent on an older server.

string | null
outcome
required
string
Allowed values: OPEN WON LOST
ownerId
required
string
projectTypeId
required
string | null
stageId
required
string
title
required
string | null
updatedAt
required
string
wonAt
required
string | null
meta
required

Pagination metadata for list responses.

object
page
required
integer
>= -9007199254740991 <= 9007199254740991
perPage
required
integer
>= -9007199254740991 <= 9007199254740991
total
required
integer
>= -9007199254740991 <= 9007199254740991
totalPages
required
integer
>= -9007199254740991 <= 9007199254740991

Example

{
"data": [
{
"fields": [
{
"kind": "TEXT"
}
],
"outcome": "OPEN"
}
]
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.