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>"
}
}
]
}
Import a list of cost-centers. Endpoint to use for bulk import of 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": {
"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>"
}
}
]
}
API key. Value must be formatted like so: lucca application={api_key}
.
Successful cost-centers import.
The response is of type object
.
Was this page helpful?