Sales, newest recorded first
const url = 'https://api.threadkite.app/v1/sales?limit=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”object
object
The thread it was won in, if any
The deal’s id in the system that recorded it, if known
What it sold for, in minor units of currency (pence for GBP)
How it was first recorded: outcome (closed as Won), link (a deal link marked won) or api (reported with POST /v1/sales)
Who it is credited to
First touch: the earliest lead’s source
Last touch: the source of the latest lead before the sale
Leads from the contact in the look-back
Pass as cursor to get the next page; null on the last page
Example
{ "data": [ { "dealId": "DEAL-8812", "integration": "my-dms", "valueMinor": 1250000, "currency": "GBP", "origin": "outcome" } ]}Missing or invalid API key
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
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)
object
Stable machine-readable reason
The feature that needs Pro
Where to upgrade or pay, in the web app
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)
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}Rate limit reached
object
Stable machine-readable reason
Seconds until another request will be accepted
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}