curl --request POST \
--url https://{host}/cleemy-procurement/api/costcenters \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"code": "<string>",
"ownerId": 123,
"owner": {
"id": 123
},
"state": "Disabled",
"establishmentIds": [
123
]
}'
{
"items": [
{
"id": 123,
"name": "<string>",
"code": "<string>",
"owner": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
},
"state": "Disabled",
"establishments": [
{
"id": 123,
"name": "<string>",
"href": "<string>"
}
]
}
]
}
Create a new cost-center.
curl --request POST \
--url https://{host}/cleemy-procurement/api/costcenters \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"code": "<string>",
"ownerId": 123,
"owner": {
"id": 123
},
"state": "Disabled",
"establishmentIds": [
123
]
}'
{
"items": [
{
"id": 123,
"name": "<string>",
"code": "<string>",
"owner": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
},
"state": "Disabled",
"establishments": [
{
"id": 123,
"name": "<string>",
"href": "<string>"
}
]
}
]
}
API key. Value must be formatted like so: lucca application={api_key}
.
Cost-center to create.
Cost-center.
OK
The response is of type object
.
Was this page helpful?