Skip to main content
POST
/
cleemy-procurement
/
services
/
imports
/
costcenters
Import Cost-Centers
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": {
        "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>"
          }
        ]
      },
      "problem": {
        "type": "<string>",
        "title": "<string>",
        "status": 123,
        "detail": "<string>",
        "instance": "<string>"
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developers.lucca.fr/llms.txt

Use this file to discover all available pages before exploring further.

You may want to refer to the dedicated guide.

Headers

Authorization
string
required

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

Body

application/json
mode
enum<string>

AllOrNothing: all items are imported or none. SkipInvalidItems: items are imported if valid, skipped if not.

Available options:
AllOrNothing,
SkipInvalidItems
items
object[]

List of cost-centers to import.

Response

200 - application/json

Successful cost-centers import.

mode
enum<string>

AllOrNothing: all items are imported or none. SkipInvalidItems: items are imported if valid, skipped if not.

Available options:
AllOrNothing,
SkipInvalidItems
imported
integer<int32>

Number of items imported.

Required range: x >= 0
failedValidation
integer<int3é>

Number of items failed validation.

Required range: x >= 0
items
object[]