Skip to content

Change how Team credit is split

PATCH
/api/v1/analytics/team/settings
curl --request PATCH \
--url https://digize.com/api/v1/analytics/team/settings \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "lookbackDays": 1, "weights": { "ads": 1, "sites": 1, "sales": 1, "store": 1, "automations": 1 }, "owners": true }'

Changes the rules: how many days before a sale a change counts, each area’s weight, and whether owning the customer or the deal counts. The last year’s credit is worked out again by the new rules. Needs settings:write as well.

Needs the analytics:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
lookbackDays

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

integer
>= 7 <= 90
weights
object
ads
number
<= 3
sites
number
<= 3
sales
number
<= 3
store
number
<= 3
automations
number
<= 3
owners

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

boolean

Example generated

{
"lookbackDays": 1,
"weights": {
"ads": 1,
"sites": 1,
"sales": 1,
"store": 1,
"automations": 1
},
"owners": true
}

Done

Media typeapplication/json
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 generated

{
"lookbackDays": 1,
"weights": {
"ads": 1,
"sites": 1,
"sales": 1,
"store": 1,
"automations": 1
},
"owners": true
}

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

A request with the same Idempotency-Key is still running (conflict).

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 Idempotency-Key was used with a different request.

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