CreatorHero
CreatorHero API

Additional Costs

Additional costs of the agency and their types, included in the accounting statement. Requires accounting in the agency's plan.


Update additional cost

PUT
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-costs/{costId}

Same JSON body as create, but only the given fields change. A blank name or an amount of 0 or less is ignored. Requires the agency owner or a team admin.

Update additional cost › path Parameters

costId
​integer · int64 · required

ID of the cost

Update additional cost › Request Body

Additional cost to create or update
name
​string

Name of the cost, 1 to 254 characters

amount
​number

Amount in USD, above 0: once for retention NONE, otherwise per retention period

retention
​CostRetention · enum

How often the cost recurs

Enum values:
NONE
DAILY
WEEKLY
MONTHLY
YEARLY
typeId
​integer · int64

ID of a cost type available to the agency (own or common)

valid
​boolean

Update additional cost › Responses

Updated cost

Additional cost of the agency, counted in the accounting statement
id
​integer · int64 · required

ID of the cost

name
​string

Name of the cost

amount
​number

Amount in USD: once for retention NONE, otherwise per retention period

Cost type

retention
​CostRetention · enum

How often the cost recurs

Enum values:
NONE
DAILY
WEEKLY
MONTHLY
YEARLY
createdAt
​string · date-time

When the cost was created (UTC); it counts from this day on. A one-time cost counts on this day only

deletedAt
​string · date-time

When the cost was deleted (UTC); it stops counting after this day. null while active


Delete additional cost

DELETE
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-costs/{costId}

Sets the cost's deletedAt to now; it still counts for the time before. Requires the agency owner or a team admin.

Delete additional cost › path Parameters

costId
​integer · int64 · required

ID of the cost

Delete additional cost › Responses

Deleted

No data returned

Rename additional cost type

PUT
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-cost-types/{typeId}

JSON body: name. Only the agency's own cost types can be renamed. Requires the agency owner or a team admin.

Rename additional cost type › path Parameters

typeId
​integer · int64 · required

ID of the cost type

Rename additional cost type › Request Body

Additional cost type to create or rename
name
​string

Name of the cost type; unique among the agency's own and the common types

Rename additional cost type › Responses

Updated cost type

Category of additional costs: one of the agency's own types or a common type
id
​integer · int64 · required

ID of the cost type

name
​string

Name of the cost type

common
​boolean

Whether this is a common type available to every agency; common types cannot be renamed or deleted

ownerId
​integer · int32

ID of the agency that owns the type

disabled
​boolean

Whether the type was deleted

createdAt
​string · date-time

When the type was created (UTC)


Delete additional cost type

DELETE
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-cost-types/{typeId}

Deletes one of the agency's own cost types; common types cannot be deleted. Existing costs keep the type. Requires the agency owner or a team admin.

Delete additional cost type › path Parameters

typeId
​integer · int64 · required

ID of the cost type

Delete additional cost type › Responses

Deleted

No data returned

List additional costs

GET
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-costs

Additional costs of the agency that were active at any time from from to to (UTC): created at or before to and not deleted before from. Newest first. Without to the page is empty; without from only costs that are not deleted are returned. Request the next page while last is false. Requires the agency owner or a team admin.

List additional costs › query Parameters

from
​string · date-time · required

Start of the period, UTC

to
​string · date-time · required

End of the period, UTC

page
​integer · min: 0

Page number, starts at 0. Default 0

Default: 0
size
​integer · min: 1

Costs per page. Default 20

Default: 20
sort
​string[]

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

List additional costs › Responses

Page of additional costs

totalElements
​integer · int64
totalPages
​integer · int32
size
​integer · int32
​AdditionalCostDto[]
number
​integer · int32
first
​boolean
last
​boolean
numberOfElements
​integer · int32
​SortObject
​PageableObject
empty
​boolean

Create additional cost

POST
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-costs

JSON body, all fields required: name (1 to 254 characters), amount (above 0), retention (NONE = one-time, or DAILY, WEEKLY, MONTHLY, YEARLY = recurring) and typeId (a cost type from GET /dashboard/api/v1/accounting/additional-cost-types). Requires the agency owner or a team admin.

Create additional cost › Request Body

Additional cost to create or update
name
​string

Name of the cost, 1 to 254 characters

amount
​number

Amount in USD, above 0: once for retention NONE, otherwise per retention period

retention
​CostRetention · enum

How often the cost recurs

Enum values:
NONE
DAILY
WEEKLY
MONTHLY
YEARLY
typeId
​integer · int64

ID of a cost type available to the agency (own or common)

valid
​boolean

Create additional cost › Responses

Created cost

Additional cost of the agency, counted in the accounting statement
id
​integer · int64 · required

ID of the cost

name
​string

Name of the cost

amount
​number

Amount in USD: once for retention NONE, otherwise per retention period

Cost type

retention
​CostRetention · enum

How often the cost recurs

Enum values:
NONE
DAILY
WEEKLY
MONTHLY
YEARLY
createdAt
​string · date-time

When the cost was created (UTC); it counts from this day on. A one-time cost counts on this day only

deletedAt
​string · date-time

When the cost was deleted (UTC); it stops counting after this day. null while active


List additional cost types

GET
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-cost-types

Cost types the agency can use: its own types and the common ones (common = true). Deleted types are left out. Requires the agency owner or a team admin.

List additional cost types › Responses

Cost types

Category of additional costs: one of the agency's own types or a common type
id
​integer · int64 · required

ID of the cost type

name
​string

Name of the cost type

common
​boolean

Whether this is a common type available to every agency; common types cannot be renamed or deleted

ownerId
​integer · int32

ID of the agency that owns the type

disabled
​boolean

Whether the type was deleted

createdAt
​string · date-time

When the type was created (UTC)


Create additional cost type

POST
https://backend.creatorhero.com
/dashboard/api/v1/accounting/additional-cost-types

JSON body: name. Requires the agency owner or a team admin.

Create additional cost type › Request Body

Additional cost type to create or rename
name
​string

Name of the cost type; unique among the agency's own and the common types

Create additional cost type › Responses

Created cost type

Category of additional costs: one of the agency's own types or a common type
id
​integer · int64 · required

ID of the cost type

name
​string

Name of the cost type

common
​boolean

Whether this is a common type available to every agency; common types cannot be renamed or deleted

ownerId
​integer · int32

ID of the agency that owns the type

disabled
​boolean

Whether the type was deleted

createdAt
​string · date-time

When the type was created (UTC)