Skip to main content
PUT
/
cleemy-procurement
/
api
/
costcenters
/
{id}
Update Cost-Center
curl --request PUT \
  --url https://{host}/cleemy-procurement/api/costcenters/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "ownerId": 123,
  "owner": {
    "id": 123
  },
  "state": "Disabled",
  "establishmentIds": [
    123
  ]
}
'
{
  "name": "<string>",
  "code": "<string>",
  "id": 123,
  "owner": {
    "id": 123,
    "href": "<string>",
    "name": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "pictureHref": "<string>"
  },
  "state": "Disabled",
  "establishments": [
    {
      "id": 123,
      "name": "<string>",
      "href": "<string>"
    }
  ]
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Path Parameters

id
integer<int32>
required

ID of the cost-center.

Body

application/json

Cost-center to update.

Cost-center.

name
string
required
code
string
required
ownerId
integer<int32>

ID of the user who will be the owner of the cost-center.

owner
Reference to a user · object

Read-only. Owner of the cost-center.

state
enum<string>
default:Disabled

Disabled: the cost-center is disabled. Enabled: the cost-center is enabled.

Available options:
Disabled,
Enabled
establishmentIds
integer<int32>[]

Write-only. IDs of the establishments to which the cost-center belongs."

Response

200 - application/json

OK

Cost-center.

name
string
required
code
string
required
id
integer<int32>
owner
Reference to a user · object

Read-only. Owner of the cost-center.

state
enum<string>
default:Disabled

Disabled: the cost-center is disabled. Enabled: the cost-center is enabled.

Available options:
Disabled,
Enabled
establishments
Reference to an establishment · object[]

Read-only. Establishments to which the cost-center belongs.