Cost Centers

Create a cost center

Changed on

Creates a cost center for a given operator, optionally scoped to a team.</br></br>Required scope: cost-centers:write </br>Organization authorization: supported

post/api/v1/cost-centers

Request

  • Base URL
    https://partner-api.monta.com
  • URL
    https://partner-api.monta.com/api/v1/cost-centers
  • Auth
    HTTP bearer

Request body

teamIdinteger nullable

Id of the team this cost center belongs to. When omitted, the cost center is operator-scoped.

namestring required

Name of the cost center.

externalIdstring required

External Id of this cost center, managed by you.

descriptionstring nullable

Description of the cost center.

Example request

{
  "teamId": 10,
  "name": "Sales department",
  "externalId": "ACME-12345",
  "description": "Costs attributed to the sales department"
}

Response

Cost center created

idinteger

Id of this cost center

operatorIdinteger

Id of the operator this cost center belongs to

teamIdinteger nullable

Id of the team this cost center belongs to. Null when the cost center is operator-scoped.

namestring required

Name of the cost center

externalIdstring required

External Id of this cost center, managed by you.

descriptionstring nullable

Description of the cost center

createdAtstring date-time required

Creation date of this cost center

updatedAtstring date-time required

Date this cost center was last updated

teamsCountinteger nullable

Number of teams assigned to this cost center. Only returned when retrieving a single cost center.

teamMembersCountinteger nullable

Number of team members assigned to this cost center. Only returned when retrieving a single cost center.

teamMemberProfilesCountinteger nullable

Number of team member profiles assigned to this cost center. Only returned when retrieving a single cost center.

vehiclesCountinteger nullable

Number of vehicles assigned to this cost center. Only returned when retrieving a single cost center.

chargeKeysCountinteger nullable

Number of charge keys assigned to this cost center. Only returned when retrieving a single cost center.

Example response

{
  "id": 1,
  "operatorId": 1,
  "teamId": 10,
  "name": "Sales department",
  "externalId": "ACME-12345",
  "description": "Costs attributed to the sales department",
  "createdAt": "2022-05-12T15:56:45.99Z",
  "updatedAt": "2022-05-12T16:56:45.99Z",
  "teamsCount": 3,
  "teamMembersCount": 12,
  "teamMemberProfilesCount": 4,
  "vehiclesCount": 7,
  "chargeKeysCount": 9
}

Changes