Skip to content

Team revenue credit

GET
/api/v1/analytics/team
curl --request GET \
--url 'https://digize.com/api/v1/analytics/team?days=30' \
--header 'x-api-key: <x-api-key>'

Which members’ work made the money: each member’s part of the period’s sales less refunds (and of won deals) by area — ads, sites, sales, store, automations — against the period before, how much revenue no one’s work led to, and the rules it was split by. Everyone in the workspace is listed, at zero if nothing they did earned credit.

Needs the analytics:read permission.

days
Any of:
number
Allowed value: 7

The period: the last 7, 30, 90 or 365 days, compared with the same length before.

Done

Media typeapplication/json
object
currency
required
string
from
required
string format: date-time
to
required
string format: date-time
revenue
required

Sales less refunds in the period, credited or not.

number
previousRevenue
required

In the minor unit of the currency.

number
attributed
required

The members’ parts of it.

number
previousAttributed
required

In the minor unit of the currency.

number
unattributed
required

What no member’s work led to.

number
deals
required

Won deals’ value in the period: pipeline, not cash.

number
areas
required

Credit by area: ads (the campaign or short link), sites (the site), sales (CRM work, owners, invoices, payment links), store (products, discounts), automations (workflows that ran).

object
ads
required

In the minor unit of the currency.

number
sites
required

In the minor unit of the currency.

number
sales
required

In the minor unit of the currency.

number
store
required

In the minor unit of the currency.

number
automations
required

In the minor unit of the currency.

number
members
required
Array<object>
object
memberId
required
string
name
required
string
role
required
Any of:
string
Allowed values: owner admin member
credited
required

Their part of the period’s sales less refunds.

number
previous
required

The same for the period before.

number
touched
required

The whole amount of every sale and refund they had a part in.

number
sales
required

Sales they had a part in.

integer
>= -9007199254740991 <= 9007199254740991
deals
required

Their part of the deals won in the pipeline.

number
areas
required

Credit by area: ads (the campaign or short link), sites (the site), sales (CRM work, owners, invoices, payment links), store (products, discounts), automations (workflows that ran).

object
ads
required

In the minor unit of the currency.

number
sites
required

In the minor unit of the currency.

number
sales
required

In the minor unit of the currency.

number
store
required

In the minor unit of the currency.

number
automations
required

In the minor unit of the currency.

number
contributions
required

Changes they made in the period that can earn credit.

integer
>= -9007199254740991 <= 9007199254740991
byAgent
required

Of those, how many the agent made for them.

integer
>= -9007199254740991 <= 9007199254740991
settings
required
object
lookbackDays
required

Changes made this many days before a sale count toward it.

integer
>= 7 <= 90
weights
required

Each area’s weight against the others, 0 (doesn’t count) to 3; 1 each splits evenly.

object
ads
required
number
<= 3
sites
required
number
<= 3
sales
required
number
<= 3
store
required
number
<= 3
automations
required
number
<= 3
owners
required

The customer’s owner and the deal’s owner count in sales.

boolean

Example

{
"members": [
{
"role": "owner"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}