Skip to content

A member's revenue credit

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

One member’s credit in the period: their part by area, day by day, every sale, refund and deal they had a part in with what earned it, and the changes they made that can earn credit. Use it to explain why someone is where they are on analytics.team.report.

Needs the analytics:read permission.

memberId
required

The member’s user id: memberId from analytics.team.report, or userId from members.list.

string
/^[A-Za-z0-9_-]{1,64}$/
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
member
required
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
trend
required

Their credit by day (by week beyond 31 days), oldest first.

Array<object>
object
start
required
string format: date-time
amount
required

In the minor unit of the currency.

number
events
required

The sales, refunds and deals they had a part in, newest first, up to 100.

Array<object>
object
id
required
string
kind
required
string
Allowed values: sale refund deal
source
required
string
Allowed values: order payment invoice opportunity
recordId
required

The order, payment, invoice, opportunity or refund.

string
label
required
string
amount
required

The whole amount.

number
share
required

Their part of it, 0 to 1.

number
credit
required

In the minor unit of the currency.

number
contactId
required
string | null
at
required
string format: date-time
reasons
required
Array<object>
object
area
required
string
Allowed values: ads sites sales store automations
contribution
required
Any of:
object
id
required
string
action
required
string
summary
required
string
byAgent
required
boolean
at
required
string format: date-time
contributions
required

Their changes in the period that can earn credit, newest first, up to 100.

Array<object>
object
id
required
string
area
required
string
Allowed values: ads sites sales store automations
action
required
string
summary
required
string
made
required

They made the thing, so it counts while it earns.

boolean
byAgent
required
boolean
at
required
string format: date-time

Example

{
"member": {
"role": "owner"
},
"events": [
{
"kind": "sale",
"source": "order",
"reasons": [
{
"area": "ads"
}
]
}
],
"contributions": [
{
"area": "ads"
}
]
}

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"
}
}