Skip to content

Insert cost center

Request

Security
OAuth2(Required scopes: enrichment.write)
Bodyapplication/jsonrequired
externalIdstring^\S([\S ]*\S)?$required

External id of the cost center that is globally unique across the provided cost center data

Example:"0000100CO1"
externalClientIdstring

Identifier of the client entity in the source system which can be used to separate data

Example:"EXTERNAL_CLIENT_ID"
codestring^\S([\S ]*\S)?$required

Code of the cost center in the source system (not unique across clients)

Example:"CO1"
companyAssignmentArray of strings

List of externalCompanyIds that the approver is assigned to

Example:
[ "DE01", "US01" ]
typeobject(languagedTextWithValue)
categoryobject(languagedTextWithValue)
labelArray of objects(languagedText)

Label describing the cost center

Example:
[ { "text": "Sales Engineers", "language": "en" } ]
shortLabelArray of objects(languagedText)

Short label describing the cost center

Example:
[ { "text": "Sales Eng.", "language": "en" } ]
customFieldsobject(customFields)

List of key value pairs containing custom fields from the source system

customMetadataobject(JsonObject)

Any nested structure with metadata that source system needs to send

Example:
{ "someTopLevelProperty": "value1", "someNestedProperty": { "nestedProperty": "value2" }, "someArrayProperty": [ "value3", "value4" ] }
curl -i -X POST \
  https://api.cloud.hypatos.ai/v2/enrichment/cost-centers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "externalId": "0000100CO1",
    "externalClientId": "EXTERNAL_CLIENT_ID",
    "code": "CO1",
    "companyAssignment": [
      "DE01",
      "US01"
    ],
    "type": {
      "value": "OE",
      "labels": [
        {
          "text": "Fish & Chips",
          "language": "en"
        }
      ]
    },
    "category": {
      "value": "OE",
      "labels": [
        {
          "text": "Fish & Chips",
          "language": "en"
        }
      ]
    },
    "label": [
      {
        "text": "Sales Engineers",
        "language": "en"
      }
    ],
    "shortLabel": [
      {
        "text": "Sales Eng.",
        "language": "en"
      }
    ],
    "customFields": {
      "property1": "string",
      "property2": "string"
    },
    "customMetadata": {
      "someTopLevelProperty": "value1",
      "someNestedProperty": {
        "nestedProperty": "value2"
      },
      "someArrayProperty": [
        "value3",
        "value4"
      ]
    }
  }'

Responses

Successfully inserted

Bodyapplication/json
idstringrequired
Example:"3a429dc8-56d4-42ef-a4cf-2ebc9ad1ef38"
Response
{ "id": "3a429dc8-56d4-42ef-a4cf-2ebc9ad1ef38" }