Caoloon API Docs
Customer Per Call
Json API
Customer Per Call
Json API
  • Customer Per Call

Customer Per Call

Introduction

The Customer Per Call (CPC) api is available in production at https://www.caoloon.com/api/customer/call/api/*

For testing purposes the CPC api is also available at https://staging.caoloon.com/api/customer/call/api/*

The CPC api consists of four endpoints:

  • Cao endpoint
  • Salary Tables endpoint
  • Periodical endpoint
  • Salary endpoint

To receive a salary for a specified cao, you:

  1. Get the Cao's from the Cao endpoint
  2. Get the Salary Tables using a Cao ID as a parameter
  3. Get the periodicals
  4. Calculate the salary using all required information

Authorization

Authorization is done through an authorization token specified in an Authorization header. Contact caoloon.com for your token.

Headers

KeyValue
AuthorizationToke​n

Caos

URL

https://www.caoloon.com/api/customer/call/api/caos/?cao_id=[id]

Method

GET

Parameters

NameDescriptionFormatRequired
cao_idunique id of caostringno
avvwhether cao is "Algemeen verbindend verklaard"string ("false"/"true")no

Response (JSON)

[
  {
    "cao_id": <string>, // unique id of cao
    "name": <string>, // full name of cao
    "short_name": <string>, // short name of cao
    "code": <string>, // SZW code of cao
    "start_year": <string YYYY>, // start year of cao
    "avv": <boolean>, // whether cao is "Algemeen verbindend verklaard"
    "cao_entry_date": <string YYYY-MM-DD> // Date when cao has been entered at the SZW
  }
]

Details

Call this endpoint to receive a list of cao's. A single cao's details are returned if the cao_id paramater is given.

Salary Tables

URL

https://www.caoloon.com/customer/call/api/salary-tables/?cao_id=[id]

Method

GET

Parameters

NameDescriptionFormatRequired
cao_idunique id of caostringyes

Response (JSON)

[
  {
    "cao_id": <string>, // unique id of cao
    "salary_table_id": <number>, // id of salary table in cao
    "description": <string>, // description of salary table
    "min_age": <number>, // minimum age required for usage of this salary table
    "max_age": <number>, // maximum age for usage of this salary table
    "name": <string>, // name of salary table
    "hours_in_workweek": <number>, // hours in workweek for salary table
    "workweeks": <number[]>, // workweeks in this salary table
    "payscales": <string[]>, // payscales for  in this salary table
    "jobs": [
      {
        "job_id": <number>, // id of job in cao
        "name": <string>, // name of job
        "payscales": <string[]>, // payscales of this job
        "minimal_payscale": <string> // lowest payscale in payscales of this job
      }
    ],
    "abu_calc_available": <boolean>
  }
]

Details

Call this endpoint to get the salary tables for a specified cao id.

Periodicals

URL

https://www.caoloon.com/customer/call/api/periodicals/?cao_id=[id]&salary_table_id=[id]&payscale=[payscale]&birthdate=[YYYY-MM-DD]&hours_in_workweek=[hours]&calc_date=[calc_date]

Method

GET

Parameters

NameDescriptionFormatRequired
cao_idunique id of caostringyes
salary_table_idid of salary table in caonumberyes
payscalestringyes
birthdatebirthdate of employeestring (YYYY-MM-DD)yes
hours_in_workweeknumberyes
calc_datedate of placementstring (YYYY-MM-DD)no

Response (JSON)

[
  "periodicals": <string[]>
]

Details

The periodical endpoint returns the potential periodicals for an employee given the information in the parameters.

Salary

URL

https://www.caoloon.com/customer/call/api/salaries/?cao_id=[id]&salary_table_id=[id]&payscale=[payscale]&birthdate=[birthdate]&calc_date=[calc_date]&calc_abu=[calc_abu]&hours_in_workweek=[hours]&periodical=[periodical]

Method

GET

Parameters

NameDescriptionFormatRequired
cao_idunique id of caostringyes
salary_table_idid of salary table in caonumberyes
payscalestringyes
birthdatebirthdate of employeestring (YYYY-MM-DD)yes
hours_in_workweeknumberyes
calc_datedate of placementstring (YYYY-MM-DD)no
calc_abubooleanno
periodicalnumberno

Response (JSON)

[
  "cao": {
    "cao_id": <string>, // unique id of cao
    "duration_start": <string YYYY-MM-DD>, // start of cao duration
    "duration_end": <string YYYY-MM-DD>, // end of cao duration
    "sbi": <string>, // sbi of cao
    "cao_text_html": <string>, // cao text in html format
  },
  "salary_table": {
    "salary_table_id": <number>, // id of salary table in cao
    "active_per": <string YYYY-MM-DD>, // date when salary table becomes active
    "active_per_description": <string>, // description of change in salary table (e.g., pay rise 1.00%)
    "adv_perc": <number>, // calculated adv percentage (based on adv_type and adv_amount)
    "adv_type": <string>, // type of adv ("hours_per_week"/"hours_per_year"/"days_per_year"/"percentage")
    "adv_amount": <number> // adv amount (meaning dependent on adv type)
  },
  "salary": {
    "payscale": <string>,
    "periodical": <number>,
    "salary": <number>,
    "calculation_abu": <boolean>
  }
]

Details

The final endpoint to calculate the correct salary given a set of cao specifications.