POST
/
cleemy-procurement
/
api
/
costcenters
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>"
        }
      ]
    }
  ]
}

Headers

Authorization
string
required

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

Body

application/json

Cost-center to create.

Cost-center.

Response

201 - application/json

OK

The response is of type object.