Get the sales attribution report
curl --request GET \ --url 'https://example.com/api/v1/reports/attribution?from=example&to=example' \ --header 'Authorization: Bearer <token>'Where the sales came from: deals and won amounts by lead source and by the company that referred them, with an unattributed bucket for the ones carrying neither. Each referrer row also splits its deals by the rep who sent them (reps), left empty without commissions access. Open deals count wherever they stand today; won and lost ones count inside the period. Requires the deals.view permission and both the Sales and Reports modules. Without deals.view_all the report covers only the deals the caller owns or reaches through a company they can see.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Start of the period, YYYY-MM-DD, in the workspace timezone.
Start of the period, YYYY-MM-DD, in the workspace timezone.
End of the period, YYYY-MM-DD, inclusive.
End of the period, YYYY-MM-DD, inclusive.
Only deals owned by this member.
Only deals owned by this member.
Only deals attributed to this lead source.
Only deals attributed to this lead source.
Only deals lost for this reason, an id from the lost reasons list. Open and won deals carry no reason, so the report then covers just those lost deals.
Only deals lost for this reason, an id from the lost reasons list. Open and won deals carry no reason, so the report then covers just those lost deals.
Responses
Section titled “Responses”Deals and won value by source and by referrer.
object
Open deals count wherever they stand today; won and lost ones count inside the period.
object
Deals credited to one referrer.
object
Null for the unattributed bucket.
The same deals by the referrer’s rep who sent them, with a null-id No rep row; empty for the unattributed bucket and for a caller without the commissions module and commissions.view or commissions.manage.
Deals credited to one source or referrer.
object
Null for the unattributed bucket.
An amount in a single currency.
object
Sum in that currency, rounded to cents.
The company’s own currency, or the workspace’s when the company has none. Never converted.
An amount in a single currency.
object
Sum in that currency, rounded to cents.
The company’s own currency, or the workspace’s when the company has none. Never converted.
Deals credited to one source or referrer.
object
Null for the unattributed bucket.
An amount in a single currency.
object
Sum in that currency, rounded to cents.
The company’s own currency, or the workspace’s when the company has none. Never converted.
Example generated
{ "data": { "byReferrer": [ { "id": "example", "lostDeals": 1, "name": "example", "openDeals": 1, "reps": [ { "id": "example", "lostDeals": 1, "name": "example", "openDeals": 1, "wonAmounts": [ { "amount": 1, "currency": "example" } ], "wonDeals": 1 } ], "wonAmounts": [ { "amount": 1, "currency": "example" } ], "wonDeals": 1 } ], "bySource": [ { "id": "example", "lostDeals": 1, "name": "example", "openDeals": 1, "wonAmounts": [ { "amount": 1, "currency": "example" } ], "wonDeals": 1 } ] }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Missing the deals.view permission.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}The Sales or Reports module is turned off for the workspace.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC