POST
/
cleemy-procurement
/
services
/
imports
/
costcenters
curl --request POST \
  --url https://{host}/cleemy-procurement/services/imports/costcenters \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "mode": "AllOrNothing",
  "items": [
    {
      "name": "<string>",
      "code": "<string>",
      "ownerId": 123,
      "state": "Disabled",
      "establishmentIds": [
        123
      ]
    }
  ]
}'
{
  "mode": "AllOrNothing",
  "imported": 1,
  "failedValidation": 1,
  "items": [
    {
      "result": {
        "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>"
          }
        ]
      },
      "problem": {
        "type": "<string>",
        "title": "<string>",
        "status": 123,
        "detail": "<string>",
        "instance": "<string>"
      }
    }
  ]
}

Headers

Authorization
string
required

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

Body

application/json

Response

200 - application/json

Successful cost-centers import.

The response is of type object.