Create cost center

Examples

{
  cost_center: {
    name: 'Blaname',
    dimension_name: 'Bla Dimension',
    assignee_ids: [1, 2, 55]
  }
}

Example curl request:
curl -H "Authorization: Bearer token" -H "Content-Type: application/json" -X POST -d '{"cost_center": {"name": "foo", "dimension_name": "bar"}}' https://app.bezala.com/api/cost_centers
    

Params

Param name Description
cost_center
required

Validations:

  • Must be a Hash

cost_center[name]
required

Cost center name.

Validations:

  • Must be String

cost_center[dimension_name]
required

Cost center dimension name. Cost centers with similar dimension name are grouped into one drop down in transaction form.

Validations:

  • Must be String

cost_center[assignee_ids]
optional , nil allowed

Ids of users assigned to this cost center. Passing nil here will remove all assignees.

Validations:

  • Must be an array of Integer

cost_center[deactivated]
optional , nil allowed

Whether cost center should be hidden from transaction form. Default: false. Possible values: either 1 or 0.

Validations:

  • Must be Integer

cost_center[send_to_accounting]
optional , nil allowed

Whether cost center should be sent to accounting. It doesn’t affect the UI. Default: true. Possible values: 1, 0

Validations:

  • Must be Integer

cost_center[netsuite]
optional , nil allowed

NetSuite settings in free form hash

Validations:

  • Must be Hash