Skip to navigation

Update Company Settings

Changes company settings, as the SalaryBox app’s Settings screen does. Send only the settings you want to change; anything left out stays as it is. Shared rules: see Writing data.

  • The body is closed: an unknown field is refused with 400 "Unknown field." Counts toward your write budget.
  • At least one setting is required: otherwise 400 "Send at least one field to change."
  • block_fake_gps_attendance, device_verification, ai_face_recognition, auto_live_track, include_week_offs, include_holidays, auto_calculate_tds, round_off_total_salary and custom_permissions are true or false.
  • ai_face_recognition: turning it on also turns on selfie attendance for every staff member, and matches faces only for staff whose face is enrolled. Faces are enrolled in the SalaryBox Android app; staff not yet enrolled punch with a selfie and no match until they are. Turning it off turns face matching off for everyone.
  • salary_calculation_days is calendar_month, 30_day_month or 26_day_month. See Fetch Company Settings for what each means.
  • include_week_offs and include_holidays can be false only when salary_calculation_days is calendar_month (already, or in the same request); otherwise 400. Switching to 30_day_month or 26_day_month sets both back to true, as in the app.
  • Changing include_week_offs or include_holidays needs Payroll on your plan: otherwise 403 "Payroll is not included in your plan. Contact us." Sending one at its current value is always accepted.
  • A setting sent at its current value is ignored. Only the settings that change are saved and trigger their effects: salary_calculation_days, include_week_offs and include_holidays change how payroll is worked out for all staff, and changing device_verification or ai_face_recognition applies to every staff member. If nothing changes, the current settings are returned with 200.
  • A setting your plan does not include is refused with 403 and nothing is saved.
  • custom_permissions can’t be turned off while staff have the Custom role: 400, and nothing is saved. Move those staff to another role first.

Authentication

AuthorizationApi-Key

Format: “Api-Key {api-key}”

Request

This endpoint expects an object.
block_fake_gps_attendancebooleanOptional

Block Fake GPS Attendance: punches from a phone using a fake GPS app are refused.

device_verificationbooleanOptional

Device Verification: staff can punch only from an approved device. A new device needs approval (see Approve or Reject Device Request).

ai_face_recognitionbooleanOptional

AI Face Recognition: a staff member’s punch photo is matched against their enrolled face. Turning it on also turns on selfie attendance for every staff member, and face matching applies only to staff whose face is enrolled (enrolment is done in the SalaryBox Android app). Needs AI Face Recognition on your plan.

auto_live_trackbooleanOptional

Auto Live Track: staff’s live location is tracked automatically during working hours.

salary_calculation_daysenumOptional

How many days a month’s salary is spread over, which sets the per-day salary used for absences, fines and overtime. calendar_month: the days in that month (January 31, February 28). 30_day_month: always 30. 26_day_month: always 26.

Allowed values:
include_week_offsbooleanOptional

Include Weekoffs: week offs count as paid days of the calendar month. Off, they are taken out of the month’s days, so a 31-day month with 4 week offs counts as 27 days. Can be false only with salary_calculation_days calendar_month.

include_holidaysbooleanOptional

Include Holidays: holidays count as paid days of the calendar month. Off, they are taken out of the month’s days, so a 31-day month with 1 holiday counts as 30 days. Can be false only with salary_calculation_days calendar_month.

auto_calculate_tdsbooleanOptional

Auto-Calculate TDS: payroll works out and deducts TDS for staff.

round_off_total_salarybooleanOptional

Round Off Total Salary: each staff member’s total salary is rounded to the nearest rupee. Needs Payroll on your plan.

custom_permissionsbooleanOptional

Enable Custom Role: staff can be given the Custom role, with permissions set person by person.

Response

The settings were updated. data has every setting after the change.

messagestring
statusboolean
dataobject

Errors

400
Bad Request Error
403
Forbidden Error