Skip to content

Sales, newest recorded first

GET
/v1/sales
curl --request GET \
--url 'https://api.threadkite.app/v1/sales?limit=25' \
--header 'Authorization: Bearer <token>'

Sales as the reports count them, however they were recorded (closed as Won, a deal link won, or reported with POST /v1/sales), for contacts you can see. Filter by contact, thread or when they were sold.

limit
integer
default: 25 >= 1 <= 100
cursor
string
<= 200 characters
contactId
string format: uuid
threadId
string format: uuid
from
string format: date-time
to
string format: date-time
Media typeapplication/json
object
data
required
Array<object>
object
id
required
string format: uuid
contactId
required
string format: uuid
threadId
required

The thread it was won in, if any

string format: uuid
nullable
dealId
required

The deal’s id in the system that recorded it, if known

string
nullable
integration
required
string
nullable
itemId
required
string format: uuid
nullable
valueMinor
required

What it sold for, in minor units of currency (pence for GBP)

number
nullable
currency
required
string
nullable
soldAt
required
string format: date-time
origin
required

How it was first recorded: outcome (closed as Won), link (a deal link marked won) or api (reported with POST /v1/sales)

string
Allowed values: outcome link api
userId
required

Who it is credited to

string
nullable
locationId
required
string format: uuid
nullable
firstSourceId
required

First touch: the earliest lead’s source

string format: uuid
nullable
lastSourceId
required

Last touch: the source of the latest lead before the sale

string format: uuid
nullable
leadsInLookback
required

Leads from the contact in the look-back

number
createdAt
required
string format: date-time
nextCursor
required

Pass as cursor to get the next page; null on the last page

string
nullable

Example

{
"data": [
{
"dealId": "DEAL-8812",
"integration": "my-dms",
"valueMinor": 1250000,
"currency": "GBP",
"origin": "outcome"
}
]
}

Missing or invalid API key

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

The organisation is on the Free plan (code upgrade_required)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
feature
required

The feature that needs Pro

string
nullable
Allowed values: extraSeats connections aiAssistant aiReplies rules fullReports api inboxes bulkMessages videoMessages
upgradePath
required

Where to upgrade or pay, in the web app

string

Example

{
"statusCode": 402,
"code": "upgrade_required",
"message": "Connections are part of Pro. Upgrade to connect texts, calls and more.",
"feature": "extraSeats",
"upgradePath": "/settings/billing"
}

The key does not have the scope (or the person the permission)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

Rate limit reached

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
retryAfter
required

Seconds until another request will be accepted

number

Example

{
"statusCode": 429,
"code": "rate_limited",
"message": "Too many requests. Each key can make 120 requests a minute; try again in 12 seconds.",
"retryAfter": 12
}