Skip to content
campaiDeveloper
campai.com

Crm · Compensation

GET/{organizationId}/crm/compensation/settingsReads only

Get compensation settings

Gets compensation claim settings for the organization identified by organizationId. Returns the settings, or null if compensation claims are not set up.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have access to the organization.
  • The caller needs the crmSettings.read permission.

Request

Path parameters

  • organizationIdidrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/crm/compensation/settings' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • cadencestring
    month quarter halfYear year
  • submissionDeadlineDaysinteger

    0–90

  • reminderDaysBeforeDeadlineinteger

    0–30

  • ratesobject[]

    at most 50 items

    10 properties
    • _idid
    • typestring
      hourly flat mileage
    • labelstring

      1–60 characters

    • amountinteger

      0–999999

    • accountinteger

      1–999999999

    • costCenter1numbernullable

      1–99999999

    • costCenter2numbernullable

      1–99999999

    • activeboolean
    • limitidnullable
    • oncePerEntryboolean
  • limitsobject[]

    at most 10 items

    5 properties
    • _idid
    • labelstring

      1–60 characters

    • amountinteger

      at most 9999999

    • dailyAmountintegernullable

      at most 9999999

    • monthlyAmountintegernullable

      at most 9999999

  • entryFieldsobject[]

    at most 10 items

    6 properties
    • _idid
    • typestring
      text select multiSelect
    • labelstring

      1–60 characters

    • entryTypesstring[]

      at most 4 items

      hours flatRates mileage expenses
    • requiredboolean
    • optionsstring[]

      at most 50 items · each 1–100 characters

  • expensesobject
    6 properties
    • enabledboolean
    • accountintegernullable

      1–999999999

    • costCenter1numbernullable

      1–99999999

    • costCenter2numbernullable

      1–99999999

    • maxAmountintegernullable

      at most 9999999999

    • receiptRequiredboolean
  • correctionAccountintegernullable

    1–999999999

  • correctionCostCenter1numbernullable

    1–99999999

  • correctionCostCenter2numbernullable

    1–99999999

  • waiverobject
    2 properties
    • enabledboolean
    • accountintegernullable

      1–999999999

  • declarationTextstring

    at most 4000 characters

  • reviewerUserIdsstring[]

    at most 50 items · each at least 1 characters

  • reviewerRulesobject[]

    at most 50 items

    2 properties
    • conditionobject
      2 properties
      • operatorstring
        and or
      • conditions(object (recursive) | object)[]

        at least 1 items

        4 properties
        • leftobject | object of any
          Variant 1: 1 property
          • variablestring

            at least 1 characters

          Variant 2: 4 properties
          • sourceobject
            1 property
            • variablestring

              at least 1 characters

          • lookupobjectnullable
            1 property
            • variablestring

              at least 1 characters

          • arrayboolean
          • selectobject (recursive)
          Variant 3: 2 properties
          • funcstring
            33 values
            concat ifEmpty lowercase uppercase substring trim abs ceil floor min max mod sum sub mul div avg med parseNumber formatNumber dateOnly dateTime dateOnlyPart dateTimePart age dateOnlyDifference dateTimeDifference setDateOnly setDateTime addDateOnly addDateTime formatDateOnly formatDateTime
          • paramsobject (recursive)[]
          Variant 4: 1 property
          • literalnumber[] | number
          Variant 5: 3 properties
          • ifobject (recursive)
          • thenobject (recursive)
          • elseobject (recursive)
        • cmpFuncstring
          15 values
          eq isSet lt lte gt gte includes contains startsWith endsWith before beforeAt after afterAt isToday
        • rightobject | object of any
          Variant 1: 1 property
          • variablestring

            at least 1 characters

          Variant 2: 4 properties
          • sourceobject
            1 property
            • variablestring

              at least 1 characters

          • lookupobjectnullable
            1 property
            • variablestring

              at least 1 characters

          • arrayboolean
          • selectobject (recursive)
          Variant 3: 2 properties
          • funcstring
            33 values
            concat ifEmpty lowercase uppercase substring trim abs ceil floor min max mod sum sub mul div avg med parseNumber formatNumber dateOnly dateTime dateOnlyPart dateTimePart age dateOnlyDifference dateTimeDifference setDateOnly setDateTime addDateOnly addDateTime formatDateOnly formatDateTime
          • paramsobject (recursive)[]
          Variant 4: 1 property
          • literalnumber[] | number
          Variant 5: 3 properties
          • ifobject (recursive)
          • thenobject (recursive)
          • elseobject (recursive)
        • negateboolean
    • reviewerUserIdsstring[]

      1–50 items · each at least 1 characters

  • defaultMandateidnullable
Response200
{
  "cadence": "month",
  "submissionDeadlineDays": 0,
  "reminderDaysBeforeDeadline": 0,
  "rates": [
    {
      "_id": "000000000000000000000001",
      "type": "hourly",
      "label": "string",
      "amount": 0,
      "account": 1,
      "costCenter1": 1,
      "costCenter2": 1,
      "active": true,
      "limit": "000000000000000000000001",
      "oncePerEntry": true
    }
  ],
  "limits": [
    {
      "_id": "000000000000000000000001",
      "label": "string",
      "amount": 1,
      "dailyAmount": 1,
      "monthlyAmount": 1
    }
  ],
  "entryFields": [
    {
      "_id": "000000000000000000000001",
      "type": "text",
      "label": "string",
      "entryTypes": [
        "hours"
      ],
      "required": true,
      "options": [
        "string"
      ]
    }
  ],
  "expenses": {
    "enabled": true,
    "account": 1,
    "costCenter1": 1,
    "costCenter2": 1,
    "maxAmount": 1,
    "receiptRequired": true
  },
  "correctionAccount": 1,
  "correctionCostCenter1": 1,
  "correctionCostCenter2": 1,
  "waiver": {
    "enabled": true,
    "account": 1
  },
  "declarationText": "string",
  "reviewerUserIds": [
    "string"
  ],
  "reviewerRules": [
    {
      "condition": {
        "operator": "and",
        "conditions": [
          null
        ]
      },
      "reviewerUserIds": [
        "string"
      ]
    }
  ],
  "defaultMandate": "000000000000000000000001"
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.